Closed ySion closed 6 months ago
You shouldn't need passing a D3D12_GPU_DESCRIPTOR_HANDLE
as ImTextureID
can be anything really based on your application needs.
If you're using the built-in gfx
ImGui integration (i.e., https://github.com/gboisse/gfx/blob/master/gfx_imgui.h), then you should be able to simply pass a pointer to the GfxTexture
object you want to use as image:
https://github.com/gboisse/gfx/blob/d617b252a68ea27116a5a26027530c22d45bc9e6/gfx_imgui.cpp#L270-L272
I'm using ImGui to show some texture. ImGui's function AddImage need a argument which type is ImTextureID, it was defined as D3D12_GPU_DESCRIPTOR_HANDLE in D3D12, how can I get D3D12_GPU_DESCRIPTOR_HANDLE from a gfxTexture?