diff options
author | Juan Linietsky <juan@godotengine.org> | 2017-12-26 15:56:18 -0300 |
---|---|---|
committer | Juan Linietsky <juan@godotengine.org> | 2017-12-26 15:56:18 -0300 |
commit | c858dbdc4e4f316148fbd63184d8a8c5a25ce279 (patch) | |
tree | 4ede147ecce9638af8f9fb2183c7ff23b9226dbf /drivers/gles3 | |
parent | c54927a127a69a0073d30e7caa795f4bdda9e780 (diff) |
Fixed proper texture binding for sprite material, fixes #13987
Diffstat (limited to 'drivers/gles3')
-rw-r--r-- | drivers/gles3/rasterizer_canvas_gles3.cpp | 2 | ||||
-rw-r--r-- | drivers/gles3/rasterizer_scene_gles3.cpp | 14 |
2 files changed, 14 insertions, 2 deletions
diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp index 8d22a0e072..86415ea740 100644 --- a/drivers/gles3/rasterizer_canvas_gles3.cpp +++ b/drivers/gles3/rasterizer_canvas_gles3.cpp @@ -1150,7 +1150,7 @@ void RasterizerCanvasGLES3::canvas_render_items(Item *p_item_list, int p_z, cons glBindTexture(t->target, t->tex_id); } - } else if (!shader_ptr) { + } else { state.canvas_shader.set_custom_shader(0); state.canvas_shader.bind(); } diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp index b777f9343a..1c3361d2de 100644 --- a/drivers/gles3/rasterizer_scene_gles3.cpp +++ b/drivers/gles3/rasterizer_scene_gles3.cpp @@ -1541,7 +1541,19 @@ void RasterizerSceneGLES3::_render_geometry(RenderList::Element *e) { if (c.texture.is_valid() && storage->texture_owner.owns(c.texture)) { - const RasterizerStorageGLES3::Texture *t = storage->texture_owner.get(c.texture); + RasterizerStorageGLES3::Texture *t = storage->texture_owner.get(c.texture); + + t = t->get_ptr(); //resolve for proxies +#ifdef TOOLS_ENABLED + if (t->detect_3d) { + t->detect_3d(t->detect_3d_ud); + } +#endif + + if (t->render_target) { + t->render_target->used_in_frame = true; + } + glActiveTexture(GL_TEXTURE0); glBindTexture(t->target, t->tex_id); restore_tex = true; |