| 91 | } |
| 92 | |
| 93 | ImTextureID ImageReference::PrepareRender() |
| 94 | { |
| 95 | if (TextureId) return TextureId; |
| 96 | if (!IsValid()) return ImTextureID(); |
| 97 | |
| 98 | auto tex = gExtender->IMGUI().BindTexture(TextureHandle); |
| 99 | if (tex) { |
| 100 | TextureId = *tex; |
| 101 | } else { |
| 102 | // Failed to create render texture, remove binding |
| 103 | gExtender->IMGUI().UnregisterTexture(TextureHandle, TextureResource); |
| 104 | TextureHandle = 0; |
| 105 | } |
| 106 | |
| 107 | return TextureId; |
| 108 | } |
| 109 | |
| 110 | template <class T> |
| 111 | T* TreeParent::AddChild() |
no test coverage detected