X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fmswin%2Ffreeglut_window_mswin.c;h=583d5f7e08c6e0e16c5a0e0db8a63ad901cb7ce4;hb=9486b7d6a3bf0d00cc00ab98380e99810250aa84;hp=bf4ef0405dcf85ea4d0b0f94bac14aaf45861b0d;hpb=28ba5e26f5546a236e93dc3e23ce4777b41f9ffc;p=freeglut diff --git a/src/mswin/freeglut_window_mswin.c b/src/mswin/freeglut_window_mswin.c index bf4ef04..583d5f7 100644 --- a/src/mswin/freeglut_window_mswin.c +++ b/src/mswin/freeglut_window_mswin.c @@ -169,9 +169,9 @@ void fgNewWGLCreateContext( SFG_Window* window ) return; } - wglMakeCurrent( window->Window.Device, window->Window.Context ); + wglMakeCurrent( window->Window.pContext.Device, window->Window.Context ); - if ( !fghIsExtensionSupported( window->Window.Device, "WGL_ARB_create_context" ) ) + if ( !fghIsExtensionSupported( window->Window.pContext.Device, "WGL_ARB_create_context" ) ) { return; } @@ -185,7 +185,7 @@ void fgNewWGLCreateContext( SFG_Window* window ) fgError( "wglCreateContextAttribsARB not found" ); } - context = wglCreateContextAttribsARB( window->Window.Device, 0, attributes ); + context = wglCreateContextAttribsARB( window->Window.pContext.Device, 0, attributes ); if ( context == NULL ) { fghContextCreationError(); @@ -296,7 +296,7 @@ GLboolean fgSetupPixelFormat( SFG_Window* window, GLboolean checkOnly, if (checkOnly) current_hDC = CreateDC(TEXT("DISPLAY"), NULL ,NULL ,NULL); else - current_hDC = window->Window.Device; + current_hDC = window->Window.pContext.Device; fghFillPFD( ppfd, current_hDC, layer_type ); pixelformat = ChoosePixelFormat( current_hDC, ppfd ); @@ -370,13 +370,13 @@ void fgPlatformSetWindow ( SFG_Window *window ) { if( fgStructure.CurrentWindow ) ReleaseDC( fgStructure.CurrentWindow->Window.Handle, - fgStructure.CurrentWindow->Window.Device ); + fgStructure.CurrentWindow->Window.pContext.Device ); if ( window ) { - window->Window.Device = GetDC( window->Window.Handle ); + window->Window.pContext.Device = GetDC( window->Window.Handle ); wglMakeCurrent( - window->Window.Device, + window->Window.pContext.Device, window->Window.Context ); }