Merge pull request #48541 from parulina/gles2-viewporttexture-fix
Fixed usage of proxy textures on GLES2 sky
This commit is contained in:
commit
1f202ff099
|
@ -2815,6 +2815,8 @@ void RasterizerSceneGLES2::_draw_sky(RasterizerStorageGLES2::Sky *p_sky, const C
|
||||||
RasterizerStorageGLES2::Texture *tex = storage->texture_owner.getornull(p_sky->panorama);
|
RasterizerStorageGLES2::Texture *tex = storage->texture_owner.getornull(p_sky->panorama);
|
||||||
ERR_FAIL_COND(!tex);
|
ERR_FAIL_COND(!tex);
|
||||||
|
|
||||||
|
tex = tex->get_ptr(); //resolve for proxies
|
||||||
|
|
||||||
glActiveTexture(GL_TEXTURE0);
|
glActiveTexture(GL_TEXTURE0);
|
||||||
glBindTexture(tex->target, tex->tex_id);
|
glBindTexture(tex->target, tex->tex_id);
|
||||||
|
|
||||||
|
|
|
@ -1162,6 +1162,8 @@ void RasterizerStorageGLES2::sky_set_texture(RID p_sky, RID p_panorama, int p_ra
|
||||||
ERR_FAIL_COND(!texture);
|
ERR_FAIL_COND(!texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
texture = texture->get_ptr(); //resolve for proxies
|
||||||
|
|
||||||
// glBindVertexArray(0) and more
|
// glBindVertexArray(0) and more
|
||||||
{
|
{
|
||||||
glBindBuffer(GL_ARRAY_BUFFER, 0);
|
glBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||||
|
|
Loading…
Reference in a new issue