summaryrefslogtreecommitdiffstats
path: root/drivers/gles3/storage/texture_storage.cpp
diff options
context:
space:
mode:
authorclayjohn <claynjohn@gmail.com>2024-02-23 16:38:34 -0800
committerclayjohn <claynjohn@gmail.com>2024-02-25 13:52:41 -0800
commit294f16c86292d0f1fa998505a7928e5e61369055 (patch)
tree2f757a4246522c361786d301029249c2c80d51e1 /drivers/gles3/storage/texture_storage.cpp
parent16d61427cab3a8e43f0a9a8ee724fc176b6433c6 (diff)
downloadredot-engine-294f16c86292d0f1fa998505a7928e5e61369055.tar.gz
Consistently use system_fbo instead of binding 0 as it is needed for iOS devices
Diffstat (limited to 'drivers/gles3/storage/texture_storage.cpp')
-rw-r--r--drivers/gles3/storage/texture_storage.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gles3/storage/texture_storage.cpp b/drivers/gles3/storage/texture_storage.cpp
index e9df3c6fc8..ffbad4c83b 100644
--- a/drivers/gles3/storage/texture_storage.cpp
+++ b/drivers/gles3/storage/texture_storage.cpp
@@ -1090,7 +1090,7 @@ Ref<Image> TextureStorage::texture_2d_get(RID p_texture) const {
glReadPixels(0, 0, texture->alloc_width, texture->alloc_height, GL_RGBA, GL_UNSIGNED_BYTE, &w[0]);
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
+ glBindFramebuffer(GL_FRAMEBUFFER, GLES3::TextureStorage::system_fbo);
glDeleteTextures(1, &temp_color_texture);
glDeleteFramebuffers(1, &temp_framebuffer);
@@ -1162,7 +1162,7 @@ Ref<Image> TextureStorage::texture_2d_layer_get(RID p_texture, int p_layer) cons
glReadPixels(0, 0, texture->alloc_width, texture->alloc_height, GL_RGBA, GL_UNSIGNED_BYTE, &w[0]);
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
+ glBindFramebuffer(GL_FRAMEBUFFER, GLES3::TextureStorage::system_fbo);
glDeleteTextures(1, &temp_color_texture);
glDeleteFramebuffers(1, &temp_framebuffer);
@@ -1265,7 +1265,7 @@ Vector<Ref<Image>> TextureStorage::texture_3d_get(RID p_texture) const {
Vector<Ref<Image>> ret = _texture_3d_read_framebuffer(texture);
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
+ glBindFramebuffer(GL_FRAMEBUFFER, GLES3::TextureStorage::system_fbo);
glDeleteTextures(1, &temp_color_texture);
glDeleteFramebuffers(1, &temp_framebuffer);
@@ -1920,7 +1920,7 @@ void TextureStorage::update_texture_atlas() {
copy_effects->copy_to_rect(t->uv_rect);
}
}
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
+ glBindFramebuffer(GL_FRAMEBUFFER, GLES3::TextureStorage::system_fbo);
}
/* DECAL API */