aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorAndre Weissflog <floooh@gmail.com>2025-07-21 13:17:03 +0200
committerAndre Weissflog <floooh@gmail.com>2025-07-21 13:17:03 +0200
commit8dbc508f9ed40f6f9c826ea3024c88dfd932cccd (patch)
tree5d0f801851c92447fffc64ff28d4fb04e339fd91 /util
parent50adce72d599030eeed15756ec6355478436c57e (diff)
sokol_gfx_imgui.h: don't attempt to render msaa images
Diffstat (limited to 'util')
-rw-r--r--util/sokol_gfx_imgui.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/sokol_gfx_imgui.h b/util/sokol_gfx_imgui.h
index 75d4d78d..7798b1c8 100644
--- a/util/sokol_gfx_imgui.h
+++ b/util/sokol_gfx_imgui.h
@@ -3230,9 +3230,9 @@ _SOKOL_PRIVATE void _sgimgui_draw_image(sgimgui_t* ctx, sg_image img, float* opt
if (sg_query_view_type(view) == SG_VIEWTYPE_TEXTURE) {
sg_image view_img = sg_query_view_image(view);
if (view_img.id == img.id) {
- // FIXME: once texture views can have a separate image type,
- // check this instead
- if (sg_query_image_type(view_img) == SG_IMAGETYPE_2D) {
+ // FIXME: once texture views can have a separate image type, check this instead
+ const bool image_renderable = (sg_query_image_type(view_img) == SG_IMAGETYPE_2D) && (sg_query_image_sample_count(view_img) == 1);
+ if (image_renderable) {
break;
}
}