]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/glcanvas.cpp
Hartwig's patch for OS X implementation of wxDataViewCtrl
[wxWidgets.git] / src / mac / carbon / glcanvas.cpp
index fb67a575944c31c33876701fd3b75c9f6eeca02c..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()
@@ -363,9 +359,13 @@ void wxGLCanvas::SetViewport()
         parms[0] += 20000;
 
     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");
 }
 
 void wxGLCanvas::OnSize(wxSizeEvent& event)