///////////////////////////////////////////////////////////////////////////////
-// Name: src/mac/carbon/glcanvas.cpp
+// Name: src/osx/carbon/glcanvas.cpp
// Purpose: wxGLCanvas, for using OpenGL with wxWidgets under Macintosh
// Author: Stefan Csomor
// Modified by:
}
}
-void WXGLSwapBuffers( WXGLContext context )
-{
- aglSwapBuffers(context);
-}
-
WXGLContext WXGLGetCurrentContext()
{
return aglGetCurrentContext();
WXGLDestroyContext(m_dummyContext);
}
+bool wxGLCanvas::SwapBuffers()
+{
+ WXGLContext context = WXGLGetCurrentContext();
+ wxCHECK_MSG(context, false, wxT("should have current context"));
+
+ aglSwapBuffers(context);
+ return true;
+}
+
void wxGLCanvas::SetViewport()
{
if ( !m_needsUpdate )