Improved createIndexBuffer

This commit is contained in:
Elias Naur 2003-08-03 16:19:09 +00:00
parent 3f18bd15c4
commit f7ce5c39ed
3 changed files with 6 additions and 4 deletions

View File

@ -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.

View File

@ -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);
}
/*

View File

@ -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);
}
/*