gboisse / gfx

A minimalist and easy to use graphics API.
MIT License
498 stars 35 forks source link

[Multi Windows / Sub Window] multi windows / sub windows #118

Closed ySion closed 5 months ago

ySion commented 6 months ago

I'm trying to development some digital assets create tools, I want to create some sub windows, likes popup tool list dialogs... I found that I need to create one window first, and pass it into "gfxCreateContext", and I will get one D3D12Device. If I repeat it to try to create a sub window, I will get two D3D12Devices. How should I do that I can simply create sub windows but use same Device.

gboisse commented 5 months ago

Hey there, I don't have much experience with multi-window applications but from your description (mentioning popup dialogs, etc.), it seems you'd be more interested in some UI options?

If so, I'd recommend you check out the Dear ImGui library, which comes pre-integrated in gfx: https://github.com/gboisse/gfx/blob/master/gfx_imgui.h