Skip to content

Commit

Permalink
fix renderer
Browse files Browse the repository at this point in the history
closes #5
  • Loading branch information
pkdawson committed Sep 18, 2022
1 parent 12c96e4 commit c925dd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/imgui-godot/ImGuiGD.cs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ private static void RenderDrawData(ImDrawDataPtr drawData, RID parent)
for (int n = 0; n < drawData.CmdListsCount; n++)
{
ImDrawListPtr cmdList = drawData.CmdListsRange[n];
int idxOffset = 0;

int nVert = cmdList.VtxBuffer.Size;

Expand All @@ -325,6 +324,7 @@ private static void RenderDrawData(ImDrawDataPtr drawData, RID parent)
ImDrawCmdPtr drawCmd = cmdList.CmdBuffer[cmdi];

int[] indices = new int[drawCmd.ElemCount];
int idxOffset = (int)drawCmd.IdxOffset;
for (int i = idxOffset, j = 0; i < idxOffset + drawCmd.ElemCount; i++, j++)
{
indices[j] = cmdList.IdxBuffer[i];
Expand Down

0 comments on commit c925dd5

Please sign in to comment.