Skip to content

Commit 5a94055

Browse files
committed
TestSuite, imgui_app: add dummy support for textures in headless/null impl.
1 parent 23d8000 commit 5a94055

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

shared/imgui_app.cpp

+20
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,26 @@ static void ImGuiApp_ImplNull_Render(ImGuiApp* app_opaque)
222222
IM_UNUSED(app_opaque);
223223
ImDrawData* draw_data = ImGui::GetDrawData();
224224

225+
#ifdef IMGUI_HAS_TEXTURES
226+
for (ImTextureData* tex : ImGui::GetPlatformIO().Textures)
227+
{
228+
if (tex->Status == ImTextureStatus_WantCreate)
229+
{
230+
tex->SetTexUserID(0x42424242);
231+
tex->Status = ImTextureStatus_OK;
232+
}
233+
if (tex->Status == ImTextureStatus_WantUpdates)
234+
{
235+
tex->Status = ImTextureStatus_OK;
236+
}
237+
if (tex->Status == ImTextureStatus_WantDestroy)
238+
{
239+
tex->SetTexUserID(ImTextureUserID_Invalid);
240+
tex->Status = ImTextureStatus_Destroyed;
241+
}
242+
}
243+
#endif
244+
225245
#ifdef IMGUI_HAS_VIEWPORT
226246
ImGuiIO& io = ImGui::GetIO();
227247
if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)

0 commit comments

Comments
 (0)