diff options
| author | Andre Weissflog <floooh@gmail.com> | 2025-10-15 16:40:55 +0200 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2025-10-15 16:40:55 +0200 |
| commit | 8c06b5e266f415c1c48b2e668c03df691950c015 (patch) | |
| tree | 5ce47b93f16305a37e8249c5c29331129d3f420a /util | |
| parent | d134baeaecfc082deebdd9c9eafd6b8127e926af (diff) | |
sokol_imgui.h: add a couple of asserts to _simgui_bind_texture_sampler()
Diffstat (limited to 'util')
| -rw-r--r-- | util/sokol_imgui.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/util/sokol_imgui.h b/util/sokol_imgui.h index 3a1b4a89..30992d5e 100644 --- a/util/sokol_imgui.h +++ b/util/sokol_imgui.h @@ -2949,9 +2949,12 @@ SOKOL_API_IMPL void simgui_new_frame(const simgui_frame_desc_t* desc) { static sg_pipeline _simgui_bind_texture_sampler(sg_bindings* bindings, ImTextureID imtex_id) { const sg_view tex_view = simgui_texture_view_from_imtextureid(imtex_id); + SOKOL_ASSERT(tex_view.id != SG_INVALID_ID); const sg_image img = sg_query_view_image(tex_view); + SOKOL_ASSERT(img.id != SG_INVALID_ID); bindings->views[0] = tex_view; bindings->samplers[0] = simgui_sampler_from_imtextureid(imtex_id); + SOKOL_ASSERT(bindings->samplers[0].id != SG_INVALID_ID); if (sg_query_pixelformat(sg_query_image_pixelformat(img)).filter) { return _simgui.def_pip; } else { |