From 8513bbdb8b32badf05d3f2fd8c27e3cbb7a503ac Mon Sep 17 00:00:00 2001 From: BastiaanOlij Date: Thu, 20 Jul 2017 00:04:19 +1000 Subject: add missing framebuffer check --- drivers/gles3/rasterizer_storage_gles3.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'drivers/gles3/rasterizer_storage_gles3.cpp') 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); } -- cgit v1.2.3