fix(api): fix incorrect ImDrawData#getCmdListCmdBufferTextureId return type (#272)
Method must return long to be consistent with API in general.
This commit is contained in:
1 parent
c0ea002d07
commit
36d9e3a13c
3 files changed
+4
-4
No files matched your search
@@ -474,14 +474,14 @@ public class ImGuiImplGl3 {
|
||||
glScissor((int) clipMinX, (int) (fbHeight - clipMaxY), (int) (clipMaxX - clipMinX), (int) (clipMaxY - clipMinY));
|
||||
|
||||
// Bind texture, Draw
|
||||
final int textureId = drawData.getCmdListCmdBufferTextureId(n, cmdIdx);
|
||||
final long textureId = drawData.getCmdListCmdBufferTextureId(n, cmdIdx);
|
||||
final int elemCount = drawData.getCmdListCmdBufferElemCount(n, cmdIdx);
|
||||
final int idxOffset = drawData.getCmdListCmdBufferIdxOffset(n, cmdIdx);
|
||||
final int vtxOffset = drawData.getCmdListCmdBufferVtxOffset(n, cmdIdx);
|
||||
final long indices = idxOffset * (long) ImDrawData.sizeOfImDrawIdx();
|
||||
final int type = ImDrawData.sizeOfImDrawIdx() == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT;
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, textureId);
|
||||
glBindTexture(GL_TEXTURE_2D, (int) textureId);
|
||||
|
||||
if (data.glVersion >= 320) {
|
||||
glDrawElementsBaseVertex(GL_TRIANGLES, elemCount, type, indices, vtxOffset);
|
||||
|
||||
Reference in new issue
Block a user