Skip to content

Commit

Permalink
Merge pull request #110 from noblemaster/SupportIntArrayGL20
Browse files Browse the repository at this point in the history
Support for IntBuffer in TeaGL20.glBuffer*Data(...)
  • Loading branch information
xpenatan committed Oct 6, 2023
2 parents c62954c + aaa2241 commit 27d3247
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ public void glBufferData(int target, int size, Buffer data, int usage) {
if(data instanceof FloatBuffer) {
gl.bufferData(target, copy((FloatBuffer)data), usage);
}
else if(data instanceof IntBuffer) {
gl.bufferData(target, copy((IntBuffer)data), usage);
}
else if(data instanceof ShortBuffer) {
gl.bufferData(target, copy((ShortBuffer)data), usage);
}
Expand All @@ -323,6 +326,9 @@ public void glBufferSubData(int target, int offset, int size, Buffer data) {
if(data instanceof FloatBuffer) {
gl.bufferSubData(target, offset, copy((FloatBuffer)data));
}
else if(data instanceof IntBuffer) {
gl.bufferSubData(target, offset, copy((IntBuffer)data));
}
else if(data instanceof ShortBuffer) {
gl.bufferSubData(target, offset, copy((ShortBuffer)data));
}
Expand Down

0 comments on commit 27d3247

Please sign in to comment.