diff options
author | Thomas Herzog <thomas.herzog@mail.com> | 2018-08-23 17:11:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-23 17:11:00 +0200 |
commit | d61fc6a97b45d2147d0ba43c0ec572d566aad6e6 (patch) | |
tree | 7bbcadc028c7354b0fbe38102b0bf794d68332e6 /drivers/gles2/rasterizer_gles2.cpp | |
parent | 29ccd2be18dd900957975160cb58bb79dc6fc0ea (diff) | |
parent | da876907fd0ee7fed0718e933100182f5fe5abfe (diff) |
Merge pull request #21317 from karroffel/gles2-canvas-texture-sampler-long-branch-name
[GLES2] fix canvas_item sampler allocation
Diffstat (limited to 'drivers/gles2/rasterizer_gles2.cpp')
-rw-r--r-- | drivers/gles2/rasterizer_gles2.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp index a1a0b9e2c6..8815205054 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -327,7 +327,7 @@ void RasterizerGLES2::set_boot_image(const Ref<Image> &p_image, const Color &p_c screenrect.position += ((Size2(window_w, window_h) - screenrect.size) / 2.0).floor(); RasterizerStorageGLES2::Texture *t = storage->texture_owner.get(texture); - glActiveTexture(GL_TEXTURE0); + glActiveTexture(GL_TEXTURE0 + storage->config.max_texture_image_units - 1); glBindTexture(GL_TEXTURE_2D, t->tex_id); canvas->draw_generic_textured_rect(screenrect, Rect2(0, 0, 1, 1)); glBindTexture(GL_TEXTURE_2D, 0); @@ -354,7 +354,7 @@ void RasterizerGLES2::blit_render_target_to_screen(RID p_render_target, const Re canvas->canvas_begin(); glDisable(GL_BLEND); glBindFramebuffer(GL_FRAMEBUFFER, RasterizerStorageGLES2::system_fbo); - glActiveTexture(GL_TEXTURE0); + glActiveTexture(GL_TEXTURE0 + storage->config.max_texture_image_units - 1); glBindTexture(GL_TEXTURE_2D, rt->color); // TODO normals |