MCPcopy Create free account
hub / github.com/Norbyte/bg3se / PrepareRender

Method PrepareRender

BG3Extender/Extender/Client/IMGUI/IMGUI.cpp:93–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93ImTextureID 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
110template <class T>
111T* TreeParent::AddChild()

Callers 1

StyledRenderMethod · 0.80

Calls 2

BindTextureMethod · 0.80
UnregisterTextureMethod · 0.80

Tested by

no test coverage detected