Open Wyverex42 opened 2 months ago
I think this also requires changing the ImTextureID
define to a UObject
pointer? Slightly cognisant of that being less self-documenting from a usage perspective but not a huge deal, I guess.
Additionally you should cast to UTexture
rather than UTexture2D
to retain support for render target textures (among other variants).
Slate allows us to use texture objects as well as materials when setting up a brush, but the plugin currently always expects it to be a texture.
With this change you can pass in either a
UTexture*
or aUMaterialInterface*
as the ImGuiTextID
. Since ImGui doesn't care what it is internally (it's just a pointer / uint after all), this works perfectly well, and we just need to cast when actually drawing.Maybe you want to solve this differently though.