Skip to content

Commit e5b00b6

Browse files
authored
Fixing wrapper.ElementBuffers() (#21)
1 parent 33ae578 commit e5b00b6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/wrapper.zig

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1883,14 +1883,15 @@ pub fn Wrap(comptime bindings: anytype) type {
18831883

18841884
pub fn drawElements(
18851885
mode: PrimitiveType,
1886+
length: u32,
18861887
index_type: enum(Enum) {
18871888
unsigned_byte = UNSIGNED_BYTE,
18881889
unsigned_short = UNSIGNED_SHORT,
18891890
unsigned_int = UNSIGNED_INT,
18901891
},
1891-
indices: []const anyopaque,
1892+
indices: u32, //offset in buffer
18921893
) void {
1893-
bindings.drawElements(@intFromEnum(mode), @intCast(indices.len), @intFromEnum(index_type), indices.ptr);
1894+
bindings.drawElements(@intFromEnum(mode), @intCast(length), @intFromEnum(index_type), @ptrFromInt(indices));
18941895
}
18951896

18961897
pub fn polygonOffset(factor: f32, units: f32) void {

0 commit comments

Comments
 (0)