summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBastiaanOlij <mux213@gmail.com>2017-07-20 00:04:19 +1000
committerBastiaanOlij <mux213@gmail.com>2017-07-20 00:04:19 +1000
commit8513bbdb8b32badf05d3f2fd8c27e3cbb7a503ac (patch)
tree9685764709377f243a0947a05bdd30c892d23e2b /drivers
parent9cf72d0ae174badab07b1461f576955725375046 (diff)
add missing framebuffer check
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles3/rasterizer_storage_gles3.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp
index 981426f4dc..226b9105ff 100644
--- a/drivers/gles3/rasterizer_storage_gles3.cpp
+++ b/drivers/gles3/rasterizer_storage_gles3.cpp
@@ -6054,15 +6054,11 @@ void RasterizerStorageGLES3::_render_target_allocate(RenderTarget *rt) {
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
GL_TEXTURE_2D, rt->buffers.effect, 0);
- if (status != GL_FRAMEBUFFER_COMPLETE) {
- printf("err status: %x\n", status);
- _render_target_clear(rt);
- ERR_FAIL_COND(status != GL_FRAMEBUFFER_COMPLETE);
- }
-
+ status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
glBindFramebuffer(GL_FRAMEBUFFER, RasterizerStorageGLES3::system_fbo);
if (status != GL_FRAMEBUFFER_COMPLETE) {
+ printf("err status: %x\n", status);
_render_target_clear(rt);
ERR_FAIL_COND(status != GL_FRAMEBUFFER_COMPLETE);
}