mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 13:59:19 +02:00
Use texture id casting recommended by ImGui wiki
This commit is contained in:
@@ -202,7 +202,7 @@ void scenarioloader_ui::render_()
|
|||||||
// Gradient at the lower half of the screen
|
// Gradient at the lower half of the screen
|
||||||
if (!Global.NvRenderer)
|
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));
|
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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user