From: Stefan Csomor Date: Mon, 12 Nov 2012 13:36:46 +0000 (+0000) Subject: making sure we have an initial frame buffer, even though the first initial rootview... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/484b442f3afe8f6d46d5be0f73150281c4062883 making sure we have an initial frame buffer, even though the first initial rootview controller lead to an empty framebuffer git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/osx/iphone/glcanvas.mm b/src/osx/iphone/glcanvas.mm index bfe0ce8bc6..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); }