]> git.saurik.com Git - wxWidgets.git/commitdiff
call aglEnable(AGL_BUFFER_RECT) after setting the rect; fixes both drawing over all...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 22 Jul 2007 10:34:16 +0000 (10:34 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 22 Jul 2007 10:34:16 +0000 (10:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/glcanvas.cpp

index a5151fe3d2bbaeec172b7b9c0c6c848b2e1646ac..ffed5c32a312b7579eb84ecea1d7e126715cbbaa 100644 (file)
@@ -63,10 +63,6 @@ wxGLContext::wxGLContext(wxGLCanvas *win, const wxGLContext *other)
                                     other ? other->m_aglContext : NULL);
     if ( !m_aglContext )
         wxLogAGLError("aglCreateContext");
-
-    return;
-    if ( !aglEnable(m_aglContext, AGL_BUFFER_RECT) )
-        wxLogAGLError("aglEnable(AGL_BUFFER_RECT)");
 }
 
 wxGLContext::~wxGLContext()
@@ -365,6 +361,9 @@ void wxGLCanvas::SetViewport()
     if ( !aglSetInteger(context, AGL_BUFFER_RECT, parms) )
         wxLogAGLError("aglSetInteger(AGL_BUFFER_RECT)");
 
+    if ( !aglEnable(context, AGL_BUFFER_RECT) )
+        wxLogAGLError("aglEnable(AGL_BUFFER_RECT)");
+
     if ( !aglUpdateContext(context) )
         wxLogAGLError("aglUpdateContext");
 }