Consistently use system_fbo instead of binding 0 as it is needed for iOS devices

This commit is contained in:
clayjohn
2024-02-23 16:38:34 -08:00
parent 16d61427ca
commit 294f16c862
12 changed files with 37 additions and 34 deletions

View File

@ -1689,7 +1689,7 @@ void RasterizerCanvasGLES3::light_update_shadow(RID p_rid, int p_shadow_index, c
}
glBindVertexArray(0);
glBindFramebuffer(GL_FRAMEBUFFER, 0);
glBindFramebuffer(GL_FRAMEBUFFER, GLES3::TextureStorage::system_fbo);
glDepthMask(GL_FALSE);
glDisable(GL_DEPTH_TEST);
glDisable(GL_SCISSOR_TEST);
@ -1797,7 +1797,7 @@ void RasterizerCanvasGLES3::light_update_directional_shadow(RID p_rid, int p_sha
cl->shadow.directional_xform = to_shadow * to_light_xform;
glBindVertexArray(0);
glBindFramebuffer(GL_FRAMEBUFFER, 0);
glBindFramebuffer(GL_FRAMEBUFFER, GLES3::TextureStorage::system_fbo);
glDepthMask(GL_FALSE);
glDisable(GL_DEPTH_TEST);
glDisable(GL_SCISSOR_TEST);
@ -1911,7 +1911,7 @@ void RasterizerCanvasGLES3::render_sdf(RID p_render_target, LightOccluderInstanc
texture_storage->render_target_sdf_process(p_render_target); //done rendering, process it
glBindVertexArray(0);
glBindFramebuffer(GL_FRAMEBUFFER, 0);
glBindFramebuffer(GL_FRAMEBUFFER, GLES3::TextureStorage::system_fbo);
}
RID RasterizerCanvasGLES3::occluder_polygon_create() {