Restore GLX extension to XWin

- Add an XwinExtensionInit(), similar in spirit to QuartzExtensionInit()
and xf86ExtensionInit()
- Load the GLX extension (I'm guessing XQuartz needs this adding somewhere
as well)
- Also, since we now have a proper place to install the native GL provider
where it will take priority over the the swrast provider, do so

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
Jon TURNEY 2012-07-12 00:36:43 +01:00
parent 06ac7937fc
commit 2b74949ad0

View File

@ -147,15 +147,30 @@ winClipboardShutdown(void)
}
#endif
void
ddxPushProviders(void)
static const ExtensionModule xwinExtensions[] = {
#ifdef GLXEXT
{ GlxExtensionInit, "GLX", &noGlxExtension },
#endif
};
/*
* XwinExtensionInit
* Initialises Xwin-specific extensions.
*/
static
void XwinExtensionInit(void)
{
int i;
#ifdef XWIN_GLX_WINDOWS
if (g_fNativeGl) {
if ((g_fNativeGl) && (serverGeneration == 1)) {
/* install the native GL provider */
glxWinPushNativeProvider();
}
#endif
for (i = 0; i < ARRAY_SIZE(xwinExtensions); i++)
LoadExtension(&xwinExtensions[i], TRUE);
}
#if defined(DDXBEFORERESET)
@ -885,6 +900,8 @@ InitOutput(ScreenInfo * screenInfo, int argc, char *argv[])
{
int i;
XwinExtensionInit();
/* Log the command line */
winLogCommandLine(argc, argv);