diff options
| author | Andre Weissflog <floooh@gmail.com> | 2025-04-07 15:25:16 +0200 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2025-04-07 15:25:16 +0200 |
| commit | 42a0ef3f0f873fbb5565d1d19387566f7491e2bb (patch) | |
| tree | 03500485ff2609a6e660693beda6dff6dd45fdf8 /util | |
| parent | 0c6ac02e7e76c79e7fcd2c16ed7daa7ea937594a (diff) | |
fix some util headers for sg_buffer/image_usage
Diffstat (limited to 'util')
| -rw-r--r-- | util/sokol_debugtext.h | 4 | ||||
| -rw-r--r-- | util/sokol_gl.h | 4 | ||||
| -rw-r--r-- | util/sokol_imgui.h | 6 | ||||
| -rw-r--r-- | util/sokol_shape.h | 8 |
4 files changed, 11 insertions, 11 deletions
diff --git a/util/sokol_debugtext.h b/util/sokol_debugtext.h index 904b778c..826cf675 100644 --- a/util/sokol_debugtext.h +++ b/util/sokol_debugtext.h @@ -4251,8 +4251,8 @@ static void _sdtx_init_context(sdtx_context ctx_id, const sdtx_context_desc_t* i sg_buffer_desc vbuf_desc; _sdtx_clear(&vbuf_desc, sizeof(vbuf_desc)); vbuf_desc.size = vbuf_size; - vbuf_desc.type = SG_BUFFERTYPE_VERTEXBUFFER; - vbuf_desc.usage = SG_USAGE_STREAM; + vbuf_desc.usage.vertex_buffer = true; + vbuf_desc.usage.stream_update = true; vbuf_desc.label = "sdtx-vbuf"; ctx->vbuf = sg_make_buffer(&vbuf_desc); SOKOL_ASSERT(SG_INVALID_ID != ctx->vbuf.id); diff --git a/util/sokol_gl.h b/util/sokol_gl.h index b419b15c..8f5211ca 100644 --- a/util/sokol_gl.h +++ b/util/sokol_gl.h @@ -3321,8 +3321,8 @@ static void _sgl_init_context(sgl_context ctx_id, const sgl_context_desc_t* in_d sg_buffer_desc vbuf_desc; _sgl_clear(&vbuf_desc, sizeof(vbuf_desc)); vbuf_desc.size = (size_t)ctx->vertices.cap * sizeof(_sgl_vertex_t); - vbuf_desc.type = SG_BUFFERTYPE_VERTEXBUFFER; - vbuf_desc.usage = SG_USAGE_STREAM; + vbuf_desc.usage.vertex_buffer = true; + vbuf_desc.usage.stream_update = true; vbuf_desc.label = "sgl-vertex-buffer"; ctx->vbuf = sg_make_buffer(&vbuf_desc); SOKOL_ASSERT(SG_INVALID_ID != ctx->vbuf.id); diff --git a/util/sokol_imgui.h b/util/sokol_imgui.h index d4dc34c2..894c1e9b 100644 --- a/util/sokol_imgui.h +++ b/util/sokol_imgui.h @@ -2514,15 +2514,15 @@ SOKOL_API_IMPL void simgui_setup(const simgui_desc_t* desc) { // NOTE: since we're in C++ mode here we can't use C99 designated init sg_buffer_desc vb_desc; _simgui_clear(&vb_desc, sizeof(vb_desc)); - vb_desc.usage = SG_USAGE_STREAM; + vb_desc.usage.stream_update = true; vb_desc.size = _simgui.vertices.size; vb_desc.label = "sokol-imgui-vertices"; _simgui.vbuf = sg_make_buffer(&vb_desc); sg_buffer_desc ib_desc; _simgui_clear(&ib_desc, sizeof(ib_desc)); - ib_desc.type = SG_BUFFERTYPE_INDEXBUFFER; - ib_desc.usage = SG_USAGE_STREAM; + ib_desc.usage.index_buffer = true; + ib_desc.usage.stream_update = true; ib_desc.size = _simgui.indices.size; ib_desc.label = "sokol-imgui-indices"; _simgui.ibuf = sg_make_buffer(&ib_desc); diff --git a/util/sokol_shape.h b/util/sokol_shape.h index d1676dd3..67221dc5 100644 --- a/util/sokol_shape.h +++ b/util/sokol_shape.h @@ -1355,8 +1355,8 @@ SOKOL_API_IMPL sg_buffer_desc sshape_vertex_buffer_desc(const sshape_buffer_t* b SOKOL_ASSERT(buf && buf->valid); sg_buffer_desc desc = { 0 }; if (buf->valid) { - desc.type = SG_BUFFERTYPE_VERTEXBUFFER; - desc.usage = SG_USAGE_IMMUTABLE; + desc.usage.vertex_buffer = true; + desc.usage.immutable = true; desc.data.ptr = buf->vertices.buffer.ptr; desc.data.size = buf->vertices.data_size; } @@ -1367,8 +1367,8 @@ SOKOL_API_IMPL sg_buffer_desc sshape_index_buffer_desc(const sshape_buffer_t* bu SOKOL_ASSERT(buf && buf->valid); sg_buffer_desc desc = { 0 }; if (buf->valid) { - desc.type = SG_BUFFERTYPE_INDEXBUFFER; - desc.usage = SG_USAGE_IMMUTABLE; + desc.usage.index_buffer = true; + desc.usage.immutable = true; desc.data.ptr = buf->indices.buffer.ptr; desc.data.size = buf->indices.data_size; } |