X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b466e85a7e81db84545bc44c83cbe4ccacd4fe8e..55410bb4f67febe1ca20654f078ea4fb9a6223ae:/src/osx/cocoa/glcanvas.mm?ds=sidebyside diff --git a/src/osx/cocoa/glcanvas.mm b/src/osx/cocoa/glcanvas.mm index e088ede061..83c99ce833 100644 --- a/src/osx/cocoa/glcanvas.mm +++ b/src/osx/cocoa/glcanvas.mm @@ -229,27 +229,23 @@ bool wxGLContext::SetCurrent(const wxGLCanvas& win) const @interface wxNSCustomOpenGLView : NSView { - WXCOCOAIMPL_COMMON_MEMBERS NSOpenGLContext* context; } -- (id)initWithFrame:(NSRect)frame; - -WXCOCOAIMPL_COMMON_INTERFACE - @end @implementation wxNSCustomOpenGLView -- (id)initWithFrame:(NSRect)frame ++ (void)initialize { - [super initWithFrame:frame]; - impl = NULL; - return self; + static BOOL initialized = NO; + if (!initialized) + { + initialized = YES; + wxOSXCocoaClassAddWXMethods( self ); + } } -WXCOCOAIMPL_COMMON_IMPLEMENTATION - - (BOOL)isOpaque { return YES; @@ -279,7 +275,6 @@ bool wxGLCanvas::Create(wxWindow *parent, NSRect r = wxOSXGetFrameForControl( this, pos , size ) ; wxNSCustomOpenGLView* v = [[wxNSCustomOpenGLView alloc] initWithFrame:r]; m_peer = new wxWidgetCocoaImpl( this, v ); - [v setImplementation:m_peer]; MacPostControlCreate(pos, size) ; */