From 29193f0f2ab7289d7474e916b4e2fce05a70698d Mon Sep 17 00:00:00 2001 From: raven02 Date: Wed, 23 Apr 2014 22:38:56 +0800 Subject: [PATCH] Restore viewport natively in fbo_bind_as_render_target() --- gfx_es2/fbo.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gfx_es2/fbo.cpp b/gfx_es2/fbo.cpp index 909b5aab12..9f650d6ce5 100644 --- a/gfx_es2/fbo.cpp +++ b/gfx_es2/fbo.cpp @@ -278,6 +278,9 @@ void fbo_bind_as_render_target(FBO *fbo) { glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo->handle); #endif } + if (gl_extensions.gpuVendor != GPU_VENDOR_POWERVR) { + glstate.viewport.restore(); + } } void fbo_bind_for_read(FBO *fbo) {