diff options
author | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-06-18 22:31:03 +1000 |
---|---|---|
committer | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-06-18 22:31:03 +1000 |
commit | 259da84075c62c2ab96c7cb922df2000ebefb735 (patch) | |
tree | 423106dd69711794a4d5b3d1f5031a65960d186d /src/renderer/backends/opengl | |
parent | b2c9782ab2f4abec8f8548e667a8f2ad6e36bd4b (diff) |
pbr progress
Diffstat (limited to 'src/renderer/backends/opengl')
-rw-r--r-- | src/renderer/backends/opengl/backend_opengl.c | 2 |
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); } |