vsg-dev / vsgImGui

Integration of VulkanSceneGraph with ImGui
MIT License
43 stars 28 forks source link

Allow RenderImGui to work without a vsg::Window #36

Closed geefr closed 1 year ago

geefr commented 1 year ago

Fairly straightforward at the vsgImGui level - New constructor added and _init methods shuffled around to allow construction without the vsg::Window handle.

One extra fix to ensure ImGuiIO::DisplaySize is initialised to something - I assume this is normally set when handling input or otherwise rendering to the window, but when rendering to texture it doesn't get initialised, and can assert inside ImGui.

Tested by a quick example setup, wasn't planning on merging it to vsgExamples but could if needed:

image

robertosfield commented 1 year ago

Thanks @geefr, changes look sensible now merged with master.