mirror of
https://github.com/godotengine/godot
synced 2024-09-05 05:18:29 +00:00
free color and depth texture after check framebuffer complete failed
This commit is contained in:
parent
b6ba664830
commit
df740f6865
|
@ -1744,7 +1744,12 @@ void TextureStorage::_update_render_target(RenderTarget *rt) {
|
|||
GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
|
||||
if (status != GL_FRAMEBUFFER_COMPLETE) {
|
||||
glDeleteFramebuffers(1, &rt->fbo);
|
||||
GLES3::Utilities::get_singleton()->texture_free_data(rt->color);
|
||||
if (rt->overridden.color.is_null()) {
|
||||
GLES3::Utilities::get_singleton()->texture_free_data(rt->color);
|
||||
}
|
||||
if (rt->overridden.depth.is_null()) {
|
||||
GLES3::Utilities::get_singleton()->texture_free_data(rt->depth);
|
||||
}
|
||||
rt->fbo = 0;
|
||||
rt->size.x = 0;
|
||||
rt->size.y = 0;
|
||||
|
|
Loading…
Reference in a new issue