Skip to content

Commit 004efd8

Browse files
committed
Use pcmd->IdxOffset
See ocornut/imgui#4863 for more detail Fixes #198
1 parent 04c549b commit 004efd8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

imgui-SFML.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -965,10 +965,9 @@ void RenderDrawLists(ImDrawData* draw_data) {
965965
glBindTexture(GL_TEXTURE_2D, textureHandle);
966966
glDrawElements(GL_TRIANGLES, (GLsizei)pcmd->ElemCount,
967967
sizeof(ImDrawIdx) == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT,
968-
idx_buffer);
968+
idx_buffer + pcmd->IdxOffset);
969969
}
970970
}
971-
idx_buffer += pcmd->ElemCount;
972971
}
973972
}
974973

0 commit comments

Comments
 (0)