From: <eli...@us...> - 2006-07-07 10:37:12
|
Revision: 2449 Author: elias_naur Date: 2006-07-07 03:36:26 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2449&view=rev Log Message: ----------- Added a native NewStringNativeUnsigned to avoid compile warnings Modified Paths: -------------- trunk/LWJGL/src/generated/org/lwjgl/opengl/ATITextFragmentShader.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTTimerQuery.java trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java trunk/LWJGL/src/native/common/common_tools.c trunk/LWJGL/src/native/common/common_tools.h trunk/LWJGL/src/native/generated/org_lwjgl_openal_AL10.c trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTTimerQuery.c trunk/LWJGL/src/native/generated/org_lwjgl_opengl_GL11.c Modified: trunk/LWJGL/src/generated/org/lwjgl/opengl/ATITextFragmentShader.java =================================================================== --- trunk/LWJGL/src/generated/org/lwjgl/opengl/ATITextFragmentShader.java 2006-07-05 10:47:15 UTC (rev 2448) +++ trunk/LWJGL/src/generated/org/lwjgl/opengl/ATITextFragmentShader.java 2006-07-07 10:36:26 UTC (rev 2449) @@ -1,24 +1,24 @@ -/* MACHINE GENERATED FILE, DO NOT EDIT */ - -package org.lwjgl.opengl; - -import org.lwjgl.LWJGLException; -import org.lwjgl.BufferChecks; -import java.nio.*; - -public final class ATITextFragmentShader { - /** - * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, - * and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, - * and GetDoublev, and by the <target> parameter of ProgramStringARB, - * BindProgramARB, ProgramEnvParameter4{d,dv,f,fv}ARB, - * ProgramLocalParameter4{d,dv,f,fv}ARB, - * GetProgramEnvParameter{dv,fv}ARB, GetProgramLocalParameter{dv,fv}ARB, - * GetProgramivARB, GetProgramfvATI, and GetProgramStringARB. - */ - public static final int GL_TEXT_FRAGMENT_SHADER_ATI = 0x8200; - - private ATITextFragmentShader() { - } - -} +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; +import java.nio.*; + +public final class ATITextFragmentShader { + /** + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev, and by the <target> parameter of ProgramStringARB, + * BindProgramARB, ProgramEnvParameter4{d,dv,f,fv}ARB, + * ProgramLocalParameter4{d,dv,f,fv}ARB, + * GetProgramEnvParameter{dv,fv}ARB, GetProgramLocalParameter{dv,fv}ARB, + * GetProgramivARB, GetProgramfvATI, and GetProgramStringARB. + */ + public static final int GL_TEXT_FRAGMENT_SHADER_ATI = 0x8200; + + private ATITextFragmentShader() { + } + +} Modified: trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTTimerQuery.java =================================================================== --- trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTTimerQuery.java 2006-07-05 10:47:15 UTC (rev 2448) +++ trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTTimerQuery.java 2006-07-07 10:36:26 UTC (rev 2449) @@ -1,35 +1,35 @@ -/* MACHINE GENERATED FILE, DO NOT EDIT */ - -package org.lwjgl.opengl; - -import org.lwjgl.LWJGLException; -import org.lwjgl.BufferChecks; -import java.nio.*; - -public final class EXTTimerQuery { - /** - * Accepted by the <target> parameter of BeginQuery, EndQuery, and - * GetQueryiv: - */ - public static final int GL_TIME_ELAPSED_EXT = 0x88bf; - - private EXTTimerQuery() { - } - - - public static void glGetQueryObjecti64EXT(int id, int pname, LongBuffer params) { - long function_pointer = GLContext.getCapabilities().EXT_timer_query_glGetQueryObjecti64vEXT_pointer; - BufferChecks.checkFunctionAddress(function_pointer); - BufferChecks.checkBuffer(params, 1); - nglGetQueryObjecti64vEXT(id, pname, params, params.position(), function_pointer); - } - private static native void nglGetQueryObjecti64vEXT(int id, int pname, LongBuffer params, int params_position, long function_pointer); - - public static void glGetQueryObjectui64EXT(int id, int pname, LongBuffer params) { - long function_pointer = GLContext.getCapabilities().EXT_timer_query_glGetQueryObjectui64vEXT_pointer; - BufferChecks.checkFunctionAddress(function_pointer); - BufferChecks.checkBuffer(params, 1); - nglGetQueryObjectui64vEXT(id, pname, params, params.position(), function_pointer); - } - private static native void nglGetQueryObjectui64vEXT(int id, int pname, LongBuffer params, int params_position, long function_pointer); -} +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; +import java.nio.*; + +public final class EXTTimerQuery { + /** + * Accepted by the <target> parameter of BeginQuery, EndQuery, and + * GetQueryiv: + */ + public static final int GL_TIME_ELAPSED_EXT = 0x88bf; + + private EXTTimerQuery() { + } + + + public static void glGetQueryObjectEXT(int id, int pname, LongBuffer params) { + long function_pointer = GLContext.getCapabilities().EXT_timer_query_glGetQueryObjecti64vEXT_pointer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetQueryObjecti64vEXT(id, pname, params, params.position(), function_pointer); + } + private static native void nglGetQueryObjecti64vEXT(int id, int pname, LongBuffer params, int params_position, long function_pointer); + + public static void glGetQueryObjectuEXT(int id, int pname, LongBuffer params) { + long function_pointer = GLContext.getCapabilities().EXT_timer_query_glGetQueryObjectui64vEXT_pointer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetQueryObjectui64vEXT(id, pname, params, params.position(), function_pointer); + } + private static native void nglGetQueryObjectui64vEXT(int id, int pname, LongBuffer params, int params_position, long function_pointer); +} Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java 2006-07-05 10:47:15 UTC (rev 2448) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java 2006-07-07 10:36:26 UTC (rev 2449) @@ -141,7 +141,7 @@ else writer.print("safeNewBuffer(env, "); } else if (String.class.equals(java_result_type)) - writer.print("NewStringNative(env, "); + writer.print("NewStringNativeUnsigned(env, "); writer.print(Utils.RESULT_VAR_NAME); if (Buffer.class.isAssignableFrom(java_result_type)) { writer.print(", "); Modified: trunk/LWJGL/src/native/common/common_tools.c =================================================================== --- trunk/LWJGL/src/native/common/common_tools.c 2006-07-05 10:47:15 UTC (rev 2448) +++ trunk/LWJGL/src/native/common/common_tools.c 2006-07-07 10:36:26 UTC (rev 2449) @@ -197,6 +197,13 @@ return (char*) result; } +/* creates locale specific string, unsigned argument to + * match GLuchar and ALuchar types + */ +jstring NewStringNativeUnsigned(JNIEnv *env, const unsigned char *str) { + return NewStringNative(env, (const char *)str); +} + // creates locale specific string jstring NewStringNative(JNIEnv *env, const char *str) { jclass jcls_str; Modified: trunk/LWJGL/src/native/common/common_tools.h =================================================================== --- trunk/LWJGL/src/native/common/common_tools.h 2006-07-05 10:47:15 UTC (rev 2448) +++ trunk/LWJGL/src/native/common/common_tools.h 2006-07-07 10:36:26 UTC (rev 2449) @@ -137,6 +137,7 @@ extern bool getBooleanProperty(JNIEnv *env, const char* propertyName); extern char * GetStringNativeChars(JNIEnv *env, jstring jstr); extern jstring NewStringNative(JNIEnv *env, const char *str); +extern jstring NewStringNativeUnsigned(JNIEnv *env, const unsigned char *str); extern jobject newJavaManagedByteBuffer(JNIEnv *env, const int size); extern bool positionBuffer(JNIEnv *env, jobject buffer, jint position); Modified: trunk/LWJGL/src/native/generated/org_lwjgl_openal_AL10.c =================================================================== --- trunk/LWJGL/src/native/generated/org_lwjgl_openal_AL10.c 2006-07-05 10:47:15 UTC (rev 2448) +++ trunk/LWJGL/src/native/generated/org_lwjgl_openal_AL10.c 2006-07-07 10:36:26 UTC (rev 2449) @@ -155,7 +155,7 @@ static jobject JNICALL Java_org_lwjgl_openal_AL10_alGetString(JNIEnv *env, jclass clazz, jint pname) { ALubyte * __result = alGetString(pname); - return NewStringNative(env, __result); + return NewStringNativeUnsigned(env, __result); } static jint JNICALL Java_org_lwjgl_openal_AL10_alGetError(JNIEnv *env, jclass clazz) { Modified: trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTTimerQuery.c =================================================================== --- trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTTimerQuery.c 2006-07-05 10:47:15 UTC (rev 2448) +++ trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTTimerQuery.c 2006-07-07 10:36:26 UTC (rev 2449) @@ -1,20 +1,20 @@ -/* MACHINE GENERATED FILE, DO NOT EDIT */ - -#include <jni.h> -#include "extgl.h" - -typedef void (APIENTRY *glGetQueryObjecti64vEXTPROC) (GLuint id, GLenum pname, GLint64EXT * params); -typedef void (APIENTRY *glGetQueryObjectui64vEXTPROC) (GLuint id, GLenum pname, GLuint64EXT * params); - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTimerQuery_nglGetQueryObjecti64vEXT(JNIEnv *env, jclass clazz, jint id, jint pname, jobject params, jint params_position, jlong function_pointer) { - GLint64EXT *params_address = ((GLint64EXT *)(*env)->GetDirectBufferAddress(env, params)) + params_position; - glGetQueryObjecti64vEXTPROC glGetQueryObjecti64vEXT = (glGetQueryObjecti64vEXTPROC)((intptr_t)function_pointer); - glGetQueryObjecti64vEXT(id, pname, params_address); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTimerQuery_nglGetQueryObjectui64vEXT(JNIEnv *env, jclass clazz, jint id, jint pname, jobject params, jint params_position, jlong function_pointer) { - GLuint64EXT *params_address = ((GLuint64EXT *)(*env)->GetDirectBufferAddress(env, params)) + params_position; - glGetQueryObjectui64vEXTPROC glGetQueryObjectui64vEXT = (glGetQueryObjectui64vEXTPROC)((intptr_t)function_pointer); - glGetQueryObjectui64vEXT(id, pname, params_address); -} - +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include <jni.h> +#include "extgl.h" + +typedef void (APIENTRY *glGetQueryObjecti64vEXTPROC) (GLuint id, GLenum pname, GLint64EXT * params); +typedef void (APIENTRY *glGetQueryObjectui64vEXTPROC) (GLuint id, GLenum pname, GLuint64EXT * params); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTimerQuery_nglGetQueryObjecti64vEXT(JNIEnv *env, jclass clazz, jint id, jint pname, jobject params, jint params_position, jlong function_pointer) { + GLint64EXT *params_address = ((GLint64EXT *)(*env)->GetDirectBufferAddress(env, params)) + params_position; + glGetQueryObjecti64vEXTPROC glGetQueryObjecti64vEXT = (glGetQueryObjecti64vEXTPROC)((intptr_t)function_pointer); + glGetQueryObjecti64vEXT(id, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTimerQuery_nglGetQueryObjectui64vEXT(JNIEnv *env, jclass clazz, jint id, jint pname, jobject params, jint params_position, jlong function_pointer) { + GLuint64EXT *params_address = ((GLuint64EXT *)(*env)->GetDirectBufferAddress(env, params)) + params_position; + glGetQueryObjectui64vEXTPROC glGetQueryObjectui64vEXT = (glGetQueryObjectui64vEXTPROC)((intptr_t)function_pointer); + glGetQueryObjectui64vEXT(id, pname, params_address); +} + Modified: trunk/LWJGL/src/native/generated/org_lwjgl_opengl_GL11.c =================================================================== --- trunk/LWJGL/src/native/generated/org_lwjgl_opengl_GL11.c 2006-07-05 10:47:15 UTC (rev 2448) +++ trunk/LWJGL/src/native/generated/org_lwjgl_opengl_GL11.c 2006-07-07 10:36:26 UTC (rev 2449) @@ -843,7 +843,7 @@ JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_GL11_nglGetString(JNIEnv *env, jclass clazz, jint name, jlong function_pointer) { glGetStringPROC glGetString = (glGetStringPROC)((intptr_t)function_pointer); const GLubyte * __result = glGetString(name); - return NewStringNative(env, __result); + return NewStringNativeUnsigned(env, __result); } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetPolygonStipple(JNIEnv *env, jclass clazz, jobject mask, jint mask_position, jlong function_pointer) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |