diff options
author | BastiaanOlij <mux213@gmail.com> | 2017-07-20 00:04:19 +1000 |
---|---|---|
committer | BastiaanOlij <mux213@gmail.com> | 2017-07-20 00:04:19 +1000 |
commit | 8513bbdb8b32badf05d3f2fd8c27e3cbb7a503ac (patch) | |
tree | 9685764709377f243a0947a05bdd30c892d23e2b /drivers | |
parent | 9cf72d0ae174badab07b1461f576955725375046 (diff) |
add missing framebuffer check
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles3/rasterizer_storage_gles3.cpp | 8 |
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); } |