X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2FCommon%2Ffreeglut_state.c;h=8962df33764308b3de3fe6a599c392070fa4a336;hb=6c3c78f5fe46f0126e26dcae456ebdec502913f5;hp=f3e6e8e732c48d3202172cbe07aade5abf861301;hpb=b7ffd3e60d961de87355b3027e589eb150337e60;p=freeglut diff --git a/src/Common/freeglut_state.c b/src/Common/freeglut_state.c index f3e6e8e..8962df3 100644 --- a/src/Common/freeglut_state.c +++ b/src/Common/freeglut_state.c @@ -65,15 +65,15 @@ static int fghGetConfig( int attribute ) int result; /* Not checked */ if( fgStructure.CurrentWindow ) - result = glXGetFBConfigAttrib( fgDisplay.Display, - *(fgStructure.CurrentWindow->Window.FBConfig), + result = glXGetFBConfigAttrib( fgDisplay.pDisplay.Display, + *(fgStructure.CurrentWindow->Window.pContext.FBConfig), attribute, &returnValue ); return returnValue; } -static int fgPlatformGlutGet ( GLenum eWhat ) +int fgPlatformGlutGet ( GLenum eWhat ) { int nsamples = 0; @@ -125,10 +125,10 @@ static int fgPlatformGlutGet ( GLenum eWhat ) else { const GLXFBConfig * fbconfig = - fgStructure.CurrentWindow->Window.FBConfig; + fgStructure.CurrentWindow->Window.pContext.FBConfig; XVisualInfo * visualInfo = - glXGetVisualFromFBConfig( fgDisplay.Display, *fbconfig ); + glXGetVisualFromFBConfig( fgDisplay.pDisplay.Display, *fbconfig ); const int result = visualInfo->visual->map_entries; @@ -153,7 +153,7 @@ static int fgPlatformGlutGet ( GLenum eWhat ) return 0; XTranslateCoordinates( - fgDisplay.Display, + fgDisplay.pDisplay.Display, fgStructure.CurrentWindow->Window.Handle, fgDisplay.RootWindow, 0, 0, &x, &y, &w); @@ -167,7 +167,7 @@ static int fgPlatformGlutGet ( GLenum eWhat ) if ( w == 0 ) return 0; XTranslateCoordinates( - fgDisplay.Display, + fgDisplay.pDisplay.Display, fgStructure.CurrentWindow->Window.Handle, w, 0, 0, &x, &y, &w); @@ -186,7 +186,7 @@ static int fgPlatformGlutGet ( GLenum eWhat ) if( fgStructure.CurrentWindow == NULL ) return 0; XGetWindowAttributes( - fgDisplay.Display, + fgDisplay.pDisplay.Display, fgStructure.CurrentWindow->Window.Handle, &winAttributes ); @@ -233,7 +233,7 @@ static int fgPlatformGlutGet ( GLenum eWhat ) } -static int fgPlatformGlutDeviceGet ( GLenum eWhat ) +int fgPlatformGlutDeviceGet ( GLenum eWhat ) { switch( eWhat ) { @@ -259,7 +259,7 @@ static int fgPlatformGlutDeviceGet ( GLenum eWhat ) */ { unsigned char map; - int nbuttons = XGetPointerMapping(fgDisplay.Display, &map,0); + int nbuttons = XGetPointerMapping(fgDisplay.pDisplay.Display, &map,0); return nbuttons; } @@ -633,8 +633,8 @@ int * FGAPIENTRY glutGetModeValues(GLenum eWhat, int * size) break; } - fbconfigArray = glXChooseFBConfig(fgDisplay.Display, - fgDisplay.Screen, + fbconfigArray = glXChooseFBConfig(fgDisplay.pDisplay.Display, + fgDisplay.pDisplay.Screen, attributes, &fbconfigArraySize); @@ -652,7 +652,7 @@ int * FGAPIENTRY glutGetModeValues(GLenum eWhat, int * size) { int value; - result = glXGetFBConfigAttrib(fgDisplay.Display, + result = glXGetFBConfigAttrib(fgDisplay.pDisplay.Display, fbconfigArray[i], attribute_name, &value);