return [NSOpenGLContext currentContext];
}
+bool WXGLSetCurrentContext(WXGLContext context)
+{
+ [context makeCurrentContext];
+
+ return true;
+}
+
void WXGLDestroyPixelFormat( WXGLPixelFormat pixelFormat )
{
if ( pixelFormat )
bool wxGLContext::SetCurrent(const wxGLCanvas& win) const
{
if ( !m_glContext )
- return false;
+ return false;
[m_glContext setView: win.GetHandle() ];
[m_glContext update];
-
+
[m_glContext makeCurrentContext];
-
+
return true;
}
+ (void)initialize
{
static BOOL initialized = NO;
- if (!initialized)
+ if (!initialized)
{
initialized = YES;
wxOSXCocoaClassAddWXMethods( self );