diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-05-07 15:34:13 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-07 15:34:13 -0300 |
commit | f1d2b0ebf9317ffd661c2c129527e2334ba39367 (patch) | |
tree | f411929cfa4aed1fcc11651c4bd7c87b6b42b48a /drivers/gles3/rasterizer_scene_gles3.cpp | |
parent | e6b938ef160fc175590a82626b05b9ac63e9f18e (diff) | |
parent | deca3f18b777f1e3a71f8cb12c5f5fa329aa70cd (diff) |
Merge pull request #18159 from ShyRed/viewportsky
Fix binding of ViewportTexture to Sky
Diffstat (limited to 'drivers/gles3/rasterizer_scene_gles3.cpp')
-rw-r--r-- | drivers/gles3/rasterizer_scene_gles3.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp index 266b6aa670..8da2c2f9c2 100644 --- a/drivers/gles3/rasterizer_scene_gles3.cpp +++ b/drivers/gles3/rasterizer_scene_gles3.cpp @@ -2362,7 +2362,11 @@ void RasterizerSceneGLES3::_draw_sky(RasterizerStorageGLES3::Sky *p_sky, const C ERR_FAIL_COND(!tex); glActiveTexture(GL_TEXTURE0); - glBindTexture(tex->target, tex->tex_id); + + if (tex->proxy && tex->proxy->tex_id) + glBindTexture(tex->target, tex->proxy->tex_id); + else + glBindTexture(tex->target, tex->tex_id); if (storage->config.srgb_decode_supported && tex->srgb && !tex->using_srgb) { |