16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 00:49:19 +02:00

Use texture id casting recommended by ImGui wiki

This commit is contained in:
docentYT
2026-05-12 00:18:11 +02:00
parent 373c04c0b7
commit 4c7cf22d06

View File

@@ -202,7 +202,7 @@ void scenarioloader_ui::render_()
// Gradient at the lower half of the screen
if (!Global.NvRenderer)
{
const auto tex = reinterpret_cast<ImTextureID>(m_gradient_overlay_tex);
const ImTextureID tex = (ImTextureID)(intptr_t)m_gradient_overlay_tex; // See https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples#example-for-opengl-users
draw_list->AddImage(tex, ImVec2(0, Global.window_size.y / 2), ImVec2(Global.window_size.x, Global.window_size.y), ImVec2(0, 0), ImVec2(1, 1));
}