fix for Game engine bug #1961 furnished by Josh Nimoy.
authorJean-Luc Peurière <jlp@nerim.net>
Thu, 20 Oct 2005 18:05:06 +0000 (18:05 +0000)
committerJean-Luc Peurière <jlp@nerim.net>
Thu, 20 Oct 2005 18:05:06 +0000 (18:05 +0000)
Thanks.

Although the fix is not perfect (lacks screen requisition safeguards),
it does indeed allow to run game engine fullscreen

intern/ghost/intern/GHOST_WindowCarbon.cpp

index bd271fd0c8dc0f2d5d3d53487b10efd43bfa4940..5ddacd5f21fdc7c27228e674b55b2999e5eb3d04 100644 (file)
@@ -182,7 +182,7 @@ GHOST_WindowCarbon::GHOST_WindowCarbon(
             (SInt32)this);                                     // Store a pointer to the class in the refCon
     */
         //GHOST_PRINT("GHOST_WindowCarbon::GHOST_WindowCarbon(): creating full-screen OpenGL context\n");
-        setDrawingContextType(GHOST_kDrawingContextTypeOpenGL);
+        setDrawingContextType(GHOST_kDrawingContextTypeOpenGL);;installDrawingContext(GHOST_kDrawingContextTypeOpenGL);
         updateDrawingContext();
         activateDrawingContext();        
     }
@@ -477,7 +477,7 @@ GHOST_TSuccess GHOST_WindowCarbon::installDrawingContext(GHOST_TDrawingContextTy
             }
             else {
                 //GHOST_PRINT("GHOST_WindowCarbon::installDrawingContext(): init full-screen OpenGL\n");
-                pixelFormat = ::aglChoosePixelFormat(0, 0, sPreferredFormatFullScreen);
+GDHandle device=::GetMainDevice();pixelFormat=::aglChoosePixelFormat(&device,1,sPreferredFormatFullScreen);
                 m_aglCtx = ::aglCreateContext(pixelFormat, 0);
                 if (!m_aglCtx) break;
                                if (!s_firstaglCtx) s_firstaglCtx = m_aglCtx;