Added glTexParameter[f|i]v to GL11.java

This commit is contained in:
Elias Naur 2004-01-26 17:12:22 +00:00
parent ea2f9a3910
commit b21a84ff7c
3 changed files with 36 additions and 0 deletions

View file

@ -1198,6 +1198,14 @@ public abstract class GL11 {
private static native void nglTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, Buffer pixels, int pixels_offset);
public static native void glTexParameterf(int target, int pname, float param);
public static native void glTexParameteri(int target, int pname, int param);
public static void glTexParameter(int target, int pname, FloatBuffer param) {
nglTexParameterfv(target, pname, param, param.position());
}
private static native void nglTexParameterfv(int target, int pname, FloatBuffer param, int param_position);
public static void glTexParameter(int target, int pname, IntBuffer param) {
nglTexParameteriv(target, pname, param, param.position());
}
private static native void nglTexParameteriv(int target, int pname, IntBuffer param, int param_position);
public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ByteBuffer pixels) {
nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels, pixels.position());
}

View file

@ -1936,6 +1936,18 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexSubImage1D(JNIEnv * env,
CHECK_GL_ERROR
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexParameterfv
(JNIEnv *env, jclass clazz, jint target, jint pname, jobject param, jint param_offset) {
GLfloat *address = param_offset + (GLfloat *)env->GetDirectBufferAddress(param);
glTexParameterfv(target, pname, address);
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexParameteriv
(JNIEnv *env, jclass clazz, jint target, jint pname, jobject param, jint param_offset) {
GLint *address = param_offset + (GLint *)env->GetDirectBufferAddress(param);
glTexParameteriv(target, pname, address);
}
/*
* Class: org_lwjgl_opengl_GL11
* Method: glTexParameterf

View file

@ -2545,6 +2545,22 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glTexParameterf
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_glTexParameteri
(JNIEnv *, jclass, jint, jint, jint);
/*
* Class: org_lwjgl_opengl_GL11
* Method: nglTexParameterfv
* Signature: (IILjava/nio/FloatBuffer;I)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexParameterfv
(JNIEnv *, jclass, jint, jint, jobject, jint);
/*
* Class: org_lwjgl_opengl_GL11
* Method: nglTexParameteriv
* Signature: (IILjava/nio/IntBuffer;I)V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexParameteriv
(JNIEnv *, jclass, jint, jint, jobject, jint);
/*
* Class: org_lwjgl_opengl_GL11
* Method: nglTexImage2D