mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-17 23:39:18 +02:00
Use texture id casting recommended by ImGui wiki
This commit is contained in:
@@ -113,7 +113,7 @@ void ui::cameraview_panel::render_contents()
|
||||
}
|
||||
|
||||
ImVec2 surface_size = ImGui::GetContentRegionAvail();
|
||||
ImGui::Image(reinterpret_cast<void*>(texture->id), surface_size);
|
||||
ImGui::Image((ImTextureID)(intptr_t)(texture->id), surface_size);
|
||||
}
|
||||
|
||||
void ui::cameraview_panel::capture_func()
|
||||
|
||||
@@ -299,7 +299,7 @@ void ui::map_panel::render_contents()
|
||||
|
||||
ImVec2 window_origin = ImGui::GetCursorPos();
|
||||
ImVec2 screen_origin = ImGui::GetCursorScreenPos();
|
||||
ImGui::ImageButton(reinterpret_cast<void *>(m_tex->id), surface_size_im, ImVec2(0, surface_size.y / fb_size), ImVec2(surface_size.x / fb_size, 0), 0);
|
||||
ImGui::ImageButton((ImTextureID)(intptr_t)(m_tex->id), surface_size_im, ImVec2(0, surface_size.y / fb_size), ImVec2(surface_size.x / fb_size, 0), 0);
|
||||
|
||||
if (ImGui::IsItemHovered())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user