mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-07 07:24:20 +00:00
Buffer checking code
This commit is contained in:
parent
fd56dd232a
commit
061e1a76d1
51 changed files with 499 additions and 655 deletions
|
|
@ -87,7 +87,7 @@ public class ARBVertexProgram extends ARBProgram {
|
|||
public static final int GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB = 0x88B1;
|
||||
public static final int GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B2;
|
||||
public static final int GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B3;
|
||||
|
||||
|
||||
/*
|
||||
* Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
|
||||
* GetFloatv, and GetDoublev:
|
||||
|
|
@ -113,22 +113,22 @@ public class ARBVertexProgram extends ARBProgram {
|
|||
public static native void glVertexAttrib4NubARB(int index, byte x, byte y, byte z, byte w);
|
||||
|
||||
public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, ByteBuffer buffer) {
|
||||
BufferChecks.checkVBOdisabled();
|
||||
BufferChecks.ensureVBOdisabled();
|
||||
nglVertexAttribPointerARB(index, size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, normalized, stride, buffer, buffer.position());
|
||||
}
|
||||
|
||||
public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, ShortBuffer buffer) {
|
||||
BufferChecks.checkVBOdisabled();
|
||||
BufferChecks.ensureVBOdisabled();
|
||||
nglVertexAttribPointerARB(index, size, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, normalized, stride, buffer, buffer.position() << 1);
|
||||
}
|
||||
|
||||
public static void glVertexAttribPointerARB(int index, int size, boolean normalized, int stride, FloatBuffer buffer) {
|
||||
BufferChecks.checkVBOdisabled();
|
||||
BufferChecks.ensureVBOdisabled();
|
||||
nglVertexAttribPointerARB(index, size, GL11.GL_FLOAT, normalized, stride, buffer, buffer.position() << 2);
|
||||
}
|
||||
|
||||
public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, IntBuffer buffer) {
|
||||
BufferChecks.checkVBOdisabled();
|
||||
BufferChecks.ensureVBOdisabled();
|
||||
nglVertexAttribPointerARB(index, size, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, normalized, stride, buffer, buffer.position() << 2);
|
||||
}
|
||||
|
||||
|
|
@ -136,7 +136,7 @@ public class ARBVertexProgram extends ARBProgram {
|
|||
|
||||
// ---------------------------
|
||||
public static void glVertexAttribPointerARB(int index, int size, int type, boolean normalized, int stride, int bufferOffset) {
|
||||
BufferChecks.checkVBOenabled();
|
||||
BufferChecks.ensureVBOenabled();
|
||||
nglVertexAttribPointerARBVBO(index, size, type, normalized, stride, bufferOffset);
|
||||
}
|
||||
|
||||
|
|
@ -149,7 +149,7 @@ public class ARBVertexProgram extends ARBProgram {
|
|||
|
||||
// ---------------------------
|
||||
public static void glGetVertexAttribARB(int index, int pname, FloatBuffer params) {
|
||||
// TODO: check buffer size
|
||||
BufferChecks.checkBuffer(params);
|
||||
nglGetVertexAttribfvARB(index, pname, params, params.position());
|
||||
}
|
||||
|
||||
|
|
@ -158,7 +158,7 @@ public class ARBVertexProgram extends ARBProgram {
|
|||
|
||||
// ---------------------------
|
||||
public static void glGetVertexAttribARB(int index, int pname, IntBuffer params) {
|
||||
// TODO: check buffer size
|
||||
BufferChecks.checkBuffer(params);
|
||||
nglGetVertexAttribivARB(index, pname, params, params.position());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue