summaryrefslogtreecommitdiff
path: root/src/renderer/backends
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderer/backends')
-rw-r--r--src/renderer/backends/opengl/backend_opengl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/renderer/backends/opengl/backend_opengl.c b/src/renderer/backends/opengl/backend_opengl.c
index 18cd7ee..18d1617 100644
--- a/src/renderer/backends/opengl/backend_opengl.c
+++ b/src/renderer/backends/opengl/backend_opengl.c
@@ -211,6 +211,8 @@ void encode_bind_shader_data(gpu_cmd_encoder* encoder, u32 group, shader_data* d
} else if (binding.type == SHADER_BINDING_TEXTURE) {
gpu_texture* tex = TEXTURE_GET(binding.data.texture.handle);
+ GLuint tex_slot = glGetUniformLocation(encoder->pipeline->shader_id, binding.label);
+ glUniform1i(tex_slot, i);
glActiveTexture(GL_TEXTURE0 + i);
glBindTexture(GL_TEXTURE_2D, tex->id);
}