Remove const qualifier on ImTextureID local (#4060)

When defining ImTextureID to a type such as Texture*, the const-qualifier here stops us from using the texture ID. const Texture* is not valid to be pushed as a texture ID anymore.
This commit is contained in:
Nick Lange 2021-04-26 01:15:55 -07:00 committed by GitHub
parent 7b8932554e
commit 04e98fbe6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3770,7 +3770,7 @@ void ImGui::RenderMouseCursor(ImDrawList* draw_list, ImVec2 pos, float scale, Im
if (font_atlas->GetMouseCursorTexData(mouse_cursor, &offset, &size, &uv[0], &uv[2]))
{
pos -= offset;
const ImTextureID tex_id = font_atlas->TexID;
ImTextureID tex_id = font_atlas->TexID;
draw_list->PushTextureID(tex_id);
draw_list->AddImage(tex_id, pos + ImVec2(1, 0) * scale, pos + (ImVec2(1, 0) + size) * scale, uv[2], uv[3], col_shadow);
draw_list->AddImage(tex_id, pos + ImVec2(2, 0) * scale, pos + (ImVec2(2, 0) + size) * scale, uv[2], uv[3], col_shadow);