Added createARBVBOBuffer to enable VBO indexing with Buffers
This commit is contained in:
parent
926121d83f
commit
794c802253
|
@ -134,6 +134,23 @@ public final class Sys {
|
|||
*/
|
||||
private static native ByteBuffer nGetNULLValue();
|
||||
|
||||
/**
|
||||
* Create a buffer representing an index into a ARB_vertex_buffer_object buffer.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* ByteBuffer b = Sys.createARBVBOBuffer(0);
|
||||
* gl.glVertexPointer(3, GL.GL_INT, 0, b);
|
||||
*
|
||||
* is equivalent to the C call:
|
||||
*
|
||||
* glVertexPointer(3, GL.GL_INT, 0, 0);
|
||||
*
|
||||
* @param index The VBO index to represent
|
||||
* @return a ByteBuffer representing the VBO index
|
||||
*/
|
||||
public static native ByteBuffer createARBVBOBuffer(int index);
|
||||
|
||||
/**
|
||||
* Obtains the number of ticks that the hires timer does in a second.
|
||||
*
|
||||
|
|
|
@ -29,6 +29,14 @@ extern "C" {
|
|||
JNIEXPORT jobject JNICALL Java_org_lwjgl_Sys_nGetNULLValue
|
||||
(JNIEnv *, jclass);
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_Sys
|
||||
* Method: createARBVBOBuffer
|
||||
* Signature: (I)Ljava/nio/ByteBuffer;
|
||||
*/
|
||||
JNIEXPORT jobject JNICALL Java_org_lwjgl_Sys_createARBVBOBuffer
|
||||
(JNIEnv *, jclass, jint);
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_Sys
|
||||
* Method: getTimerResolution
|
||||
|
|
|
@ -51,8 +51,8 @@ if test "x$JAVA_HOME" = x; then
|
|||
else
|
||||
AC_MSG_RESULT($JAVA_HOME)
|
||||
JAVA_HOME="$JAVA_HOME"
|
||||
CPPFLAGS="$CPPFLAGS -D_DEBUG -fno-rtti -fno-exceptions -pthread -D_X11 -Wall -I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
|
||||
CFLAGS="$CFLAGS -D_DEBUG -pthread -D_X11 -Wall -I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
|
||||
CPPFLAGS="$CPPFLAGS -fno-rtti -fno-exceptions -pthread -D_X11 -Wall -I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
|
||||
CFLAGS="$CFLAGS -pthread -D_X11 -Wall -I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
|
||||
fi
|
||||
|
||||
dnl Checks for libraries.
|
||||
|
|
|
@ -59,6 +59,17 @@ JNIEXPORT jobject JNICALL Java_org_lwjgl_Sys_nGetNULLValue
|
|||
return env->NewDirectByteBuffer(NULL, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_Sys
|
||||
* Method: createARBVBOBuffer
|
||||
* Signature: (I)Ljava/nio/ByteBuffer;
|
||||
*/
|
||||
JNIEXPORT jobject JNICALL Java_org_lwjgl_Sys_createARBVBOBuffer
|
||||
(JNIEnv *env, jclass clazz, jint address)
|
||||
{
|
||||
return env->NewDirectByteBuffer((void *)address, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_Sys
|
||||
* Method: getTimerResolution
|
||||
|
|
|
@ -60,6 +60,17 @@ JNIEXPORT jobject JNICALL Java_org_lwjgl_Sys_nGetNULLValue
|
|||
return env->NewDirectByteBuffer(NULL, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_Sys
|
||||
* Method: createARBVBOBuffer
|
||||
* Signature: (I)Ljava/nio/ByteBuffer;
|
||||
*/
|
||||
JNIEXPORT jobject JNICALL Java_org_lwjgl_Sys_createARBVBOBuffer
|
||||
(JNIEnv *env, jclass clazz, jint address)
|
||||
{
|
||||
return env->NewDirectByteBuffer((void *)address, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_Sys
|
||||
* Method: getTimerResolution
|
||||
|
|
Loading…
Reference in New Issue