Added a native NewStringNativeUnsigned to avoid compile warnings
This commit is contained in:
parent
b91cfd8b60
commit
c64dd328f9
|
@ -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() {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -141,7 +141,7 @@ public class NativeMethodStubsGenerator {
|
|||
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(", ");
|
||||
|
|
|
@ -197,6 +197,13 @@ char * GetStringNativeChars(JNIEnv *env, jstring jstr) {
|
|||
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;
|
||||
|
|
|
@ -137,6 +137,7 @@ extern void printfDebug(const char *format, ...);
|
|||
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);
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ static void JNICALL Java_org_lwjgl_openal_AL10_nalGetDoublev(JNIEnv *env, jclass
|
|||
|
||||
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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -843,7 +843,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetTexEnvfv(JNIEnv *env, jc
|
|||
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) {
|
||||
|
|
Loading…
Reference in New Issue