X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1be2473f5909d77ec93070d390429d92f3e47298..c944775f72435d2c0493113e05445898ab8baf1b:/src/mac/carbon/glcanvas.cpp diff --git a/src/mac/carbon/glcanvas.cpp b/src/mac/carbon/glcanvas.cpp index a5151fe3d2..ffed5c32a3 100644 --- a/src/mac/carbon/glcanvas.cpp +++ b/src/mac/carbon/glcanvas.cpp @@ -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"); }