Improved createIndexBuffer
This commit is contained in:
parent
3f18bd15c4
commit
f7ce5c39ed
|
@ -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.
|
||||
|
|
|
@ -56,7 +56,8 @@ long int hires_timer; // Hires timer current time
|
|||
JNIEXPORT jobject JNICALL Java_org_lwjgl_Sys_createIndexBuffer
|
||||
(JNIEnv *env, jclass clazz, jint index)
|
||||
{
|
||||
return env->NewDirectByteBuffer((void *)index, 0);
|
||||
void *p = (char *)NULL + index;
|
||||
return env->NewDirectByteBuffer(p, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -57,7 +57,8 @@ __int64 hires_timer; // Hires timer current time
|
|||
JNIEXPORT jobject JNICALL Java_org_lwjgl_Sys_createIndexBuffer
|
||||
(JNIEnv *env, jclass clazz, jint index)
|
||||
{
|
||||
return env->NewDirectByteBuffer((void *)index, 0);
|
||||
void *p = (char *)NULL + index;
|
||||
return env->NewDirectByteBuffer(p, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue