Skip to content

Commit

Permalink
sokol_gfx.h: remove sg_shader_uniform.offset
Browse files Browse the repository at this point in the history
  • Loading branch information
floooh committed Oct 26, 2024
1 parent 8bfb443 commit 195d8fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion sokol_gfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -2960,7 +2960,6 @@ typedef struct sg_shader_vertex_attr {

typedef struct sg_glsl_shader_uniform {
sg_uniform_type type;
uint32_t offset; // optional explicit offset into uniform block struct (if zero, the offset will be computed)
uint16_t array_count; // 0 for scalars, or >1 for arrays
const char* glsl_name; // glsl name binding is required on GL 4.1 and WebGL2
} sg_glsl_shader_uniform;
Expand Down
4 changes: 2 additions & 2 deletions util/sokol_gfx_imgui.h
Original file line number Diff line number Diff line change
Expand Up @@ -3522,9 +3522,9 @@ _SOKOL_PRIVATE void _sgimgui_draw_shader_panel(sgimgui_t* ctx, sg_shader shd) {
const sg_glsl_shader_uniform* u = &ub->glsl_uniforms[j];
if (SG_UNIFORMTYPE_INVALID != u->type) {
if (u->array_count <= 1) {
igText(" %s %s (offset: %d)", _sgimgui_uniformtype_string(u->type), u->glsl_name ? u->glsl_name : "", u->offset);
igText(" %s %s", _sgimgui_uniformtype_string(u->type), u->glsl_name ? u->glsl_name : "");
} else {
igText(" %s[%d] %s (offset: %d)", _sgimgui_uniformtype_string(u->type), u->array_count, u->glsl_name ? u->glsl_name : "", u->offset);
igText(" %s[%d] %s", _sgimgui_uniformtype_string(u->type), u->array_count, u->glsl_name ? u->glsl_name : "");
}
}
}
Expand Down

0 comments on commit 195d8fe

Please sign in to comment.