mirror of
https://github.com/ocornut/imgui.git
synced 2026-10-16 22:40:48 +00:00
Non deterministic texture format in example_glfw_wgpu #9576
Labels
No labels
accidentally closed
android
backends
bug
building
clipper
coloredit
color spaces
cplusplus
data types
demo
disabled
doc
docking
dpi
drag drop
drawing/drawlist
dropped
dx12
enhancement
focus
font/text
gallery
help wanted
idle/power saving
ime
in progress
inputs
inputtext
internals
label/id and id stack
language bindings
layout
linux/bsd
menus
multi-contexts
multi-threading
multi-viewports
nav
news/info
opengl
optimization
osx/ios
overlap
plot/graph
popups
question
scrolling
selection
settings
sliders/drags
style
tables/columns
tabs
test wanted
tools
tooltips
tree
tricks & tips
useful widgets
vulkan
web
window pos/depth
window sizing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ocornut/imgui#9576
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Version/Branch of Dear ImGui:
Version 1.92.9b, Branch: docking
Back-ends:
imgui_impl_glfw.cpp + imgui_impl_wgpu.cpp
Compiler, OS:
macOS Clang 21
Full config/build information:
// (Copy from the next line. Keep the ``` markers for formatting.)
Details:
I scratched my head for a long time trying to figure out why the iconic blue buttons from ImGui did not look exactly the same in my application.
I traced it down to this code in example_glfw_wgpu.cpp
The issue is that picking
surface_capabilities.formats[0]seems to be completely non deterministic.I printed the preferred_fmt value for Emscripten and I got
WGPUTextureFormat_BGRA8Unorm(which looks right)On native macOS I got
WGPUTextureFormat_BGRA8UnormSrgb(which looks wrong)Forcing
WGPUTextureFormat_BGRA8Unormon macOS fixes the issue...I think a little helper, something like that would help address this issue:
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code: