Skip to content

Commit 51123e3

Browse files
committed
Backends: Allegro: Removed unused code regarding indices.
1 parent bf4c2e0 commit 51123e3

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

backends/imgui_impl_allegro5.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -146,22 +146,6 @@ void ImGui_ImplAllegro5_RenderDrawData(ImDrawData* draw_data)
146146
dst_v->col = al_map_rgba(c[0], c[1], c[2], c[3]);
147147
}
148148

149-
const int* indices = nullptr;
150-
if (sizeof(ImDrawIdx) == 2)
151-
{
152-
// FIXME-OPT: Unfortunately Allegro doesn't support 16-bit indices.. You can '#define ImDrawIdx int' in imconfig.h to request Dear ImGui to output 32-bit indices.
153-
// Otherwise, we convert them from 16-bit to 32-bit at runtime here, which works perfectly but is a little wasteful.
154-
static ImVector<int> indices_converted;
155-
indices_converted.resize(cmd_list->IdxBuffer.Size);
156-
for (int i = 0; i < cmd_list->IdxBuffer.Size; ++i)
157-
indices_converted[i] = (int)cmd_list->IdxBuffer.Data[i];
158-
indices = indices_converted.Data;
159-
}
160-
else if (sizeof(ImDrawIdx) == 4)
161-
{
162-
indices = (const int*)cmd_list->IdxBuffer.Data;
163-
}
164-
165149
// Render command lists
166150
ImVec2 clip_off = draw_data->DisplayPos;
167151
for (int cmd_i = 0; cmd_i < cmd_list->CmdBuffer.Size; cmd_i++)

0 commit comments

Comments
 (0)