Skip to content

Commit

Permalink
Merge pull request #48541 from parulina/gles2-viewporttexture-fix
Browse files Browse the repository at this point in the history
Fixed usage of proxy textures on GLES2 sky
  • Loading branch information
akien-mga authored May 7, 2021
2 parents 1690eb7 + eed4655 commit 1f202ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gles2/rasterizer_scene_gles2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2815,6 +2815,8 @@ void RasterizerSceneGLES2::_draw_sky(RasterizerStorageGLES2::Sky *p_sky, const C
RasterizerStorageGLES2::Texture *tex = storage->texture_owner.getornull(p_sky->panorama);
ERR_FAIL_COND(!tex);

tex = tex->get_ptr(); //resolve for proxies

glActiveTexture(GL_TEXTURE0);
glBindTexture(tex->target, tex->tex_id);

Expand Down
2 changes: 2 additions & 0 deletions drivers/gles2/rasterizer_storage_gles2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1162,6 +1162,8 @@ void RasterizerStorageGLES2::sky_set_texture(RID p_sky, RID p_panorama, int p_ra
ERR_FAIL_COND(!texture);
}

texture = texture->get_ptr(); //resolve for proxies

// glBindVertexArray(0) and more
{
glBindBuffer(GL_ARRAY_BUFFER, 0);
Expand Down

0 comments on commit 1f202ff

Please sign in to comment.