diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-07-24 18:37:14 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-24 18:37:14 -0300 |
commit | e15a0c52437d1a3be1128641c33b994624e6bfe9 (patch) | |
tree | 966dbeb82cd0e2db992b6a0439a8d15b2a08e079 /drivers/gles3/rasterizer_storage_gles3.cpp | |
parent | bf8119f966666f1f3c0db2e182439714994b7163 (diff) | |
parent | 8513bbdb8b32badf05d3f2fd8c27e3cbb7a503ac (diff) |
Merge pull request #9712 from BastiaanOlij/fix_checking_framebuffer
add missing framebuffer check
Diffstat (limited to 'drivers/gles3/rasterizer_storage_gles3.cpp')
-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 263b0cc641..76df57d410 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -6082,15 +6082,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); } |