mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-06 15:04:41 +00:00
Implemented safe VBO indices (phew)
This commit is contained in:
parent
e6cca3fda8
commit
35a1538f82
24 changed files with 821 additions and 100 deletions
|
|
@ -40,6 +40,7 @@ import java.nio.*;
|
|||
* @version $Revision$
|
||||
*/
|
||||
abstract class Util {
|
||||
private final static IntBuffer int_buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer();
|
||||
/**
|
||||
* A helper function which is used to get the byte offset in an arbitrary buffer
|
||||
* based on its position
|
||||
|
|
@ -55,4 +56,9 @@ abstract class Util {
|
|||
else
|
||||
return buffer.position();
|
||||
}
|
||||
|
||||
static int getGLInteger(int enum) {
|
||||
CoreGL11.glGetInteger(enum, int_buffer);
|
||||
return int_buffer.get(0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue