diff options
author | Kenneth Russel <[email protected]> | 2005-02-07 07:01:48 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2005-02-07 07:01:48 +0000 |
commit | f303d66c1a5c33fa4e392117919af87665dedc2b (patch) | |
tree | d750242fb098e376fafd1f712b1b034c760ff7e2 | |
parent | 1a4a48f2b5fc3ba7eed815bf1920801f4b0b429d (diff) |
Hooked in GKW's Java port of the GLU library's mipmap and image
scaling operations. Added new ForceProcAddressGen directive to GlueGen
to force the addresses of the C routines to be fetched even though the
functions were being ignored by the core JavaEmitter. Cut down on the
number of variants of gluScaleImage and associated routines. Changed
the Java signatures of the affected methods to take Buffer again
instead of ByteBuffer (as was done during prototyping) to attempt to
maintain binary compatibility with current JOGL programs. Fixed bug /
problem in gluScaleImage implementation where incorrect scaling of
pixel values was being applied in Image.empty_image(); there may be
additional problems here for other pixel types. Put debugging code in
BuildMipmap under jogl.debug.BuildMipmap System property.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@215 232f8b59-042b-4e1e-8c03-345bb8c30851
-rw-r--r-- | make/glu-common.cfg | 28 | ||||
-rw-r--r-- | make/glu-impl-common-CustomCCode.c | 831 | ||||
-rw-r--r-- | make/glu-impl-common-CustomJavaCode.java | 892 | ||||
-rw-r--r-- | make/glu-impl-common.cfg | 1 | ||||
-rw-r--r-- | make/glu-impl-win32.cfg | 6 | ||||
-rw-r--r-- | make/glu-interface-common-CustomJavaCode.java | 112 | ||||
-rw-r--r-- | src/net/java/games/gluegen/opengl/GLEmitter.java | 18 | ||||
-rw-r--r-- | src/net/java/games/jogl/impl/mipmap/BuildMipmap.java | 79 | ||||
-rw-r--r-- | src/net/java/games/jogl/impl/mipmap/Image.java | 4 |
9 files changed, 1916 insertions, 55 deletions
diff --git a/make/glu-common.cfg b/make/glu-common.cfg index 65919e410..917a95a62 100644 --- a/make/glu-common.cfg +++ b/make/glu-common.cfg @@ -176,3 +176,31 @@ ManuallyImplement gluOrtho2D ManuallyImplement gluPerspective ManuallyImplement gluLookAt ManuallyImplement gluPickMatrix + +# +# ------------------------ +# Mipmaps +# ------------------------ +# +# Ignore the mipmap routines and use GKW's Java port instead. +# Currently the Java and native code have fallback paths to the +# C code, but this will be removed in a future release. + +Ignore gluBuild1DMipmapLevels +Ignore gluBuild1DMipmaps +Ignore gluBuild2DMipmapLevels +Ignore gluBuild2DMipmaps +Ignore gluBuild3DMipmapLevels +Ignore gluBuild3DMipmaps +Ignore gluScaleImage + +# Must force proc address generation for these routines, though, since +# we still fall back on the C implementations + +ForceProcAddressGen gluBuild1DMipmapLevels +ForceProcAddressGen gluBuild1DMipmaps +ForceProcAddressGen gluBuild2DMipmapLevels +ForceProcAddressGen gluBuild2DMipmaps +ForceProcAddressGen gluBuild3DMipmapLevels +ForceProcAddressGen gluBuild3DMipmaps +ForceProcAddressGen gluScaleImage diff --git a/make/glu-impl-common-CustomCCode.c b/make/glu-impl-common-CustomCCode.c index 9a6a8d2ab..5a3f645c5 100644 --- a/make/glu-impl-common-CustomCCode.c +++ b/make/glu-impl-common-CustomCCode.c @@ -1,2 +1,833 @@ /* Include the OpenGL GLU header */ #include <GL/glu.h> + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild1DMipmapLevels(int target, int internalFormat, int width, int format, int type, int level, int base, int max, byte[] data) + * C function: GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild1DMipmapLevels__IIIIIIII_3BJ(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint format, jint type, jint level, jint base, jint max, jbyteArray data, jlong glProcAddress) { + PFNGLUBUILD1DMIPMAPLEVELSPROC ptr_gluBuild1DMipmapLevels; + void * _ptr8 = NULL; + GLint _res; + ptr_gluBuild1DMipmapLevels = (PFNGLUBUILD1DMIPMAPLEVELSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild1DMipmapLevels != NULL); + if (data != NULL) { + _ptr8 = (void *) (*env)->GetPrimitiveArrayCritical(env, data, NULL); + } + _res = (* ptr_gluBuild1DMipmapLevels) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLenum) format, (GLenum) type, (GLint) level, (GLint) base, (GLint) max, (void *) _ptr8); + if (data != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, data, _ptr8, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild1DMipmapLevels(int target, int internalFormat, int width, int format, int type, int level, int base, int max, short[] data) + * C function: GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild1DMipmapLevels__IIIIIIII_3SJ(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint format, jint type, jint level, jint base, jint max, jshortArray data, jlong glProcAddress) { + PFNGLUBUILD1DMIPMAPLEVELSPROC ptr_gluBuild1DMipmapLevels; + void * _ptr8 = NULL; + GLint _res; + ptr_gluBuild1DMipmapLevels = (PFNGLUBUILD1DMIPMAPLEVELSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild1DMipmapLevels != NULL); + if (data != NULL) { + _ptr8 = (void *) (*env)->GetPrimitiveArrayCritical(env, data, NULL); + } + _res = (* ptr_gluBuild1DMipmapLevels) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLenum) format, (GLenum) type, (GLint) level, (GLint) base, (GLint) max, (void *) _ptr8); + if (data != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, data, _ptr8, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild1DMipmapLevels(int target, int internalFormat, int width, int format, int type, int level, int base, int max, int[] data) + * C function: GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild1DMipmapLevels__IIIIIIII_3IJ(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint format, jint type, jint level, jint base, jint max, jintArray data, jlong glProcAddress) { + PFNGLUBUILD1DMIPMAPLEVELSPROC ptr_gluBuild1DMipmapLevels; + void * _ptr8 = NULL; + GLint _res; + ptr_gluBuild1DMipmapLevels = (PFNGLUBUILD1DMIPMAPLEVELSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild1DMipmapLevels != NULL); + if (data != NULL) { + _ptr8 = (void *) (*env)->GetPrimitiveArrayCritical(env, data, NULL); + } + _res = (* ptr_gluBuild1DMipmapLevels) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLenum) format, (GLenum) type, (GLint) level, (GLint) base, (GLint) max, (void *) _ptr8); + if (data != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, data, _ptr8, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild1DMipmapLevels(int target, int internalFormat, int width, int format, int type, int level, int base, int max, float[] data) + * C function: GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild1DMipmapLevels__IIIIIIII_3FJ(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint format, jint type, jint level, jint base, jint max, jfloatArray data, jlong glProcAddress) { + PFNGLUBUILD1DMIPMAPLEVELSPROC ptr_gluBuild1DMipmapLevels; + void * _ptr8 = NULL; + GLint _res; + ptr_gluBuild1DMipmapLevels = (PFNGLUBUILD1DMIPMAPLEVELSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild1DMipmapLevels != NULL); + if (data != NULL) { + _ptr8 = (void *) (*env)->GetPrimitiveArrayCritical(env, data, NULL); + } + _res = (* ptr_gluBuild1DMipmapLevels) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLenum) format, (GLenum) type, (GLint) level, (GLint) base, (GLint) max, (void *) _ptr8); + if (data != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, data, _ptr8, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild1DMipmapLevels(int target, int internalFormat, int width, int format, int type, int level, int base, int max, java.nio.ByteBuffer data) + * C function: GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild1DMipmapLevels__IIIIIIIILjava_nio_Buffer_2J(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint format, jint type, jint level, jint base, jint max, jobject data, jlong glProcAddress) { + PFNGLUBUILD1DMIPMAPLEVELSPROC ptr_gluBuild1DMipmapLevels; + void * _ptr8 = NULL; + GLint _res; + if (data != NULL) { + _ptr8 = (void *) (*env)->GetDirectBufferAddress(env, data); + } else { + _ptr8 = NULL; + } + ptr_gluBuild1DMipmapLevels = (PFNGLUBUILD1DMIPMAPLEVELSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild1DMipmapLevels != NULL); + _res = (* ptr_gluBuild1DMipmapLevels) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLenum) format, (GLenum) type, (GLint) level, (GLint) base, (GLint) max, (void *) _ptr8); + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild1DMipmaps(int target, int internalFormat, int width, int format, int type, byte[] data) + * C function: GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild1DMipmaps__IIIII_3BJ(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint format, jint type, jbyteArray data, jlong glProcAddress) { + PFNGLUBUILD1DMIPMAPSPROC ptr_gluBuild1DMipmaps; + void * _ptr5 = NULL; + GLint _res; + ptr_gluBuild1DMipmaps = (PFNGLUBUILD1DMIPMAPSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild1DMipmaps != NULL); + if (data != NULL) { + _ptr5 = (void *) (*env)->GetPrimitiveArrayCritical(env, data, NULL); + } + _res = (* ptr_gluBuild1DMipmaps) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLenum) format, (GLenum) type, (void *) _ptr5); + if (data != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, data, _ptr5, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild1DMipmaps(int target, int internalFormat, int width, int format, int type, short[] data) + * C function: GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild1DMipmaps__IIIII_3SJ(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint format, jint type, jshortArray data, jlong glProcAddress) { + PFNGLUBUILD1DMIPMAPSPROC ptr_gluBuild1DMipmaps; + void * _ptr5 = NULL; + GLint _res; + ptr_gluBuild1DMipmaps = (PFNGLUBUILD1DMIPMAPSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild1DMipmaps != NULL); + if (data != NULL) { + _ptr5 = (void *) (*env)->GetPrimitiveArrayCritical(env, data, NULL); + } + _res = (* ptr_gluBuild1DMipmaps) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLenum) format, (GLenum) type, (void *) _ptr5); + if (data != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, data, _ptr5, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild1DMipmaps(int target, int internalFormat, int width, int format, int type, int[] data) + * C function: GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild1DMipmaps__IIIII_3IJ(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint format, jint type, jintArray data, jlong glProcAddress) { + PFNGLUBUILD1DMIPMAPSPROC ptr_gluBuild1DMipmaps; + void * _ptr5 = NULL; + GLint _res; + ptr_gluBuild1DMipmaps = (PFNGLUBUILD1DMIPMAPSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild1DMipmaps != NULL); + if (data != NULL) { + _ptr5 = (void *) (*env)->GetPrimitiveArrayCritical(env, data, NULL); + } + _res = (* ptr_gluBuild1DMipmaps) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLenum) format, (GLenum) type, (void *) _ptr5); + if (data != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, data, _ptr5, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild1DMipmaps(int target, int internalFormat, int width, int format, int type, float[] data) + * C function: GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild1DMipmaps__IIIII_3FJ(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint format, jint type, jfloatArray data, jlong glProcAddress) { + PFNGLUBUILD1DMIPMAPSPROC ptr_gluBuild1DMipmaps; + void * _ptr5 = NULL; + GLint _res; + ptr_gluBuild1DMipmaps = (PFNGLUBUILD1DMIPMAPSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild1DMipmaps != NULL); + if (data != NULL) { + _ptr5 = (void *) (*env)->GetPrimitiveArrayCritical(env, data, NULL); + } + _res = (* ptr_gluBuild1DMipmaps) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLenum) format, (GLenum) type, (void *) _ptr5); + if (data != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, data, _ptr5, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild1DMipmaps(int target, int internalFormat, int width, int format, int type, java.nio.ByteBuffer data) + * C function: GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild1DMipmaps__IIIIILjava_nio_Buffer_2J(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint format, jint type, jobject data, jlong glProcAddress) { + PFNGLUBUILD1DMIPMAPSPROC ptr_gluBuild1DMipmaps; + void * _ptr5 = NULL; + GLint _res; + if (data != NULL) { + _ptr5 = (void *) (*env)->GetDirectBufferAddress(env, data); + } else { + _ptr5 = NULL; + } + ptr_gluBuild1DMipmaps = (PFNGLUBUILD1DMIPMAPSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild1DMipmaps != NULL); + _res = (* ptr_gluBuild1DMipmaps) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLenum) format, (GLenum) type, (void *) _ptr5); + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild2DMipmapLevels(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, byte[] data) + * C function: GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild2DMipmapLevels__IIIIIIIII_3BJ(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint height, jint format, jint type, jint level, jint base, jint max, jbyteArray data, jlong glProcAddress) { + PFNGLUBUILD2DMIPMAPLEVELSPROC ptr_gluBuild2DMipmapLevels; + void * _ptr9 = NULL; + GLint _res; + ptr_gluBuild2DMipmapLevels = (PFNGLUBUILD2DMIPMAPLEVELSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild2DMipmapLevels != NULL); + if (data != NULL) { + _ptr9 = (void *) (*env)->GetPrimitiveArrayCritical(env, data, NULL); + } + _res = (* ptr_gluBuild2DMipmapLevels) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLsizei) height, (GLenum) format, (GLenum) type, (GLint) level, (GLint) base, (GLint) max, (void *) _ptr9); + if (data != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, data, _ptr9, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild2DMipmapLevels(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, short[] data) + * C function: GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild2DMipmapLevels__IIIIIIIII_3SJ(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint height, jint format, jint type, jint level, jint base, jint max, jshortArray data, jlong glProcAddress) { + PFNGLUBUILD2DMIPMAPLEVELSPROC ptr_gluBuild2DMipmapLevels; + void * _ptr9 = NULL; + GLint _res; + ptr_gluBuild2DMipmapLevels = (PFNGLUBUILD2DMIPMAPLEVELSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild2DMipmapLevels != NULL); + if (data != NULL) { + _ptr9 = (void *) (*env)->GetPrimitiveArrayCritical(env, data, NULL); + } + _res = (* ptr_gluBuild2DMipmapLevels) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLsizei) height, (GLenum) format, (GLenum) type, (GLint) level, (GLint) base, (GLint) max, (void *) _ptr9); + if (data != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, data, _ptr9, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild2DMipmapLevels(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, int[] data) + * C function: GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild2DMipmapLevels__IIIIIIIII_3IJ(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint height, jint format, jint type, jint level, jint base, jint max, jintArray data, jlong glProcAddress) { + PFNGLUBUILD2DMIPMAPLEVELSPROC ptr_gluBuild2DMipmapLevels; + void * _ptr9 = NULL; + GLint _res; + ptr_gluBuild2DMipmapLevels = (PFNGLUBUILD2DMIPMAPLEVELSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild2DMipmapLevels != NULL); + if (data != NULL) { + _ptr9 = (void *) (*env)->GetPrimitiveArrayCritical(env, data, NULL); + } + _res = (* ptr_gluBuild2DMipmapLevels) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLsizei) height, (GLenum) format, (GLenum) type, (GLint) level, (GLint) base, (GLint) max, (void *) _ptr9); + if (data != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, data, _ptr9, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild2DMipmapLevels(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, float[] data) + * C function: GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild2DMipmapLevels__IIIIIIIII_3FJ(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint height, jint format, jint type, jint level, jint base, jint max, jfloatArray data, jlong glProcAddress) { + PFNGLUBUILD2DMIPMAPLEVELSPROC ptr_gluBuild2DMipmapLevels; + void * _ptr9 = NULL; + GLint _res; + ptr_gluBuild2DMipmapLevels = (PFNGLUBUILD2DMIPMAPLEVELSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild2DMipmapLevels != NULL); + if (data != NULL) { + _ptr9 = (void *) (*env)->GetPrimitiveArrayCritical(env, data, NULL); + } + _res = (* ptr_gluBuild2DMipmapLevels) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLsizei) height, (GLenum) format, (GLenum) type, (GLint) level, (GLint) base, (GLint) max, (void *) _ptr9); + if (data != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, data, _ptr9, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild2DMipmapLevels(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, java.nio.ByteBuffer data) + * C function: GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild2DMipmapLevels__IIIIIIIIILjava_nio_Buffer_2J(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint height, jint format, jint type, jint level, jint base, jint max, jobject data, jlong glProcAddress) { + PFNGLUBUILD2DMIPMAPLEVELSPROC ptr_gluBuild2DMipmapLevels; + void * _ptr9 = NULL; + GLint _res; + if (data != NULL) { + _ptr9 = (void *) (*env)->GetDirectBufferAddress(env, data); + } else { + _ptr9 = NULL; + } + ptr_gluBuild2DMipmapLevels = (PFNGLUBUILD2DMIPMAPLEVELSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild2DMipmapLevels != NULL); + _res = (* ptr_gluBuild2DMipmapLevels) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLsizei) height, (GLenum) format, (GLenum) type, (GLint) level, (GLint) base, (GLint) max, (void *) _ptr9); + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild2DMipmaps(int target, int internalFormat, int width, int height, int format, int type, byte[] data) + * C function: GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild2DMipmaps__IIIIII_3BJ(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint height, jint format, jint type, jbyteArray data, jlong glProcAddress) { + PFNGLUBUILD2DMIPMAPSPROC ptr_gluBuild2DMipmaps; + void * _ptr6 = NULL; + GLint _res; + ptr_gluBuild2DMipmaps = (PFNGLUBUILD2DMIPMAPSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild2DMipmaps != NULL); + if (data != NULL) { + _ptr6 = (void *) (*env)->GetPrimitiveArrayCritical(env, data, NULL); + } + _res = (* ptr_gluBuild2DMipmaps) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLsizei) height, (GLenum) format, (GLenum) type, (void *) _ptr6); + if (data != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, data, _ptr6, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild2DMipmaps(int target, int internalFormat, int width, int height, int format, int type, short[] data) + * C function: GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild2DMipmaps__IIIIII_3SJ(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint height, jint format, jint type, jshortArray data, jlong glProcAddress) { + PFNGLUBUILD2DMIPMAPSPROC ptr_gluBuild2DMipmaps; + void * _ptr6 = NULL; + GLint _res; + ptr_gluBuild2DMipmaps = (PFNGLUBUILD2DMIPMAPSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild2DMipmaps != NULL); + if (data != NULL) { + _ptr6 = (void *) (*env)->GetPrimitiveArrayCritical(env, data, NULL); + } + _res = (* ptr_gluBuild2DMipmaps) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLsizei) height, (GLenum) format, (GLenum) type, (void *) _ptr6); + if (data != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, data, _ptr6, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild2DMipmaps(int target, int internalFormat, int width, int height, int format, int type, int[] data) + * C function: GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild2DMipmaps__IIIIII_3IJ(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint height, jint format, jint type, jintArray data, jlong glProcAddress) { + PFNGLUBUILD2DMIPMAPSPROC ptr_gluBuild2DMipmaps; + void * _ptr6 = NULL; + GLint _res; + ptr_gluBuild2DMipmaps = (PFNGLUBUILD2DMIPMAPSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild2DMipmaps != NULL); + if (data != NULL) { + _ptr6 = (void *) (*env)->GetPrimitiveArrayCritical(env, data, NULL); + } + _res = (* ptr_gluBuild2DMipmaps) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLsizei) height, (GLenum) format, (GLenum) type, (void *) _ptr6); + if (data != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, data, _ptr6, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild2DMipmaps(int target, int internalFormat, int width, int height, int format, int type, float[] data) + * C function: GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild2DMipmaps__IIIIII_3FJ(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint height, jint format, jint type, jfloatArray data, jlong glProcAddress) { + PFNGLUBUILD2DMIPMAPSPROC ptr_gluBuild2DMipmaps; + void * _ptr6 = NULL; + GLint _res; + ptr_gluBuild2DMipmaps = (PFNGLUBUILD2DMIPMAPSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild2DMipmaps != NULL); + if (data != NULL) { + _ptr6 = (void *) (*env)->GetPrimitiveArrayCritical(env, data, NULL); + } + _res = (* ptr_gluBuild2DMipmaps) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLsizei) height, (GLenum) format, (GLenum) type, (void *) _ptr6); + if (data != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, data, _ptr6, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild2DMipmaps(int target, int internalFormat, int width, int height, int format, int type, java.nio.ByteBuffer data) + * C function: GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild2DMipmaps__IIIIIILjava_nio_Buffer_2J(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint height, jint format, jint type, jobject data, jlong glProcAddress) { + PFNGLUBUILD2DMIPMAPSPROC ptr_gluBuild2DMipmaps; + void * _ptr6 = NULL; + GLint _res; + if (data != NULL) { + _ptr6 = (void *) (*env)->GetDirectBufferAddress(env, data); + } else { + _ptr6 = NULL; + } + ptr_gluBuild2DMipmaps = (PFNGLUBUILD2DMIPMAPSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild2DMipmaps != NULL); + _res = (* ptr_gluBuild2DMipmaps) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLsizei) height, (GLenum) format, (GLenum) type, (void *) _ptr6); + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild3DMipmapLevels(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, byte[] data) + * C function: GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild3DMipmapLevels__IIIIIIIIII_3BJ(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint height, jint depth, jint format, jint type, jint level, jint base, jint max, jbyteArray data, jlong glProcAddress) { + PFNGLUBUILD3DMIPMAPLEVELSPROC ptr_gluBuild3DMipmapLevels; + void * _ptr10 = NULL; + GLint _res; + ptr_gluBuild3DMipmapLevels = (PFNGLUBUILD3DMIPMAPLEVELSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild3DMipmapLevels != NULL); + if (data != NULL) { + _ptr10 = (void *) (*env)->GetPrimitiveArrayCritical(env, data, NULL); + } + _res = (* ptr_gluBuild3DMipmapLevels) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLsizei) height, (GLsizei) depth, (GLenum) format, (GLenum) type, (GLint) level, (GLint) base, (GLint) max, (void *) _ptr10); + if (data != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, data, _ptr10, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild3DMipmapLevels(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, short[] data) + * C function: GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild3DMipmapLevels__IIIIIIIIII_3SJ(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint height, jint depth, jint format, jint type, jint level, jint base, jint max, jshortArray data, jlong glProcAddress) { + PFNGLUBUILD3DMIPMAPLEVELSPROC ptr_gluBuild3DMipmapLevels; + void * _ptr10 = NULL; + GLint _res; + ptr_gluBuild3DMipmapLevels = (PFNGLUBUILD3DMIPMAPLEVELSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild3DMipmapLevels != NULL); + if (data != NULL) { + _ptr10 = (void *) (*env)->GetPrimitiveArrayCritical(env, data, NULL); + } + _res = (* ptr_gluBuild3DMipmapLevels) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLsizei) height, (GLsizei) depth, (GLenum) format, (GLenum) type, (GLint) level, (GLint) base, (GLint) max, (void *) _ptr10); + if (data != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, data, _ptr10, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild3DMipmapLevels(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, int[] data) + * C function: GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild3DMipmapLevels__IIIIIIIIII_3IJ(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint height, jint depth, jint format, jint type, jint level, jint base, jint max, jintArray data, jlong glProcAddress) { + PFNGLUBUILD3DMIPMAPLEVELSPROC ptr_gluBuild3DMipmapLevels; + void * _ptr10 = NULL; + GLint _res; + ptr_gluBuild3DMipmapLevels = (PFNGLUBUILD3DMIPMAPLEVELSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild3DMipmapLevels != NULL); + if (data != NULL) { + _ptr10 = (void *) (*env)->GetPrimitiveArrayCritical(env, data, NULL); + } + _res = (* ptr_gluBuild3DMipmapLevels) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLsizei) height, (GLsizei) depth, (GLenum) format, (GLenum) type, (GLint) level, (GLint) base, (GLint) max, (void *) _ptr10); + if (data != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, data, _ptr10, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild3DMipmapLevels(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, float[] data) + * C function: GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild3DMipmapLevels__IIIIIIIIII_3FJ(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint height, jint depth, jint format, jint type, jint level, jint base, jint max, jfloatArray data, jlong glProcAddress) { + PFNGLUBUILD3DMIPMAPLEVELSPROC ptr_gluBuild3DMipmapLevels; + void * _ptr10 = NULL; + GLint _res; + ptr_gluBuild3DMipmapLevels = (PFNGLUBUILD3DMIPMAPLEVELSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild3DMipmapLevels != NULL); + if (data != NULL) { + _ptr10 = (void *) (*env)->GetPrimitiveArrayCritical(env, data, NULL); + } + _res = (* ptr_gluBuild3DMipmapLevels) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLsizei) height, (GLsizei) depth, (GLenum) format, (GLenum) type, (GLint) level, (GLint) base, (GLint) max, (void *) _ptr10); + if (data != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, data, _ptr10, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild3DMipmapLevels(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, java.nio.ByteBuffer data) + * C function: GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild3DMipmapLevels__IIIIIIIIIILjava_nio_Buffer_2J(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint height, jint depth, jint format, jint type, jint level, jint base, jint max, jobject data, jlong glProcAddress) { + PFNGLUBUILD3DMIPMAPLEVELSPROC ptr_gluBuild3DMipmapLevels; + void * _ptr10 = NULL; + GLint _res; + if (data != NULL) { + _ptr10 = (void *) (*env)->GetDirectBufferAddress(env, data); + } else { + _ptr10 = NULL; + } + ptr_gluBuild3DMipmapLevels = (PFNGLUBUILD3DMIPMAPLEVELSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild3DMipmapLevels != NULL); + _res = (* ptr_gluBuild3DMipmapLevels) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLsizei) height, (GLsizei) depth, (GLenum) format, (GLenum) type, (GLint) level, (GLint) base, (GLint) max, (void *) _ptr10); + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild3DMipmaps(int target, int internalFormat, int width, int height, int depth, int format, int type, byte[] data) + * C function: GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild3DMipmaps__IIIIIII_3BJ(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint height, jint depth, jint format, jint type, jbyteArray data, jlong glProcAddress) { + PFNGLUBUILD3DMIPMAPSPROC ptr_gluBuild3DMipmaps; + void * _ptr7 = NULL; + GLint _res; + ptr_gluBuild3DMipmaps = (PFNGLUBUILD3DMIPMAPSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild3DMipmaps != NULL); + if (data != NULL) { + _ptr7 = (void *) (*env)->GetPrimitiveArrayCritical(env, data, NULL); + } + _res = (* ptr_gluBuild3DMipmaps) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLsizei) height, (GLsizei) depth, (GLenum) format, (GLenum) type, (void *) _ptr7); + if (data != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, data, _ptr7, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild3DMipmaps(int target, int internalFormat, int width, int height, int depth, int format, int type, short[] data) + * C function: GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild3DMipmaps__IIIIIII_3SJ(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint height, jint depth, jint format, jint type, jshortArray data, jlong glProcAddress) { + PFNGLUBUILD3DMIPMAPSPROC ptr_gluBuild3DMipmaps; + void * _ptr7 = NULL; + GLint _res; + ptr_gluBuild3DMipmaps = (PFNGLUBUILD3DMIPMAPSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild3DMipmaps != NULL); + if (data != NULL) { + _ptr7 = (void *) (*env)->GetPrimitiveArrayCritical(env, data, NULL); + } + _res = (* ptr_gluBuild3DMipmaps) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLsizei) height, (GLsizei) depth, (GLenum) format, (GLenum) type, (void *) _ptr7); + if (data != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, data, _ptr7, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild3DMipmaps(int target, int internalFormat, int width, int height, int depth, int format, int type, int[] data) + * C function: GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild3DMipmaps__IIIIIII_3IJ(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint height, jint depth, jint format, jint type, jintArray data, jlong glProcAddress) { + PFNGLUBUILD3DMIPMAPSPROC ptr_gluBuild3DMipmaps; + void * _ptr7 = NULL; + GLint _res; + ptr_gluBuild3DMipmaps = (PFNGLUBUILD3DMIPMAPSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild3DMipmaps != NULL); + if (data != NULL) { + _ptr7 = (void *) (*env)->GetPrimitiveArrayCritical(env, data, NULL); + } + _res = (* ptr_gluBuild3DMipmaps) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLsizei) height, (GLsizei) depth, (GLenum) format, (GLenum) type, (void *) _ptr7); + if (data != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, data, _ptr7, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild3DMipmaps(int target, int internalFormat, int width, int height, int depth, int format, int type, float[] data) + * C function: GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild3DMipmaps__IIIIIII_3FJ(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint height, jint depth, jint format, jint type, jfloatArray data, jlong glProcAddress) { + PFNGLUBUILD3DMIPMAPSPROC ptr_gluBuild3DMipmaps; + void * _ptr7 = NULL; + GLint _res; + ptr_gluBuild3DMipmaps = (PFNGLUBUILD3DMIPMAPSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild3DMipmaps != NULL); + if (data != NULL) { + _ptr7 = (void *) (*env)->GetPrimitiveArrayCritical(env, data, NULL); + } + _res = (* ptr_gluBuild3DMipmaps) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLsizei) height, (GLsizei) depth, (GLenum) format, (GLenum) type, (void *) _ptr7); + if (data != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, data, _ptr7, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluBuild3DMipmaps(int target, int internalFormat, int width, int height, int depth, int format, int type, java.nio.ByteBuffer data) + * C function: GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluBuild3DMipmaps__IIIIIIILjava_nio_Buffer_2J(JNIEnv *env, jobject _unused, jint target, jint internalFormat, jint width, jint height, jint depth, jint format, jint type, jobject data, jlong glProcAddress) { + PFNGLUBUILD3DMIPMAPSPROC ptr_gluBuild3DMipmaps; + void * _ptr7 = NULL; + GLint _res; + if (data != NULL) { + _ptr7 = (void *) (*env)->GetDirectBufferAddress(env, data); + } else { + _ptr7 = NULL; + } + ptr_gluBuild3DMipmaps = (PFNGLUBUILD3DMIPMAPSPROC) (intptr_t) glProcAddress; + assert(ptr_gluBuild3DMipmaps != NULL); + _res = (* ptr_gluBuild3DMipmaps) ((GLenum) target, (GLint) internalFormat, (GLsizei) width, (GLsizei) height, (GLsizei) depth, (GLenum) format, (GLenum) type, (void *) _ptr7); + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluScaleImage(int format, int wIn, int hIn, int typeIn, byte[] dataIn, int wOut, int hOut, int typeOut, byte[] dataOut) + * C function: GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluScaleImage__IIII_3BIII_3BJ(JNIEnv *env, jobject _unused, jint format, jint wIn, jint hIn, jint typeIn, jbyteArray dataIn, jint wOut, jint hOut, jint typeOut, jbyteArray dataOut, jlong glProcAddress) { + PFNGLUSCALEIMAGEPROC ptr_gluScaleImage; + void * _ptr4 = NULL; + GLvoid * _ptr8 = NULL; + GLint _res; + ptr_gluScaleImage = (PFNGLUSCALEIMAGEPROC) (intptr_t) glProcAddress; + assert(ptr_gluScaleImage != NULL); + if (dataIn != NULL) { + _ptr4 = (void *) (*env)->GetPrimitiveArrayCritical(env, dataIn, NULL); + } + if (dataOut != NULL) { + _ptr8 = (GLvoid *) (*env)->GetPrimitiveArrayCritical(env, dataOut, NULL); + } + _res = (* ptr_gluScaleImage) ((GLenum) format, (GLsizei) wIn, (GLsizei) hIn, (GLenum) typeIn, (void *) _ptr4, (GLsizei) wOut, (GLsizei) hOut, (GLenum) typeOut, (GLvoid *) _ptr8); + if (dataIn != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, dataIn, _ptr4, JNI_ABORT); + } + if (dataOut != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, dataOut, _ptr8, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluScaleImage(int format, int wIn, int hIn, int typeIn, short[] dataIn, int wOut, int hOut, int typeOut, short[] dataOut) + * C function: GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluScaleImage__IIII_3SIII_3SJ(JNIEnv *env, jobject _unused, jint format, jint wIn, jint hIn, jint typeIn, jshortArray dataIn, jint wOut, jint hOut, jint typeOut, jshortArray dataOut, jlong glProcAddress) { + PFNGLUSCALEIMAGEPROC ptr_gluScaleImage; + void * _ptr4 = NULL; + GLvoid * _ptr8 = NULL; + GLint _res; + ptr_gluScaleImage = (PFNGLUSCALEIMAGEPROC) (intptr_t) glProcAddress; + assert(ptr_gluScaleImage != NULL); + if (dataIn != NULL) { + _ptr4 = (void *) (*env)->GetPrimitiveArrayCritical(env, dataIn, NULL); + } + if (dataOut != NULL) { + _ptr8 = (GLvoid *) (*env)->GetPrimitiveArrayCritical(env, dataOut, NULL); + } + _res = (* ptr_gluScaleImage) ((GLenum) format, (GLsizei) wIn, (GLsizei) hIn, (GLenum) typeIn, (void *) _ptr4, (GLsizei) wOut, (GLsizei) hOut, (GLenum) typeOut, (GLvoid *) _ptr8); + if (dataIn != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, dataIn, _ptr4, JNI_ABORT); + } + if (dataOut != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, dataOut, _ptr8, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluScaleImage(int format, int wIn, int hIn, int typeIn, int[] dataIn, int wOut, int hOut, int typeOut, int[] dataOut) + * C function: GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluScaleImage__IIII_3IIII_3IJ(JNIEnv *env, jobject _unused, jint format, jint wIn, jint hIn, jint typeIn, jintArray dataIn, jint wOut, jint hOut, jint typeOut, jintArray dataOut, jlong glProcAddress) { + PFNGLUSCALEIMAGEPROC ptr_gluScaleImage; + void * _ptr4 = NULL; + GLvoid * _ptr8 = NULL; + GLint _res; + ptr_gluScaleImage = (PFNGLUSCALEIMAGEPROC) (intptr_t) glProcAddress; + assert(ptr_gluScaleImage != NULL); + if (dataIn != NULL) { + _ptr4 = (void *) (*env)->GetPrimitiveArrayCritical(env, dataIn, NULL); + } + if (dataOut != NULL) { + _ptr8 = (GLvoid *) (*env)->GetPrimitiveArrayCritical(env, dataOut, NULL); + } + _res = (* ptr_gluScaleImage) ((GLenum) format, (GLsizei) wIn, (GLsizei) hIn, (GLenum) typeIn, (void *) _ptr4, (GLsizei) wOut, (GLsizei) hOut, (GLenum) typeOut, (GLvoid *) _ptr8); + if (dataIn != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, dataIn, _ptr4, JNI_ABORT); + } + if (dataOut != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, dataOut, _ptr8, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluScaleImage(int format, int wIn, int hIn, int typeIn, float[] dataIn, int wOut, int hOut, int typeOut, float[] dataOut) + * C function: GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluScaleImage__IIII_3FIII_3FJ(JNIEnv *env, jobject _unused, jint format, jint wIn, jint hIn, jint typeIn, jfloatArray dataIn, jint wOut, jint hOut, jint typeOut, jfloatArray dataOut, jlong glProcAddress) { + PFNGLUSCALEIMAGEPROC ptr_gluScaleImage; + void * _ptr4 = NULL; + GLvoid * _ptr8 = NULL; + GLint _res; + ptr_gluScaleImage = (PFNGLUSCALEIMAGEPROC) (intptr_t) glProcAddress; + assert(ptr_gluScaleImage != NULL); + if (dataIn != NULL) { + _ptr4 = (void *) (*env)->GetPrimitiveArrayCritical(env, dataIn, NULL); + } + if (dataOut != NULL) { + _ptr8 = (GLvoid *) (*env)->GetPrimitiveArrayCritical(env, dataOut, NULL); + } + _res = (* ptr_gluScaleImage) ((GLenum) format, (GLsizei) wIn, (GLsizei) hIn, (GLenum) typeIn, (void *) _ptr4, (GLsizei) wOut, (GLsizei) hOut, (GLenum) typeOut, (GLvoid *) _ptr8); + if (dataIn != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, dataIn, _ptr4, JNI_ABORT); + } + if (dataOut != NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, dataOut, _ptr8, JNI_ABORT); + } + return _res; +} + + +/* Java->C glue code: + * Java package: net.java.games.jogl.impl.GLUImpl + * Java method: int dispatch_gluScaleImage(int format, int wIn, int hIn, int typeIn, java.nio.ByteBuffer dataIn, int wOut, int hOut, int typeOut, java.nio.ByteBuffer dataOut) + * C function: GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); + */ +JNIEXPORT jint JNICALL +Java_net_java_games_jogl_impl_GLUImpl_dispatch_1gluScaleImage__IIIILjava_nio_Buffer_2IIILjava_nio_Buffer_2J(JNIEnv *env, jobject _unused, jint format, jint wIn, jint hIn, jint typeIn, jobject dataIn, jint wOut, jint hOut, jint typeOut, jobject dataOut, jlong glProcAddress) { + PFNGLUSCALEIMAGEPROC ptr_gluScaleImage; + void * _ptr4 = NULL; + GLvoid * _ptr8 = NULL; + GLint _res; + if (dataIn != NULL) { + _ptr4 = (void *) (*env)->GetDirectBufferAddress(env, dataIn); + } else { + _ptr4 = NULL; + } + if (dataOut != NULL) { + _ptr8 = (GLvoid *) (*env)->GetDirectBufferAddress(env, dataOut); + } else { + _ptr8 = NULL; + } + ptr_gluScaleImage = (PFNGLUSCALEIMAGEPROC) (intptr_t) glProcAddress; + assert(ptr_gluScaleImage != NULL); + _res = (* ptr_gluScaleImage) ((GLenum) format, (GLsizei) wIn, (GLsizei) hIn, (GLenum) typeIn, (void *) _ptr4, (GLsizei) wOut, (GLsizei) hOut, (GLenum) typeOut, (GLvoid *) _ptr8); + return _res; +} diff --git a/make/glu-impl-common-CustomJavaCode.java b/make/glu-impl-common-CustomJavaCode.java index 0f8da7de9..e9cadfc0d 100644 --- a/make/glu-impl-common-CustomJavaCode.java +++ b/make/glu-impl-common-CustomJavaCode.java @@ -1,3 +1,17 @@ +private static boolean useJavaMipmapCode = true; + +static { + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + String val = System.getProperty("jogl.glu.nojava"); + if (val != null && !val.toLowerCase().equals("false")) { + useJavaMipmapCode = false; + } + return null; + } + }); +} + /** Indicates whether the given GLU routine is available to be called. */ public boolean isFunctionAvailable(String gluFunctionName) { @@ -206,9 +220,8 @@ public void gluPickMatrix(double x, double y, double delX, double delY, int[] vi project.gluPickMatrix(gl, x, y, delX, delY, viewport); } - //---------------------------------------------------------------------- -// Mimpmap and image scaling functionality +// Mipmap and image scaling functionality // Boolean @@ -420,27 +433,27 @@ public int gluScaleImageJava( int format, int widthin, int heightin, } else { throw new IllegalArgumentException( "Input data must be a primitive array or a ByteBuffer" ); } - if( datain instanceof ByteBuffer ) { - out = (ByteBuffer)datain; - } else if( datain instanceof byte[] ) { - out = ByteBuffer.wrap( ((byte[])datain) ); - } else if( datain instanceof short[] ) { - out = ByteBuffer.allocate( ((short[])datain).length * 2 ); - } else if( datain instanceof int[] ) { - out = ByteBuffer.allocate( ((int[])datain).length * 4 ); - } else if( datain instanceof float[] ) { - out = ByteBuffer.allocate( ((float[])datain).length * 4 ); + if( dataout instanceof ByteBuffer ) { + out = (ByteBuffer)dataout; + } else if( dataout instanceof byte[] ) { + out = ByteBuffer.wrap( ((byte[])dataout) ); + } else if( dataout instanceof short[] ) { + out = ByteBuffer.allocate( ((short[])dataout).length * 2 ); + } else if( dataout instanceof int[] ) { + out = ByteBuffer.allocate( ((int[])dataout).length * 4 ); + } else if( dataout instanceof float[] ) { + out = ByteBuffer.allocate( ((float[])dataout).length * 4 ); } else { throw new IllegalArgumentException( "Output data must be a primitive array or a ByteBuffer" ); } int errno = Mipmap.gluScaleImage( gl, format, widthin, heightin, typein, in, widthout, heightout, typeout, out ); if( errno == 0 ) { - if( datain instanceof short[] ) { + if( dataout instanceof short[] ) { out.asShortBuffer().get( (short[])dataout ); - } else if( datain instanceof int[] ) { + } else if( dataout instanceof int[] ) { out.asIntBuffer().get( (int[])dataout ); - } else if( datain instanceof float[] ) { + } else if( dataout instanceof float[] ) { out.asFloatBuffer().get( (float[])dataout ); } } @@ -558,3 +571,852 @@ public int gluBuild3DMipmapsJava( int target, int internalFormat, int width, depth, format, type, buffer ) ); } + +//---------------------------------------------------------------------- +// Wrappers for mipmap and image scaling entry points which dispatch either +// to the Java or C versions. +// + + +/** Interface to C language function: <br> <code> GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild1DMipmapLevels(int target, int internalFormat, int width, int format, int type, int level, int base, int max, byte[] data) { + if (useJavaMipmapCode) { + return gluBuild1DMipmapLevelsJava(target, internalFormat, width, format, type, level, base, max, data); + } else { + return gluBuild1DMipmapLevelsC(target, internalFormat, width, format, type, level, base, max, data); + } +} + +/** Interface to C language function: <br> <code> GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild1DMipmapLevels(int target, int internalFormat, int width, int format, int type, int level, int base, int max, short[] data) { + if (useJavaMipmapCode) { + return gluBuild1DMipmapLevelsJava(target, internalFormat, width, format, type, level, base, max, data); + } else { + return gluBuild1DMipmapLevelsC(target, internalFormat, width, format, type, level, base, max, data); + } +} + +/** Interface to C language function: <br> <code> GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild1DMipmapLevels(int target, int internalFormat, int width, int format, int type, int level, int base, int max, int[] data) { + if (useJavaMipmapCode) { + return gluBuild1DMipmapLevelsJava(target, internalFormat, width, format, type, level, base, max, data); + } else { + return gluBuild1DMipmapLevelsC(target, internalFormat, width, format, type, level, base, max, data); + } +} + +/** Interface to C language function: <br> <code> GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild1DMipmapLevels(int target, int internalFormat, int width, int format, int type, int level, int base, int max, float[] data) { + if (useJavaMipmapCode) { + return gluBuild1DMipmapLevelsJava(target, internalFormat, width, format, type, level, base, max, data); + } else { + return gluBuild1DMipmapLevelsC(target, internalFormat, width, format, type, level, base, max, data); + } +} + +/** Interface to C language function: <br> <code> GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild1DMipmapLevels(int target, int internalFormat, int width, int format, int type, int level, int base, int max, java.nio.Buffer data) { + if (useJavaMipmapCode) { + return gluBuild1DMipmapLevelsJava(target, internalFormat, width, format, type, level, base, max, data); + } else { + return gluBuild1DMipmapLevelsC(target, internalFormat, width, format, type, level, base, max, data); + } +} + +/** Interface to C language function: <br> <code> GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild1DMipmaps(int target, int internalFormat, int width, int format, int type, byte[] data) { + if (useJavaMipmapCode) { + return gluBuild1DMipmapsJava(target, internalFormat, width, format, type, data); + } else { + return gluBuild1DMipmapsC(target, internalFormat, width, format, type, data); + } +} + +/** Interface to C language function: <br> <code> GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild1DMipmaps(int target, int internalFormat, int width, int format, int type, short[] data) { + if (useJavaMipmapCode) { + return gluBuild1DMipmapsJava(target, internalFormat, width, format, type, data); + } else { + return gluBuild1DMipmapsC(target, internalFormat, width, format, type, data); + } +} + + +/** Interface to C language function: <br> <code> GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild1DMipmaps(int target, int internalFormat, int width, int format, int type, int[] data) { + if (useJavaMipmapCode) { + return gluBuild1DMipmapsJava(target, internalFormat, width, format, type, data); + } else { + return gluBuild1DMipmapsC(target, internalFormat, width, format, type, data); + } +} + + +/** Interface to C language function: <br> <code> GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild1DMipmaps(int target, int internalFormat, int width, int format, int type, float[] data) { + if (useJavaMipmapCode) { + return gluBuild1DMipmapsJava(target, internalFormat, width, format, type, data); + } else { + return gluBuild1DMipmapsC(target, internalFormat, width, format, type, data); + } +} + + +/** Interface to C language function: <br> <code> GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild2DMipmapLevels(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, byte[] data) { + if (useJavaMipmapCode) { + return gluBuild2DMipmapLevelsJava(target, internalFormat, width, height, format, type, level, base, max, data); + } else { + return gluBuild2DMipmapLevelsC(target, internalFormat, width, height, format, type, level, base, max, data); + } +} + +/** Interface to C language function: <br> <code> GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild2DMipmapLevels(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, short[] data) { + if (useJavaMipmapCode) { + return gluBuild2DMipmapLevelsJava(target, internalFormat, width, height, format, type, level, base, max, data); + } else { + return gluBuild2DMipmapLevelsC(target, internalFormat, width, height, format, type, level, base, max, data); + } +} + + +/** Interface to C language function: <br> <code> GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild2DMipmapLevels(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, int[] data) { + if (useJavaMipmapCode) { + return gluBuild2DMipmapLevelsJava(target, internalFormat, width, height, format, type, level, base, max, data); + } else { + return gluBuild2DMipmapLevelsC(target, internalFormat, width, height, format, type, level, base, max, data); + } +} + + +/** Interface to C language function: <br> <code> GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild2DMipmapLevels(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, float[] data) { + if (useJavaMipmapCode) { + return gluBuild2DMipmapLevelsJava(target, internalFormat, width, height, format, type, level, base, max, data); + } else { + return gluBuild2DMipmapLevelsC(target, internalFormat, width, height, format, type, level, base, max, data); + } +} + + +/** Interface to C language function: <br> <code> GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild2DMipmapLevels(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, java.nio.Buffer data) { + if (useJavaMipmapCode) { + return gluBuild2DMipmapLevelsJava(target, internalFormat, width, height, format, type, level, base, max, data); + } else { + return gluBuild2DMipmapLevelsC(target, internalFormat, width, height, format, type, level, base, max, data); + } +} + + +/** Interface to C language function: <br> <code> GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild2DMipmaps(int target, int internalFormat, int width, int height, int format, int type, byte[] data) { + if (useJavaMipmapCode) { + return gluBuild2DMipmapsJava(target, internalFormat, width, height, format, type, data); + } else { + return gluBuild2DMipmapsC(target, internalFormat, width, height, format, type, data); + } +} + + +/** Interface to C language function: <br> <code> GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild2DMipmaps(int target, int internalFormat, int width, int height, int format, int type, short[] data) { + if (useJavaMipmapCode) { + return gluBuild2DMipmapsJava(target, internalFormat, width, height, format, type, data); + } else { + return gluBuild2DMipmapsC(target, internalFormat, width, height, format, type, data); + } +} + + +/** Interface to C language function: <br> <code> GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild2DMipmaps(int target, int internalFormat, int width, int height, int format, int type, int[] data) { + if (useJavaMipmapCode) { + return gluBuild2DMipmapsJava(target, internalFormat, width, height, format, type, data); + } else { + return gluBuild2DMipmapsC(target, internalFormat, width, height, format, type, data); + } +} + + +/** Interface to C language function: <br> <code> GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild2DMipmaps(int target, int internalFormat, int width, int height, int format, int type, float[] data) { + if (useJavaMipmapCode) { + return gluBuild2DMipmapsJava(target, internalFormat, width, height, format, type, data); + } else { + return gluBuild2DMipmapsC(target, internalFormat, width, height, format, type, data); + } +} + + +/** Interface to C language function: <br> <code> GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild2DMipmaps(int target, int internalFormat, int width, int height, int format, int type, java.nio.Buffer data) { + if (useJavaMipmapCode) { + return gluBuild2DMipmapsJava(target, internalFormat, width, height, format, type, data); + } else { + return gluBuild2DMipmapsC(target, internalFormat, width, height, format, type, data); + } +} + + +/** Interface to C language function: <br> <code> GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild3DMipmapLevels(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, byte[] data) { + if (useJavaMipmapCode) { + return gluBuild3DMipmapLevelsJava(target, internalFormat, width, height, depth, format, type, level, base, max, data); + } else { + return gluBuild3DMipmapLevelsC(target, internalFormat, width, height, depth, format, type, level, base, max, data); + } +} + + +/** Interface to C language function: <br> <code> GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild3DMipmapLevels(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, short[] data) { + if (useJavaMipmapCode) { + return gluBuild3DMipmapLevelsJava(target, internalFormat, width, height, depth, format, type, level, base, max, data); + } else { + return gluBuild3DMipmapLevelsC(target, internalFormat, width, height, depth, format, type, level, base, max, data); + } +} + + +/** Interface to C language function: <br> <code> GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild3DMipmapLevels(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, int[] data) { + if (useJavaMipmapCode) { + return gluBuild3DMipmapLevelsJava(target, internalFormat, width, height, depth, format, type, level, base, max, data); + } else { + return gluBuild3DMipmapLevelsC(target, internalFormat, width, height, depth, format, type, level, base, max, data); + } +} + + +/** Interface to C language function: <br> <code> GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild3DMipmapLevels(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, float[] data) { + if (useJavaMipmapCode) { + return gluBuild3DMipmapLevelsJava(target, internalFormat, width, height, depth, format, type, level, base, max, data); + } else { + return gluBuild3DMipmapLevelsC(target, internalFormat, width, height, depth, format, type, level, base, max, data); + } +} + + +/** Interface to C language function: <br> <code> GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild3DMipmapLevels(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, java.nio.Buffer data) { + if (useJavaMipmapCode) { + return gluBuild3DMipmapLevelsJava(target, internalFormat, width, height, depth, format, type, level, base, max, data); + } else { + return gluBuild3DMipmapLevelsC(target, internalFormat, width, height, depth, format, type, level, base, max, data); + } +} + + +/** Interface to C language function: <br> <code> GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild3DMipmaps(int target, int internalFormat, int width, int height, int depth, int format, int type, byte[] data) { + if (useJavaMipmapCode) { + return gluBuild3DMipmapsJava(target, internalFormat, width, height, depth, format, type, data); + } else { + return gluBuild3DMipmapsC(target, internalFormat, width, height, depth, format, type, data); + } +} + + +/** Interface to C language function: <br> <code> GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild3DMipmaps(int target, int internalFormat, int width, int height, int depth, int format, int type, short[] data) { + if (useJavaMipmapCode) { + return gluBuild3DMipmapsJava(target, internalFormat, width, height, depth, format, type, data); + } else { + return gluBuild3DMipmapsC(target, internalFormat, width, height, depth, format, type, data); + } +} + + +/** Interface to C language function: <br> <code> GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild3DMipmaps(int target, int internalFormat, int width, int height, int depth, int format, int type, int[] data) { + if (useJavaMipmapCode) { + return gluBuild3DMipmapsJava(target, internalFormat, width, height, depth, format, type, data); + } else { + return gluBuild3DMipmapsC(target, internalFormat, width, height, depth, format, type, data); + } +} + + +/** Interface to C language function: <br> <code> GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild3DMipmaps(int target, int internalFormat, int width, int height, int depth, int format, int type, float[] data) { + if (useJavaMipmapCode) { + return gluBuild3DMipmapsJava(target, internalFormat, width, height, depth, format, type, data); + } else { + return gluBuild3DMipmapsC(target, internalFormat, width, height, depth, format, type, data); + } +} + + +/** Interface to C language function: <br> <code> GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild3DMipmaps(int target, int internalFormat, int width, int height, int depth, int format, int type, java.nio.Buffer data) { + if (useJavaMipmapCode) { + return gluBuild3DMipmapsJava(target, internalFormat, width, height, depth, format, type, data); + } else { + return gluBuild3DMipmapsC(target, internalFormat, width, height, depth, format, type, data); + } +} + + +/** Interface to C language function: <br> <code> GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); </code> */ +public int gluScaleImage(int format, int wIn, int hIn, int typeIn, byte[] dataIn, int wOut, int hOut, int typeOut, byte[] dataOut) { + if (useJavaMipmapCode) { + return gluScaleImageJava(format, wIn, hIn, typeIn, dataIn, wOut, hOut, typeOut, dataOut); + } else { + return gluScaleImageC(format, wIn, hIn, typeIn, dataIn, wOut, hOut, typeOut, dataOut); + } +} + + +/** Interface to C language function: <br> <code> GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); </code> */ +public int gluScaleImage(int format, int wIn, int hIn, int typeIn, short[] dataIn, int wOut, int hOut, int typeOut, short[] dataOut) { + if (useJavaMipmapCode) { + return gluScaleImageJava(format, wIn, hIn, typeIn, dataIn, wOut, hOut, typeOut, dataOut); + } else { + return gluScaleImageC(format, wIn, hIn, typeIn, dataIn, wOut, hOut, typeOut, dataOut); + } +} + + +/** Interface to C language function: <br> <code> GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); </code> */ +public int gluScaleImage(int format, int wIn, int hIn, int typeIn, int[] dataIn, int wOut, int hOut, int typeOut, int[] dataOut) { + if (useJavaMipmapCode) { + return gluScaleImageJava(format, wIn, hIn, typeIn, dataIn, wOut, hOut, typeOut, dataOut); + } else { + return gluScaleImageC(format, wIn, hIn, typeIn, dataIn, wOut, hOut, typeOut, dataOut); + } +} + + +/** Interface to C language function: <br> <code> GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); </code> */ +public int gluScaleImage(int format, int wIn, int hIn, int typeIn, float[] dataIn, int wOut, int hOut, int typeOut, float[] dataOut) { + if (useJavaMipmapCode) { + return gluScaleImageJava(format, wIn, hIn, typeIn, dataIn, wOut, hOut, typeOut, dataOut); + } else { + return gluScaleImageC(format, wIn, hIn, typeIn, dataIn, wOut, hOut, typeOut, dataOut); + } +} + + +/** Interface to C language function: <br> <code> GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); </code> */ +public int gluScaleImage(int format, int wIn, int hIn, int typeIn, java.nio.Buffer dataIn, int wOut, int hOut, int typeOut, java.nio.Buffer dataOut) { + if (useJavaMipmapCode) { + return gluScaleImageJava(format, wIn, hIn, typeIn, dataIn, wOut, hOut, typeOut, dataOut); + } else { + return gluScaleImageC(format, wIn, hIn, typeIn, dataIn, wOut, hOut, typeOut, dataOut); + } +} + + + +//---------------------------------------------------------------------- +// Wrappers for C entry points for mipmap and scaling functionality. +// (These are only used as a fallback and will be removed in a future release) + + /** Entry point to C language function: <br> <code> GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + public int gluBuild1DMipmapLevelsC(int target, int internalFormat, int width, int format, int type, int level, int base, int max, byte[] data) + { + final long __addr_ = gluProcAddressTable._addressof_gluBuild1DMipmapLevels; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild1DMipmapLevels\" not available"); + } + return dispatch_gluBuild1DMipmapLevels(target, internalFormat, width, format, type, level, base, max, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + private native int dispatch_gluBuild1DMipmapLevels(int target, int internalFormat, int width, int format, int type, int level, int base, int max, byte[] data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + public int gluBuild1DMipmapLevelsC(int target, int internalFormat, int width, int format, int type, int level, int base, int max, short[] data) + { + final long __addr_ = gluProcAddressTable._addressof_gluBuild1DMipmapLevels; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild1DMipmapLevels\" not available"); + } + return dispatch_gluBuild1DMipmapLevels(target, internalFormat, width, format, type, level, base, max, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + private native int dispatch_gluBuild1DMipmapLevels(int target, int internalFormat, int width, int format, int type, int level, int base, int max, short[] data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + public int gluBuild1DMipmapLevelsC(int target, int internalFormat, int width, int format, int type, int level, int base, int max, int[] data) + { + final long __addr_ = gluProcAddressTable._addressof_gluBuild1DMipmapLevels; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild1DMipmapLevels\" not available"); + } + return dispatch_gluBuild1DMipmapLevels(target, internalFormat, width, format, type, level, base, max, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + private native int dispatch_gluBuild1DMipmapLevels(int target, int internalFormat, int width, int format, int type, int level, int base, int max, int[] data, long glProcAddress); + + /** Entry point to C language function: <br> <code> GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + public int gluBuild1DMipmapLevelsC(int target, int internalFormat, int width, int format, int type, int level, int base, int max, float[] data) + { + final long __addr_ = gluProcAddressTable._addressof_gluBuild1DMipmapLevels; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild1DMipmapLevels\" not available"); + } + return dispatch_gluBuild1DMipmapLevels(target, internalFormat, width, format, type, level, base, max, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + private native int dispatch_gluBuild1DMipmapLevels(int target, int internalFormat, int width, int format, int type, int level, int base, int max, float[] data, long glProcAddress); + + /** Entry point to C language function: <br> <code> GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + public int gluBuild1DMipmapLevelsC(int target, int internalFormat, int width, int format, int type, int level, int base, int max, java.nio.Buffer data) + { + if (!BufferFactory.isDirect(data)) + throw new GLException("Argument \"data\" was not a direct buffer"); + final long __addr_ = gluProcAddressTable._addressof_gluBuild1DMipmapLevels; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild1DMipmapLevels\" not available"); + } + return dispatch_gluBuild1DMipmapLevels(target, internalFormat, width, format, type, level, base, max, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + native private int dispatch_gluBuild1DMipmapLevels(int target, int internalFormat, int width, int format, int type, int level, int base, int max, java.nio.Buffer data, long glProcAddress); + + /** Entry point to C language function: <br> <code> GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data); </code> */ + public int gluBuild1DMipmapsC(int target, int internalFormat, int width, int format, int type, byte[] data) + { + final long __addr_ = gluProcAddressTable._addressof_gluBuild1DMipmaps; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild1DMipmaps\" not available"); + } + return dispatch_gluBuild1DMipmaps(target, internalFormat, width, format, type, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data); </code> */ + private native int dispatch_gluBuild1DMipmaps(int target, int internalFormat, int width, int format, int type, byte[] data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data); </code> */ + public int gluBuild1DMipmapsC(int target, int internalFormat, int width, int format, int type, short[] data) + { + final long __addr_ = gluProcAddressTable._addressof_gluBuild1DMipmaps; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild1DMipmaps\" not available"); + } + return dispatch_gluBuild1DMipmaps(target, internalFormat, width, format, type, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data); </code> */ + private native int dispatch_gluBuild1DMipmaps(int target, int internalFormat, int width, int format, int type, short[] data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data); </code> */ + public int gluBuild1DMipmapsC(int target, int internalFormat, int width, int format, int type, int[] data) + { + final long __addr_ = gluProcAddressTable._addressof_gluBuild1DMipmaps; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild1DMipmaps\" not available"); + } + return dispatch_gluBuild1DMipmaps(target, internalFormat, width, format, type, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data); </code> */ + private native int dispatch_gluBuild1DMipmaps(int target, int internalFormat, int width, int format, int type, int[] data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data); </code> */ + public int gluBuild1DMipmapsC(int target, int internalFormat, int width, int format, int type, float[] data) + { + final long __addr_ = gluProcAddressTable._addressof_gluBuild1DMipmaps; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild1DMipmaps\" not available"); + } + return dispatch_gluBuild1DMipmaps(target, internalFormat, width, format, type, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data); </code> */ + private native int dispatch_gluBuild1DMipmaps(int target, int internalFormat, int width, int format, int type, float[] data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data); </code> */ + public int gluBuild1DMipmapsC(int target, int internalFormat, int width, int format, int type, java.nio.Buffer data) + { + if (!BufferFactory.isDirect(data)) + throw new GLException("Argument \"data\" was not a direct buffer"); + final long __addr_ = gluProcAddressTable._addressof_gluBuild1DMipmaps; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild1DMipmaps\" not available"); + } + return dispatch_gluBuild1DMipmaps(target, internalFormat, width, format, type, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data); </code> */ + native private int dispatch_gluBuild1DMipmaps(int target, int internalFormat, int width, int format, int type, java.nio.Buffer data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + public int gluBuild2DMipmapLevelsC(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, byte[] data) + { + final long __addr_ = gluProcAddressTable._addressof_gluBuild2DMipmapLevels; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild2DMipmapLevels\" not available"); + } + return dispatch_gluBuild2DMipmapLevels(target, internalFormat, width, height, format, type, level, base, max, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + private native int dispatch_gluBuild2DMipmapLevels(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, byte[] data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + public int gluBuild2DMipmapLevelsC(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, short[] data) + { + final long __addr_ = gluProcAddressTable._addressof_gluBuild2DMipmapLevels; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild2DMipmapLevels\" not available"); + } + return dispatch_gluBuild2DMipmapLevels(target, internalFormat, width, height, format, type, level, base, max, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + private native int dispatch_gluBuild2DMipmapLevels(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, short[] data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + public int gluBuild2DMipmapLevelsC(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, int[] data) + { + final long __addr_ = gluProcAddressTable._addressof_gluBuild2DMipmapLevels; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild2DMipmapLevels\" not available"); + } + return dispatch_gluBuild2DMipmapLevels(target, internalFormat, width, height, format, type, level, base, max, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + private native int dispatch_gluBuild2DMipmapLevels(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, int[] data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + public int gluBuild2DMipmapLevelsC(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, float[] data) + { + final long __addr_ = gluProcAddressTable._addressof_gluBuild2DMipmapLevels; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild2DMipmapLevels\" not available"); + } + return dispatch_gluBuild2DMipmapLevels(target, internalFormat, width, height, format, type, level, base, max, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + private native int dispatch_gluBuild2DMipmapLevels(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, float[] data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + public int gluBuild2DMipmapLevelsC(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, java.nio.Buffer data) + { + if (!BufferFactory.isDirect(data)) + throw new GLException("Argument \"data\" was not a direct buffer"); + final long __addr_ = gluProcAddressTable._addressof_gluBuild2DMipmapLevels; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild2DMipmapLevels\" not available"); + } + return dispatch_gluBuild2DMipmapLevels(target, internalFormat, width, height, format, type, level, base, max, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + native private int dispatch_gluBuild2DMipmapLevels(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, java.nio.Buffer data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); </code> */ + public int gluBuild2DMipmapsC(int target, int internalFormat, int width, int height, int format, int type, byte[] data) + { + final long __addr_ = gluProcAddressTable._addressof_gluBuild2DMipmaps; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild2DMipmaps\" not available"); + } + return dispatch_gluBuild2DMipmaps(target, internalFormat, width, height, format, type, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); </code> */ + private native int dispatch_gluBuild2DMipmaps(int target, int internalFormat, int width, int height, int format, int type, byte[] data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); </code> */ + public int gluBuild2DMipmapsC(int target, int internalFormat, int width, int height, int format, int type, short[] data) + { + final long __addr_ = gluProcAddressTable._addressof_gluBuild2DMipmaps; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild2DMipmaps\" not available"); + } + return dispatch_gluBuild2DMipmaps(target, internalFormat, width, height, format, type, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); </code> */ + private native int dispatch_gluBuild2DMipmaps(int target, int internalFormat, int width, int height, int format, int type, short[] data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); </code> */ + public int gluBuild2DMipmapsC(int target, int internalFormat, int width, int height, int format, int type, int[] data) + { + final long __addr_ = gluProcAddressTable._addressof_gluBuild2DMipmaps; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild2DMipmaps\" not available"); + } + return dispatch_gluBuild2DMipmaps(target, internalFormat, width, height, format, type, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); </code> */ + private native int dispatch_gluBuild2DMipmaps(int target, int internalFormat, int width, int height, int format, int type, int[] data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); </code> */ + public int gluBuild2DMipmapsC(int target, int internalFormat, int width, int height, int format, int type, float[] data) + { + final long __addr_ = gluProcAddressTable._addressof_gluBuild2DMipmaps; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild2DMipmaps\" not available"); + } + return dispatch_gluBuild2DMipmaps(target, internalFormat, width, height, format, type, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); </code> */ + private native int dispatch_gluBuild2DMipmaps(int target, int internalFormat, int width, int height, int format, int type, float[] data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); </code> */ + public int gluBuild2DMipmapsC(int target, int internalFormat, int width, int height, int format, int type, java.nio.Buffer data) + { + if (!BufferFactory.isDirect(data)) + throw new GLException("Argument \"data\" was not a direct buffer"); + final long __addr_ = gluProcAddressTable._addressof_gluBuild2DMipmaps; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild2DMipmaps\" not available"); + } + return dispatch_gluBuild2DMipmaps(target, internalFormat, width, height, format, type, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); </code> */ + native private int dispatch_gluBuild2DMipmaps(int target, int internalFormat, int width, int height, int format, int type, java.nio.Buffer data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + public int gluBuild3DMipmapLevelsC(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, byte[] data) + { + final long __addr_ = gluProcAddressTable._addressof_gluBuild3DMipmapLevels; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild3DMipmapLevels\" not available"); + } + return dispatch_gluBuild3DMipmapLevels(target, internalFormat, width, height, depth, format, type, level, base, max, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + private native int dispatch_gluBuild3DMipmapLevels(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, byte[] data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + public int gluBuild3DMipmapLevelsC(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, short[] data) + { + final long __addr_ = gluProcAddressTable._addressof_gluBuild3DMipmapLevels; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild3DMipmapLevels\" not available"); + } + return dispatch_gluBuild3DMipmapLevels(target, internalFormat, width, height, depth, format, type, level, base, max, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + private native int dispatch_gluBuild3DMipmapLevels(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, short[] data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + public int gluBuild3DMipmapLevelsC(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, int[] data) + { + final long __addr_ = gluProcAddressTable._addressof_gluBuild3DMipmapLevels; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild3DMipmapLevels\" not available"); + } + return dispatch_gluBuild3DMipmapLevels(target, internalFormat, width, height, depth, format, type, level, base, max, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + private native int dispatch_gluBuild3DMipmapLevels(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, int[] data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + public int gluBuild3DMipmapLevelsC(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, float[] data) + { + final long __addr_ = gluProcAddressTable._addressof_gluBuild3DMipmapLevels; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild3DMipmapLevels\" not available"); + } + return dispatch_gluBuild3DMipmapLevels(target, internalFormat, width, height, depth, format, type, level, base, max, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + private native int dispatch_gluBuild3DMipmapLevels(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, float[] data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + public int gluBuild3DMipmapLevelsC(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, java.nio.Buffer data) + { + if (!BufferFactory.isDirect(data)) + throw new GLException("Argument \"data\" was not a direct buffer"); + final long __addr_ = gluProcAddressTable._addressof_gluBuild3DMipmapLevels; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild3DMipmapLevels\" not available"); + } + return dispatch_gluBuild3DMipmapLevels(target, internalFormat, width, height, depth, format, type, level, base, max, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ + native private int dispatch_gluBuild3DMipmapLevels(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, java.nio.Buffer data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); </code> */ + public int gluBuild3DMipmapsC(int target, int internalFormat, int width, int height, int depth, int format, int type, byte[] data) + { + final long __addr_ = gluProcAddressTable._addressof_gluBuild3DMipmaps; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild3DMipmaps\" not available"); + } + return dispatch_gluBuild3DMipmaps(target, internalFormat, width, height, depth, format, type, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); </code> */ + private native int dispatch_gluBuild3DMipmaps(int target, int internalFormat, int width, int height, int depth, int format, int type, byte[] data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); </code> */ + public int gluBuild3DMipmapsC(int target, int internalFormat, int width, int height, int depth, int format, int type, short[] data) + { + final long __addr_ = gluProcAddressTable._addressof_gluBuild3DMipmaps; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild3DMipmaps\" not available"); + } + return dispatch_gluBuild3DMipmaps(target, internalFormat, width, height, depth, format, type, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); </code> */ + private native int dispatch_gluBuild3DMipmaps(int target, int internalFormat, int width, int height, int depth, int format, int type, short[] data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); </code> */ + public int gluBuild3DMipmapsC(int target, int internalFormat, int width, int height, int depth, int format, int type, int[] data) + { + final long __addr_ = gluProcAddressTable._addressof_gluBuild3DMipmaps; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild3DMipmaps\" not available"); + } + return dispatch_gluBuild3DMipmaps(target, internalFormat, width, height, depth, format, type, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); </code> */ + private native int dispatch_gluBuild3DMipmaps(int target, int internalFormat, int width, int height, int depth, int format, int type, int[] data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); </code> */ + public int gluBuild3DMipmapsC(int target, int internalFormat, int width, int height, int depth, int format, int type, float[] data) + { + final long __addr_ = gluProcAddressTable._addressof_gluBuild3DMipmaps; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild3DMipmaps\" not available"); + } + return dispatch_gluBuild3DMipmaps(target, internalFormat, width, height, depth, format, type, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); </code> */ + private native int dispatch_gluBuild3DMipmaps(int target, int internalFormat, int width, int height, int depth, int format, int type, float[] data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); </code> */ + public int gluBuild3DMipmapsC(int target, int internalFormat, int width, int height, int depth, int format, int type, java.nio.Buffer data) + { + if (!BufferFactory.isDirect(data)) + throw new GLException("Argument \"data\" was not a direct buffer"); + final long __addr_ = gluProcAddressTable._addressof_gluBuild3DMipmaps; + if (__addr_ == 0) { + throw new GLException("Method \"gluBuild3DMipmaps\" not available"); + } + return dispatch_gluBuild3DMipmaps(target, internalFormat, width, height, depth, format, type, data, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); </code> */ + native private int dispatch_gluBuild3DMipmaps(int target, int internalFormat, int width, int height, int depth, int format, int type, java.nio.Buffer data, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); </code> */ + public int gluScaleImageC(int format, int wIn, int hIn, int typeIn, byte[] dataIn, int wOut, int hOut, int typeOut, byte[] dataOut) + { + final long __addr_ = gluProcAddressTable._addressof_gluScaleImage; + if (__addr_ == 0) { + throw new GLException("Method \"gluScaleImage\" not available"); + } + return dispatch_gluScaleImage(format, wIn, hIn, typeIn, dataIn, wOut, hOut, typeOut, dataOut, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); </code> */ + private native int dispatch_gluScaleImage(int format, int wIn, int hIn, int typeIn, byte[] dataIn, int wOut, int hOut, int typeOut, byte[] dataOut, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); </code> */ + public int gluScaleImageC(int format, int wIn, int hIn, int typeIn, short[] dataIn, int wOut, int hOut, int typeOut, short[] dataOut) + { + final long __addr_ = gluProcAddressTable._addressof_gluScaleImage; + if (__addr_ == 0) { + throw new GLException("Method \"gluScaleImage\" not available"); + } + return dispatch_gluScaleImage(format, wIn, hIn, typeIn, dataIn, wOut, hOut, typeOut, dataOut, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); </code> */ + private native int dispatch_gluScaleImage(int format, int wIn, int hIn, int typeIn, short[] dataIn, int wOut, int hOut, int typeOut, short[] dataOut, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); </code> */ + public int gluScaleImageC(int format, int wIn, int hIn, int typeIn, int[] dataIn, int wOut, int hOut, int typeOut, int[] dataOut) + { + final long __addr_ = gluProcAddressTable._addressof_gluScaleImage; + if (__addr_ == 0) { + throw new GLException("Method \"gluScaleImage\" not available"); + } + return dispatch_gluScaleImage(format, wIn, hIn, typeIn, dataIn, wOut, hOut, typeOut, dataOut, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); </code> */ + private native int dispatch_gluScaleImage(int format, int wIn, int hIn, int typeIn, int[] dataIn, int wOut, int hOut, int typeOut, int[] dataOut, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); </code> */ + public int gluScaleImageC(int format, int wIn, int hIn, int typeIn, float[] dataIn, int wOut, int hOut, int typeOut, float[] dataOut) + { + final long __addr_ = gluProcAddressTable._addressof_gluScaleImage; + if (__addr_ == 0) { + throw new GLException("Method \"gluScaleImage\" not available"); + } + return dispatch_gluScaleImage(format, wIn, hIn, typeIn, dataIn, wOut, hOut, typeOut, dataOut, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); </code> */ + private native int dispatch_gluScaleImage(int format, int wIn, int hIn, int typeIn, float[] dataIn, int wOut, int hOut, int typeOut, float[] dataOut, long glProcAddress); + + + /** Entry point to C language function: <br> <code> GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); </code> */ + public int gluScaleImageC(int format, int wIn, int hIn, int typeIn, java.nio.Buffer dataIn, int wOut, int hOut, int typeOut, java.nio.Buffer dataOut) + { + if (!BufferFactory.isDirect(dataIn)) + throw new GLException("Argument \"dataIn\" was not a direct buffer"); + if (!BufferFactory.isDirect(dataOut)) + throw new GLException("Argument \"dataOut\" was not a direct buffer"); + final long __addr_ = gluProcAddressTable._addressof_gluScaleImage; + if (__addr_ == 0) { + throw new GLException("Method \"gluScaleImage\" not available"); + } + return dispatch_gluScaleImage(format, wIn, hIn, typeIn, dataIn, wOut, hOut, typeOut, dataOut, __addr_); + } + + /** Encapsulates function pointer for OpenGL function <br>: <code> GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); </code> */ + native private int dispatch_gluScaleImage(int format, int wIn, int hIn, int typeIn, java.nio.Buffer dataIn, int wOut, int hOut, int typeOut, java.nio.Buffer dataOut, long glProcAddress); + + + diff --git a/make/glu-impl-common.cfg b/make/glu-impl-common.cfg index 13a7cfead..6710d0369 100644 --- a/make/glu-impl-common.cfg +++ b/make/glu-impl-common.cfg @@ -13,6 +13,7 @@ GetProcAddressTableExpr gluProcAddressTable # and to the Mipmap class for scaling and mipmap generation Import net.java.games.jogl.impl.tesselator.GLUtesselatorImpl Import net.java.games.jogl.impl.mipmap.Mipmap +Import java.security.* # Custom Java code for GLUImpl class IncludeAs CustomJavaCode GLUImpl glu-impl-common-CustomJavaCode.java diff --git a/make/glu-impl-win32.cfg b/make/glu-impl-win32.cfg index cc6b13a72..983513712 100644 --- a/make/glu-impl-win32.cfg +++ b/make/glu-impl-win32.cfg @@ -1,7 +1,5 @@ # This .cfg file is used to generate the GLU implementation on Windows. -Include glu-impl-common.cfg - CustomCCode #define WIN32_LEAN_AND_MEAN CustomCCode #include <windows.h> CustomCCode #undef WIN32_LEAN_AND_MEAN @@ -13,7 +11,9 @@ CustomCCode #if _MSC_VER <= 1200 CustomCCode typedef int intptr_t; CustomCCode #endif +Include glu-impl-common.cfg + # FIXME!!!! # Include some hacks to get around the fact that GLU1.3 is not yet # supported in Windows distributions. -Include glu-impl-win32-GLU13Hacks.cfg +# Include glu-impl-win32-GLU13Hacks.cfg diff --git a/make/glu-interface-common-CustomJavaCode.java b/make/glu-interface-common-CustomJavaCode.java index 0019046c5..8be08f0a6 100644 --- a/make/glu-interface-common-CustomJavaCode.java +++ b/make/glu-interface-common-CustomJavaCode.java @@ -803,6 +803,118 @@ public void gluTessProperty(GLUtesselator tesselator, int which, double value); public void gluTessVertex(GLUtesselator tesselator, double[] coords, Object data); +//---------------------------------------------------------------------- +// Mipmap and scaling routines +// + +/** Interface to C language function: <br> <code> GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild1DMipmapLevels(int target, int internalFormat, int width, int format, int type, int level, int base, int max, byte[] data); + +/** Interface to C language function: <br> <code> GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild1DMipmapLevels(int target, int internalFormat, int width, int format, int type, int level, int base, int max, short[] data); + +/** Interface to C language function: <br> <code> GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild1DMipmapLevels(int target, int internalFormat, int width, int format, int type, int level, int base, int max, int[] data); + +/** Interface to C language function: <br> <code> GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild1DMipmapLevels(int target, int internalFormat, int width, int format, int type, int level, int base, int max, float[] data); + +/** Interface to C language function: <br> <code> GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild1DMipmapLevels(int target, int internalFormat, int width, int format, int type, int level, int base, int max, java.nio.Buffer data); + +/** Interface to C language function: <br> <code> GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild1DMipmaps(int target, int internalFormat, int width, int format, int type, byte[] data); + +/** Interface to C language function: <br> <code> GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild1DMipmaps(int target, int internalFormat, int width, int format, int type, short[] data); + +/** Interface to C language function: <br> <code> GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild1DMipmaps(int target, int internalFormat, int width, int format, int type, int[] data); + +/** Interface to C language function: <br> <code> GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild1DMipmaps(int target, int internalFormat, int width, int format, int type, float[] data); + +/** Interface to C language function: <br> <code> GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild2DMipmapLevels(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, byte[] data); + +/** Interface to C language function: <br> <code> GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild2DMipmapLevels(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, short[] data); + +/** Interface to C language function: <br> <code> GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild2DMipmapLevels(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, int[] data); + +/** Interface to C language function: <br> <code> GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild2DMipmapLevels(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, float[] data); + +/** Interface to C language function: <br> <code> GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild2DMipmapLevels(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, java.nio.Buffer data); + +/** Interface to C language function: <br> <code> GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild2DMipmaps(int target, int internalFormat, int width, int height, int format, int type, byte[] data); + +/** Interface to C language function: <br> <code> GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild2DMipmaps(int target, int internalFormat, int width, int height, int format, int type, short[] data); + +/** Interface to C language function: <br> <code> GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild2DMipmaps(int target, int internalFormat, int width, int height, int format, int type, int[] data); + +/** Interface to C language function: <br> <code> GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild2DMipmaps(int target, int internalFormat, int width, int height, int format, int type, float[] data); + +/** Interface to C language function: <br> <code> GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild2DMipmaps(int target, int internalFormat, int width, int height, int format, int type, java.nio.Buffer data); + +/** Interface to C language function: <br> <code> GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild3DMipmapLevels(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, byte[] data); + +/** Interface to C language function: <br> <code> GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild3DMipmapLevels(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, short[] data); + +/** Interface to C language function: <br> <code> GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild3DMipmapLevels(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, int[] data); + +/** Interface to C language function: <br> <code> GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild3DMipmapLevels(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, float[] data); + +/** Interface to C language function: <br> <code> GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data); </code> */ +public int gluBuild3DMipmapLevels(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, java.nio.Buffer data); + +/** Interface to C language function: <br> <code> GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild3DMipmaps(int target, int internalFormat, int width, int height, int depth, int format, int type, byte[] data); + +/** Interface to C language function: <br> <code> GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild3DMipmaps(int target, int internalFormat, int width, int height, int depth, int format, int type, short[] data); + +/** Interface to C language function: <br> <code> GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild3DMipmaps(int target, int internalFormat, int width, int height, int depth, int format, int type, int[] data); + +/** Interface to C language function: <br> <code> GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild3DMipmaps(int target, int internalFormat, int width, int height, int depth, int format, int type, float[] data); + +/** Interface to C language function: <br> <code> GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data); </code> */ +public int gluBuild3DMipmaps(int target, int internalFormat, int width, int height, int depth, int format, int type, java.nio.Buffer data); + +/** Interface to C language function: <br> <code> GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); </code> */ +public int gluScaleImage(int format, int wIn, int hIn, int typeIn, byte[] dataIn, int wOut, int hOut, int typeOut, byte[] dataOut); + +/** Interface to C language function: <br> <code> GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); </code> */ +public int gluScaleImage(int format, int wIn, int hIn, int typeIn, short[] dataIn, int wOut, int hOut, int typeOut, short[] dataOut); + +/** Interface to C language function: <br> <code> GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); </code> */ +public int gluScaleImage(int format, int wIn, int hIn, int typeIn, int[] dataIn, int wOut, int hOut, int typeOut, int[] dataOut); + +/** Interface to C language function: <br> <code> GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); </code> */ +public int gluScaleImage(int format, int wIn, int hIn, int typeIn, float[] dataIn, int wOut, int hOut, int typeOut, float[] dataOut); + +/** Interface to C language function: <br> <code> GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut); </code> */ +public int gluScaleImage(int format, int wIn, int hIn, int typeIn, java.nio.Buffer dataIn, int wOut, int hOut, int typeOut, java.nio.Buffer dataOut); + + +//---------------------------------------------------------------------- +// Function availability routines +// + + /** * Returns true if the specified GLU core- or extension-function can be * successfully used through this GLU instance. By "successfully" we mean diff --git a/src/net/java/games/gluegen/opengl/GLEmitter.java b/src/net/java/games/gluegen/opengl/GLEmitter.java index b63d6e8b4..d30f145ab 100644 --- a/src/net/java/games/gluegen/opengl/GLEmitter.java +++ b/src/net/java/games/gluegen/opengl/GLEmitter.java @@ -288,6 +288,10 @@ public class GLEmitter extends JavaEmitter tableWriter.println("public class " + tableClassName); tableWriter.println("{"); numProcAddressEntries = 0; + + for (Iterator iter = getGLConfig().getForceProcAddressGen().iterator(); iter.hasNext(); ) { + emitGLProcAddressTableEntryForString((String) iter.next()); + } } private void endGLProcAddressTable() throws Exception @@ -331,9 +335,14 @@ public class GLEmitter extends JavaEmitter protected void emitGLProcAddressTableEntryForSymbol(FunctionSymbol cFunc) { + emitGLProcAddressTableEntryForString(cFunc.getName()); + } + + protected void emitGLProcAddressTableEntryForString(String str) + { tableWriter.print(" public long "); tableWriter.print(PROCADDRESS_VAR_PREFIX); - tableWriter.print(cFunc.getName()); + tableWriter.print(str); tableWriter.println(";"); ++numProcAddressEntries; } @@ -348,6 +357,7 @@ public class GLEmitter extends JavaEmitter private String tableClassPackage; private String tableClassName = "ProcAddressTable"; private Set/*<String>*/ skipProcAddressGen = new HashSet(); + private List/*<String>*/ forceProcAddressGen = new ArrayList(); private String contextVariableName = "context"; private String defaultGetProcAddressTableExpr = ".getGLProcAddressTable()"; private String getProcAddressTableExpr; @@ -371,6 +381,11 @@ public class GLEmitter extends JavaEmitter String sym = readString("SkipProcAddressGen", tok, filename, lineNo); skipProcAddressGen.add(sym); } + else if (cmd.equalsIgnoreCase("ForceProcAddressGen")) + { + String sym = readString("ForceProcAddressGen", tok, filename, lineNo); + forceProcAddressGen.add(sym); + } else if (cmd.equalsIgnoreCase("ContextVariableName")) { contextVariableName = readString("ContextVariableName", tok, filename, lineNo); @@ -399,6 +414,7 @@ public class GLEmitter extends JavaEmitter public String tableClassPackage() { return tableClassPackage; } public String tableClassName() { return tableClassName; } public boolean skipProcAddressGen (String name) { return skipProcAddressGen.contains(name); } + public List getForceProcAddressGen() { return forceProcAddressGen; } public String contextVariableName() { return contextVariableName; } public String getProcAddressTableExpr() { if (getProcAddressTableExpr == null) { diff --git a/src/net/java/games/jogl/impl/mipmap/BuildMipmap.java b/src/net/java/games/jogl/impl/mipmap/BuildMipmap.java index b9f4e7ab6..fd225a439 100644 --- a/src/net/java/games/jogl/impl/mipmap/BuildMipmap.java +++ b/src/net/java/games/jogl/impl/mipmap/BuildMipmap.java @@ -36,6 +36,7 @@ package net.java.games.jogl.impl.mipmap; import net.java.games.jogl.GL; import net.java.games.jogl.GLU; +import net.java.games.jogl.impl.Debug; import java.nio.*; import java.io.*; @@ -44,7 +45,9 @@ import java.io.*; * @author Administrator */ public class BuildMipmap { - + + private static boolean DEBUG = Debug.debug("BuildMipmap"); + /** Creates a new instance of BuildMipmap */ public BuildMipmap() { } @@ -694,19 +697,23 @@ public class BuildMipmap { gl.glPixelStorei( GL.GL_UNPACK_SWAP_BYTES, GL.GL_FALSE ); if( baseLevel <= level && level <= maxLevel ) { srcImage.rewind(); - System.err.println("GL Error(" + level + "): " + gl.glGetError() ); + if (DEBUG) { + System.err.println("GL Error(" + level + "): " + gl.glGetError() ); + } gl.glTexImage2D( target, level, internalFormat, newwidth, newheight, 0, format, type, srcImage ); - System.err.println("GL Error(" + level + "): " + gl.glGetError() ); - try { - File file = new File( "glu2DMipmapJ" + level + ".bin" ); - FileOutputStream fos = new FileOutputStream( file ); - srcImage.limit( Mipmap.image_size( newwidth, newheight, format, type ) ); - fos.getChannel().write( srcImage ); - srcImage.clear(); - fos.close(); - } catch( IOException e ) { - System.err.println("IOException"); - System.err.println(e.getMessage()); + if (DEBUG) { + System.err.println("GL Error(" + level + "): " + gl.glGetError() ); + try { + File file = new File( "glu2DMipmapJ" + level + ".bin" ); + FileOutputStream fos = new FileOutputStream( file ); + srcImage.limit( Mipmap.image_size( newwidth, newheight, format, type ) ); + fos.getChannel().write( srcImage ); + srcImage.clear(); + fos.close(); + } catch( IOException e ) { + System.err.println("IOException"); + System.err.println(e.getMessage()); + } } } @@ -800,16 +807,18 @@ public class BuildMipmap { if( baseLevel <= level && level <= maxLevel ) { srcImage.rewind(); gl.glTexImage2D( target, level, internalFormat, newwidth, newheight, 0, format, type, srcImage ); - System.err.println("GL Error(" + level + "): " + gl.glGetError() ); - try { - File file = new File( "glu2DMipmapJ" + level + ".bin" ); - FileOutputStream fos = new FileOutputStream( file ); - srcImage.limit( Mipmap.image_size( newwidth, newheight, format, type ) ); - fos.getChannel().write( srcImage ); - srcImage.clear(); - } catch( IOException e ) { - System.err.println("IOException"); - System.err.println(e.getMessage()); + if (DEBUG) { + System.err.println("GL Error(" + level + "): " + gl.glGetError() ); + try { + File file = new File( "glu2DMipmapJ" + level + ".bin" ); + FileOutputStream fos = new FileOutputStream( file ); + srcImage.limit( Mipmap.image_size( newwidth, newheight, format, type ) ); + fos.getChannel().write( srcImage ); + srcImage.clear(); + } catch( IOException e ) { + System.err.println("IOException"); + System.err.println(e.getMessage()); + } } } } else { @@ -844,16 +853,18 @@ public class BuildMipmap { if( baseLevel <= level && level <= maxLevel ) { newMipmapImage.rewind(); gl.glTexImage2D( target, level, internalFormat, newwidth, newheight, 0, format, type, newMipmapImage ); - System.err.println("GL Error: " + gl.glGetError() ); - try { - File file = new File( "glu2DMipmapJ" + level + ".bin" ); - FileOutputStream fos = new FileOutputStream( file ); - srcImage.limit( Mipmap.image_size( newwidth, newheight, format, type ) ); - fos.getChannel().write( newMipmapImage ); - srcImage.clear(); - } catch( IOException e ) { - System.err.println("IOException"); - System.err.println(e.getMessage()); + if (DEBUG) { + System.err.println("GL Error: " + gl.glGetError() ); + try { + File file = new File( "glu2DMipmapJ" + level + ".bin" ); + FileOutputStream fos = new FileOutputStream( file ); + srcImage.limit( Mipmap.image_size( newwidth, newheight, format, type ) ); + fos.getChannel().write( newMipmapImage ); + srcImage.clear(); + } catch( IOException e ) { + System.err.println("IOException"); + System.err.println(e.getMessage()); + } } } } @@ -1630,4 +1641,4 @@ public class BuildMipmap { gl.glPixelStorei( GL.GL_UNPACK_IMAGE_HEIGHT, psm.getUnpackImageHeight() ); return( 0 ); } -}
\ No newline at end of file +} diff --git a/src/net/java/games/jogl/impl/mipmap/Image.java b/src/net/java/games/jogl/impl/mipmap/Image.java index b0d54bfc0..1ea3b1f52 100644 --- a/src/net/java/games/jogl/impl/mipmap/Image.java +++ b/src/net/java/games/jogl/impl/mipmap/Image.java @@ -529,7 +529,7 @@ public class Image { userdata.put( iter, (byte)oldimage.get(iter2++) ); } else { //userdata[iter] = (byte)( oldimage[iter2++] >> 8 ); - userdata.put( iter, (byte)( oldimage.get(iter2++) >> 8 ) ); + userdata.put( iter, (byte)( oldimage.get(iter2++) ) ); } break; case( GL.GL_BYTE ): @@ -538,7 +538,7 @@ public class Image { userdata.put( iter, (byte)oldimage.get(iter2++) ); } else { //userdata[iter] = (byte)( oldimage[iter2++] >> 9 ); - userdata.put( iter, (byte)( oldimage.get(iter2++) >> 9 ) ); + userdata.put( iter, (byte)( oldimage.get(iter2++) ) ); } break; case( GL.GL_UNSIGNED_SHORT_5_6_5 ): |