ENABLE_GL_IMGUI_SHADERS - Fixes in ImGuiWrapper::render_draw_data()

(cherry picked from commit prusa3d/PrusaSlicer@4964d6ecd5)
This commit is contained in:
enricoturri1966 2023-10-27 10:16:55 +08:00 committed by Noisyfox
parent 7081ebddfa
commit bb044754af

View file

@ -2501,7 +2501,6 @@ void ImGuiWrapper::render_draw_data(ImDrawData *draw_data)
glsafe(::glBindTexture(GL_TEXTURE_2D, (GLuint)(intptr_t)pcmd->GetTexID())); glsafe(::glBindTexture(GL_TEXTURE_2D, (GLuint)(intptr_t)pcmd->GetTexID()));
glsafe(::glDrawElements(GL_TRIANGLES, (GLsizei)pcmd->ElemCount, sizeof(ImDrawIdx) == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT, (void*)(intptr_t)(pcmd->IdxOffset * sizeof(ImDrawIdx)))); glsafe(::glDrawElements(GL_TRIANGLES, (GLsizei)pcmd->ElemCount, sizeof(ImDrawIdx) == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT, (void*)(intptr_t)(pcmd->IdxOffset * sizeof(ImDrawIdx))));
} }
idx_buffer += pcmd->ElemCount;
} }
if (position_id != -1) if (position_id != -1)