mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-07 07:24:20 +00:00
Replaced asserts with proper runtime exceptions
This commit is contained in:
parent
afb8491cfa
commit
c093f3ace1
11 changed files with 1058 additions and 1013 deletions
|
|
@ -67,7 +67,7 @@ public final class ARBVertexShader {
|
|||
// ---------------------------
|
||||
public static void glBindAttribLocationARB(int programObj, int index, ByteBuffer name) {
|
||||
if ( name.get(name.limit() - 1) != 0 ) {
|
||||
throw new RuntimeException("<name> must be a null-terminated string.");
|
||||
throw new IllegalArgumentException("<name> must be a null-terminated string.");
|
||||
}
|
||||
nglBindAttribLocationARB(programObj, index, name, name.position());
|
||||
}
|
||||
|
|
@ -99,7 +99,7 @@ public final class ARBVertexShader {
|
|||
// ---------------------------
|
||||
public static int glGetAttribLocationARB(int programObj, ByteBuffer name) {
|
||||
if ( name.get(name.limit() - 1) != 0 ) {
|
||||
throw new RuntimeException("<name> must be a null-terminated string.");
|
||||
throw new IllegalArgumentException("<name> must be a null-terminated string.");
|
||||
}
|
||||
return nglGetAttribLocationARB(programObj, name, name.position());
|
||||
}
|
||||
|
|
@ -107,4 +107,4 @@ public final class ARBVertexShader {
|
|||
private static native int nglGetAttribLocationARB(int programObj, ByteBuffer name, int nameOffset);
|
||||
// ---------------------------
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue