From 259da84075c62c2ab96c7cb922df2000ebefb735 Mon Sep 17 00:00:00 2001 From: omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Tue, 18 Jun 2024 22:31:03 +1000 Subject: pbr progress --- src/renderer/backends/opengl/backend_opengl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/renderer/backends') 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); } -- cgit v1.2.3-70-g09d2