X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03647350fc7cd141953c72e0284e928847d30f44..c9ed413ab4f5673ffff00198dc6ce1397398bda4:/src/osx/carbon/glcanvas.cpp diff --git a/src/osx/carbon/glcanvas.cpp b/src/osx/carbon/glcanvas.cpp index 4029acc11c..f8483e844e 100644 --- a/src/osx/carbon/glcanvas.cpp +++ b/src/osx/carbon/glcanvas.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// 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: @@ -77,11 +77,6 @@ void WXGLDestroyContext( WXGLContext context ) } } -void WXGLSwapBuffers( WXGLContext context ) -{ - aglSwapBuffers(context); -} - WXGLContext WXGLGetCurrentContext() { return aglGetCurrentContext(); @@ -367,6 +362,15 @@ wxGLCanvas::~wxGLCanvas() 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 )