// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// Copyright: (c) Stefan Csomor
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
- [self destroyFramebuffer];
- [self createFramebuffer];
+
+ if ( viewFramebuffer == 0 )
+ {
+ [self destroyFramebuffer];
+ [self createFramebuffer];
+ }
+
#endif
if ( !wxWindow::Create(parent, id, pos, size, style, name) )
#endif
if ( !wxWindow::Create(parent, id, pos, size, style, name) )
[NSNumber numberWithBool:NO], kEAGLDrawablePropertyRetainedBacking,
kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat, nil];
[NSNumber numberWithBool:NO], kEAGLDrawablePropertyRetainedBacking,
kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat, nil];
WXGLContext context = WXGLGetCurrentContext();
wxCHECK_MSG(context, false, wxT("should have current context"));
WXGLContext context = WXGLGetCurrentContext();
wxCHECK_MSG(context, false, wxT("should have current context"));