diff options
author | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-06-16 22:37:15 +1000 |
---|---|---|
committer | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-06-16 22:37:15 +1000 |
commit | 3c9d08717cd129c1576ea91e5bd4b7b8e0af9885 (patch) | |
tree | 3edc5e5013c64f41be7b96c96175d26adbf6e0c8 /src | |
parent | 60d1e086242940993432a40a934241dc40b7382c (diff) |
fix one silly issue
Diffstat (limited to 'src')
-rw-r--r-- | src/renderer/backends/opengl/backend_opengl.c | 11 | ||||
-rw-r--r-- | src/renderer/backends/opengl/backend_opengl.h | 5 |
2 files changed, 7 insertions, 9 deletions
diff --git a/src/renderer/backends/opengl/backend_opengl.c b/src/renderer/backends/opengl/backend_opengl.c index 18e7d2a..9ae77b4 100644 --- a/src/renderer/backends/opengl/backend_opengl.c +++ b/src/renderer/backends/opengl/backend_opengl.c @@ -199,20 +199,15 @@ void encode_bind_shader_data(gpu_cmd_encoder* encoder, u32 group, shader_data* d if (blockIndex < 0) { WARN("Couldn't retrieve block index for uniform block '%s'", binding.label); } else { - // DEBUG("Retrived block index %d for %s", blockIndex, binding.label); + DEBUG("Retrived block index %d for %s", blockIndex, binding.label); } glBindBuffer(GL_UNIFORM_BUFFER, ubo_buf->id.ubo); glBindBufferBase(GL_UNIFORM_BUFFER, i, ubo_buf->id.ubo); if (i == 2) { - pbr_params_light_uniforms* u = binding.data.bytes.data; - vec4* v = &u->viewPos; - (*v).x = 0.0; - (*v).y = 0.0; - (*v).z = 1.0; - // print_vec3(*v); + // pbr_params_light_uniforms* u = binding.data.bytes.data; + // vec4* v = &u->viewPos; } - // glBindBufferBase(GL_UNIFORM_BUFFER, i, ubo_buf->id.ubo); glBufferSubData(GL_UNIFORM_BUFFER, 0, ubo_buf->size, binding.data.bytes.data); } else if (binding.type == SHADER_BINDING_TEXTURE) { diff --git a/src/renderer/backends/opengl/backend_opengl.h b/src/renderer/backends/opengl/backend_opengl.h index cde52a3..f52bd79 100644 --- a/src/renderer/backends/opengl/backend_opengl.h +++ b/src/renderer/backends/opengl/backend_opengl.h @@ -38,7 +38,10 @@ typedef struct gpu_buffer { u32 ibo; u32 ubo; } id; - u32 vao; // Optional + union { + u32 vao; + u32 ubo_binding_point + }; // Optional u64 size; } gpu_buffer; typedef struct gpu_texture { |