mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-06 06:53:59 +00:00
Buffer checking code
This commit is contained in:
parent
fd56dd232a
commit
061e1a76d1
51 changed files with 499 additions and 655 deletions
|
|
@ -39,7 +39,6 @@
|
|||
*/
|
||||
package org.lwjgl.opengl;
|
||||
|
||||
import java.nio.BufferUnderflowException;
|
||||
import java.nio.FloatBuffer;
|
||||
|
||||
public class ARBTransposeMatrix {
|
||||
|
|
@ -47,26 +46,15 @@ public class ARBTransposeMatrix {
|
|||
public static final int GL_TRANSPOSE_PROJECTION_MATRIX_ARB = 0x84E4;
|
||||
public static final int GL_TRANSPOSE_TEXTURE_MATRIX_ARB = 0x84E5;
|
||||
public static final int GL_TRANSPOSE_COLOR_MATRIX_ARB = 0x84E6;
|
||||
|
||||
static {
|
||||
BufferChecks.putGetMap(GL_TRANSPOSE_MODELVIEW_MATRIX_ARB, 16);
|
||||
BufferChecks.putGetMap(GL_TRANSPOSE_PROJECTION_MATRIX_ARB, 16);
|
||||
BufferChecks.putGetMap(GL_TRANSPOSE_TEXTURE_MATRIX_ARB, 16);
|
||||
BufferChecks.putGetMap(GL_TRANSPOSE_COLOR_MATRIX_ARB, 16);
|
||||
}
|
||||
|
||||
public static void glLoadTransposeMatrixARB(FloatBuffer pfMtx) {
|
||||
if (pfMtx.remaining() < 16) {
|
||||
throw new BufferUnderflowException();
|
||||
}
|
||||
BufferChecks.checkBuffer(pfMtx);
|
||||
nglLoadTransposeMatrixfARB(pfMtx, pfMtx.position());
|
||||
}
|
||||
private static native void nglLoadTransposeMatrixfARB(FloatBuffer pfMtx, int pfMtx_offset);
|
||||
|
||||
public static void glMultTransposeMatrixfARB(FloatBuffer pfMtx) {
|
||||
if (pfMtx.remaining() < 16) {
|
||||
throw new BufferUnderflowException();
|
||||
}
|
||||
BufferChecks.checkBuffer(pfMtx);
|
||||
nglMultTransposeMatrixfARB(pfMtx, pfMtx.position());
|
||||
}
|
||||
private static native void nglMultTransposeMatrixfARB(FloatBuffer pfMtx, int pfMtx_offset);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue