diff options
Diffstat (limited to 'backends/platform/iphone/iphone_video.mm')
-rw-r--r-- | backends/platform/iphone/iphone_video.mm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/backends/platform/iphone/iphone_video.mm b/backends/platform/iphone/iphone_video.mm index 0ddb90bece..04aaf59b21 100644 --- a/backends/platform/iphone/iphone_video.mm +++ b/backends/platform/iphone/iphone_video.mm @@ -443,13 +443,17 @@ const char *iPhone_getDocumentsDir() { } } -- (void)initSurface { - uint screenTexWidth = getSizeNextPOT(_videoContext.screenWidth); - uint screenTexHeight = getSizeNextPOT(_videoContext.screenHeight); +- (void)createScreenTexture { + const uint screenTexWidth = getSizeNextPOT(_videoContext.screenWidth); + const uint screenTexHeight = getSizeNextPOT(_videoContext.screenHeight); _gameScreenTexCoords[2] = _gameScreenTexCoords[6] = _videoContext.screenWidth / (GLfloat)screenTexWidth; _gameScreenTexCoords[5] = _gameScreenTexCoords[7] = _videoContext.screenHeight / (GLfloat)screenTexHeight; + _videoContext.screenTexture.create(screenTexWidth, screenTexHeight, Graphics::createPixelFormat<565>()); +} + +- (void)initSurface { int screenWidth, screenHeight; [self setUpOrientation:[[UIDevice currentDevice] orientation] width:&screenWidth height:&screenHeight]; @@ -467,8 +471,6 @@ const char *iPhone_getDocumentsDir() { glGenTextures(1, &_overlayTexture); printOpenGLError(); [self setFilterModeForTexture:_overlayTexture]; - _videoContext.screenTexture.create(screenTexWidth, screenTexHeight, Graphics::createPixelFormat<565>()); - glBindRenderbufferOES(GL_RENDERBUFFER_OES, _viewRenderbuffer); printOpenGLError(); [self clearColorBuffer]; |