X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fx11%2Ffg_init_x11.c;fp=src%2Fx11%2Ffg_init_x11.c;h=45ac0d17477b0bed8708ae0b6a2b7ae3a55cee15;hb=b744f1401b990f642e96d4c65cc86eca5224efd1;hp=83fe2871552a7909e04e28e25aca361ffa249e60;hpb=87653f06a12512952a629eb3380980cfe445584c;p=freeglut diff --git a/src/x11/fg_init_x11.c b/src/x11/fg_init_x11.c index 83fe287..45ac0d1 100644 --- a/src/x11/fg_init_x11.c +++ b/src/x11/fg_init_x11.c @@ -174,9 +174,13 @@ void fgPlatformInitialize( const char* displayName ) if( fgDisplay.pDisplay.Display == NULL ) fgError( "failed to open display '%s'", XDisplayName( displayName ) ); +#ifdef EGL_VERSION_1_0 + fghPlatformInitializeEGL(); +#else if( !glXQueryExtension( fgDisplay.pDisplay.Display, NULL, NULL ) ) fgError( "OpenGL GLX extension not supported by display '%s'", XDisplayName( displayName ) ); +#endif fgDisplay.pDisplay.Screen = DefaultScreen( fgDisplay.pDisplay.Display ); fgDisplay.pDisplay.RootWindow = RootWindow( @@ -266,8 +270,10 @@ void fgPlatformCloseDisplay ( void ) } +#ifndef EGL_VERSION_1_0 void fgPlatformDestroyContext ( SFG_PlatformDisplay pDisplay, SFG_WindowContextType MContext ) { /* Note that the MVisualInfo is not owned by the MenuContext! */ glXDestroyContext( pDisplay.Display, MContext ); } +#endif