+ case GLUT_WINDOW_SRGB:
+ if( fgStructure.CurrentWindow != NULL ) {
+ static int attr = WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB;
+ static PFNWGLGETPIXELFORMATATTRIBIVARBPROC wglGetPixelFormatAttribivARB;
+ HDC hdc = fgStructure.CurrentWindow->Window.pContext.Device;
+ int ipixfmt = GetPixelFormat(hdc);
+ int val;
+
+ if(!wglGetPixelFormatAttribivARB) {
+ if(!(wglGetPixelFormatAttribivARB = (PFNWGLGETPIXELFORMATATTRIBIVARBPROC)wglGetProcAddress("wglGetPixelFormatAttribivARB"))) {
+ return 0;
+ }
+ }
+ if(wglGetPixelFormatAttribivARB(hdc, ipixfmt, 0, 1, &attr, &val)) {
+ return val;
+ }
+ }
+ return 0;
+