Closed Octogonapus closed 2 months ago
The problem is the location of the calls to GetWindowSize()
, they (along with all other CImGui calls) have to be within a Begin()
/End()
block to work properly. If you put it outside of that then it looks like you get the window size of the default debug window:
See for example: https://github.com/ocornut/imgui/issues/4404#issuecomment-894266498
If you put those calls within a window block then you should get the right sizes. Alternatively, if you're really looking for the GLFW window size you probably want unsafe_load(GetIO().DisplaySize)
.
Thank you!
GetWindowSize()
,GetWindowWidth()
, andGetWindowHeight()
always report 400 regardless of the providedwindow_size
torender
and regardless of the true window size when resizing it at runtime. I could reproduce this by adding@show CImGui.GetWindowWidth()
here on the latest master.