aboutsummaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
Diffstat (limited to 'render')
-rw-r--r--render/gles2/texture.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/render/gles2/texture.c b/render/gles2/texture.c
index b3035826..99f153b8 100644
--- a/render/gles2/texture.c
+++ b/render/gles2/texture.c
@@ -306,9 +306,10 @@ static void gles2_texture_get_buffer_size(struct wlr_texture *texture, struct
static void gles2_texture_bind(struct wlr_texture *_texture) {
struct wlr_gles2_texture *texture = (struct wlr_gles2_texture *)_texture;
- GL_CALL(glBindTexture(GL_TEXTURE_2D, texture->tex_id));
- GL_CALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR));
- GL_CALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR));
+
+ GL_CALL(glBindTexture(texture->target, texture->tex_id));
+ GL_CALL(glTexParameteri(texture->target, GL_TEXTURE_MIN_FILTER, GL_LINEAR));
+ GL_CALL(glTexParameteri(texture->target, GL_TEXTURE_MAG_FILTER, GL_LINEAR));
GL_CALL(glUseProgram(*texture->pixel_format->shader));
}