X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a9a4f2295344414e2ee4e3ec27fa5292918dff27..50f12a63130b81796ea531c59af97f0544cf158d:/src/osx/iphone/glcanvas.mm diff --git a/src/osx/iphone/glcanvas.mm b/src/osx/iphone/glcanvas.mm index c15beb18c3..0c7d8418be 100644 --- a/src/osx/iphone/glcanvas.mm +++ b/src/osx/iphone/glcanvas.mm @@ -142,15 +142,13 @@ - (void) setContext:(EAGLContext*) ctx { context = ctx; [EAGLContext setCurrentContext:ctx]; -#if 0 - CGRect newRect = [self frame]; - if ( /* (CGRectEqualToRect(newRect, oldRect) == NO && ![self isHidden] && newRect.size.width > 0 && newRect.size.height > 0 ) - || */ viewFramebuffer == 0 ) + + if ( viewFramebuffer == 0 ) { [self destroyFramebuffer]; [self createFramebuffer]; } -#endif + glBindFramebufferOES(GL_FRAMEBUFFER_OES, viewFramebuffer); } @@ -382,7 +380,7 @@ bool wxGLCanvas::Create(wxWindow *parent, return false; */ #if USE_SEPARATE_VIEW - m_macIsUserPane = false ; + DontCreatePeer(); #endif if ( !wxWindow::Create(parent, id, pos, size, style, name) )