aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--C2J/manual/glu-manualCodedImplJNI.c41
-rw-r--r--C2J/manual/glu-manualCodedImplJNI1-14.java2
-rw-r--r--C2J/manual/glu-manualCodedImplJNI14.c1729
-rw-r--r--C2J/manual/glu-manualCodedVirt-14.java2
-rw-r--r--CHANGES.txt13
-rw-r--r--CNativeCode/GLCallbackHelperJNI.c96
-rw-r--r--CNativeCode/GLCallbackHelperJNI.h7
-rw-r--r--CNativeCode/GLUCallbackJNI.c24
-rw-r--r--CNativeCode/OpenGLU_JauJNI12_funcs.c41
-rwxr-xr-xCNativeCode/OpenGLU_JauJNI12nf_funcs.c41
-rw-r--r--CNativeCode/OpenGLU_JauJNI12tst_funcs.c41
-rw-r--r--CNativeCode/OpenGLU_JauJNI14_funcs.c1729
-rw-r--r--CNativeCode/OpenGLU_JauJNI_funcs.c41
-rwxr-xr-xCNativeCode/gltool.c7
-rwxr-xr-xCNativeCode/invokejvm.c3
-rw-r--r--CNativeCode/jawt_misc.c13
-rw-r--r--gl4java/GLContext.java.skel8
-rw-r--r--gl4java/GLUFunc14.java2
-rw-r--r--gl4java/GLUFunc14JauJNI.java2
-rw-r--r--makefile24
-rw-r--r--symbols.mak.linux-java2-xf86-ppc-32bit1
-rw-r--r--symbols.mak.linux-java2-xf86-x86-32bit1
-rw-r--r--symbols.mak.sgi-irix65-mips-gcc-32bit48
23 files changed, 2141 insertions, 1775 deletions
diff --git a/C2J/manual/glu-manualCodedImplJNI.c b/C2J/manual/glu-manualCodedImplJNI.c
index 71c6027..ccfb4b5 100644
--- a/C2J/manual/glu-manualCodedImplJNI.c
+++ b/C2J/manual/glu-manualCodedImplJNI.c
@@ -1,5 +1,14 @@
+/** THIS IS A MANUAL CODED PART
+ glu-manualCodedImplJNI14.java
+*/
+
static const char _glu_n_a_string[] = "GLU-String not available !";
+static const char * _glu_lib_vendor_="Jausoft - Sven Goethel Software Development";
+static const char * _glu_lib_version_="2.8.3.0";
+
+/* ---------------------------------------------------------------------- */
+
JNIEXPORT jstring JNICALL
Java_gl4java_GLUFuncJauJNI_gluErrorString ( JNIEnv *env, jobject obj,
jint errorCode )
@@ -32,9 +41,6 @@ Java_gl4java_GLUFuncJauJNI_gluGetString ( JNIEnv *env, jobject obj,
return (*env)->NewStringUTF(env, tmpString);
}
-static const char * _glu_lib_vendor_="Jausoft - Sven Goethel Software Development";
-static const char * _glu_lib_version_="2.8.3.0";
-
JNIEXPORT jstring JNICALL
Java_gl4java_GLUFuncJauJNI_getNativeVendor ( JNIEnv *env, jobject obj )
{
@@ -71,6 +77,31 @@ static void _AddCallbackNode(JNIEnv *env,
free(strMethodName);
free(strSignature);
}
+
+static void _AddCallbackNodeForCbObj(JNIEnv *env,
+ jlong qnt_obj, jint which,
+ jobject methodClassInstance,
+ jstring methodName,
+ jstring signature,
+ jint arrayLen1,
+ jint arrayLen2,
+ jint arrayLen3,
+ jint arrayLen4,
+ jint arrayLen5)
+{
+ char * strMethodName = jnitoolsGetJavaString(env, methodName);
+ char * strSignature = jnitoolsGetJavaString(env, signature);
+ jlong glx=0;
+
+ glx = GetCurrentGLContext();
+
+ AddCallbackNodeForCbObj(env, methodClassInstance, strMethodName, strSignature,
+ arrayLen1, arrayLen2, arrayLen3,
+ arrayLen4, arrayLen5,
+ (void *)((PointerHolder)qnt_obj), which, glx);
+ free(strMethodName);
+ free(strSignature);
+}
JNIEXPORT void JNICALL
@@ -137,7 +168,7 @@ Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj,
jint arrayLen5)
{
if ( disp__gluTessCallback == NULL ) return;
-
+
switch(which)
{
case GLU_TESS_BEGIN:
@@ -204,7 +235,7 @@ Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj,
jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !");
return;
}
- _AddCallbackNode(env,
+ _AddCallbackNodeForCbObj(env,
tobj, which, methodClassInstance, methodName,
signature,
arrayLen1, arrayLen2, arrayLen3,
diff --git a/C2J/manual/glu-manualCodedImplJNI1-14.java b/C2J/manual/glu-manualCodedImplJNI1-14.java
index 92af083..db186f3 100644
--- a/C2J/manual/glu-manualCodedImplJNI1-14.java
+++ b/C2J/manual/glu-manualCodedImplJNI1-14.java
@@ -31,5 +31,5 @@ public final native void gluTessBeginPolygon ( long tess, Buffer data) ;
extern void gluTessVertex ( GLUtesselator * tess , GLdouble * location , GLvoid * data ) ;
* </pre>
*/
-public final native void gluTessVertex ( long tess, double[] location, Buffer data) ;
+public final native void gluTessVertex ( long tess, DoubleBuffer location, Buffer data) ;
diff --git a/C2J/manual/glu-manualCodedImplJNI14.c b/C2J/manual/glu-manualCodedImplJNI14.c
index f5ec125..1d54413 100644
--- a/C2J/manual/glu-manualCodedImplJNI14.c
+++ b/C2J/manual/glu-manualCodedImplJNI14.c
@@ -1,852 +1,877 @@
-/** THIS IS A MANUAL CODED PART
- glu-manualCodedImplJNI14.java
-*/
-
-static const char _glu_n_a_string[] = "GLU-String not avaiable !";
-
-static const char * _glu_lib_vendor_="Jausoft - Sven Goethel Software Development";
-static const char * _glu_lib_version_="2.8.3.0";
-
-/* ---------------------------------------------------------------------- */
-
-JNIEXPORT jstring JNICALL
-Java_gl4java_GLUFunc14JauJNI_gluErrorString ( JNIEnv *env, jobject obj,
- jint errorCode )
-{
- const char *tmpString=0;
-
- if ( disp__gluErrorString == NULL )
- return (*env)->NewStringUTF(env, _glu_n_a_string);
-
- tmpString = disp__gluErrorString ( /* jint */ errorCode );
- if(tmpString==NULL)
- tmpString=_glu_n_a_string;
-
- return (*env)->NewStringUTF(env, tmpString);
-}
-
-JNIEXPORT jstring JNICALL
-Java_gl4java_GLUFunc14JauJNI_gluGetString ( JNIEnv *env, jobject obj,
- jint name )
-{
- const char *tmpString=0;
-
- if ( disp__gluGetString == NULL )
- return (*env)->NewStringUTF(env, _glu_n_a_string);
-
- tmpString = disp__gluGetString ( /* jint */ name);
- if(tmpString==NULL)
- tmpString=_glu_n_a_string;
-
- return (*env)->NewStringUTF(env, tmpString);
-}
-
-JNIEXPORT jstring JNICALL
-Java_gl4java_GLUFunc14JauJNI_getNativeVendor ( JNIEnv *env, jobject obj )
-{
- return (*env)->NewStringUTF(env, _glu_lib_vendor_);
-}
-
-JNIEXPORT jstring JNICALL
-Java_gl4java_GLUFunc14JauJNI_getNativeVersion ( JNIEnv *env, jobject obj )
-{
- return (*env)->NewStringUTF(env, _glu_lib_version_);
-}
-
-
-/* ---------------------------------------------------------------------- */
-
-static void _AddCallbackNode(JNIEnv *env,
- jlong qnt_obj, jint which,
- jobject methodClassInstance,
- jstring methodName,
- jstring signature,
- jint arrayLen1,
- jint arrayLen2,
- jint arrayLen3,
- jint arrayLen4,
- jint arrayLen5)
-{
- char * strMethodName = jnitoolsGetJavaString(env, methodName);
- char * strSignature = jnitoolsGetJavaString(env, signature);
- jlong glx=0;
-
- glx = GetCurrentGLContext();
-
- AddCallbackNode(env, methodClassInstance, strMethodName, strSignature,
- arrayLen1, arrayLen2, arrayLen3,
- arrayLen4, arrayLen5,
- (void *)((PointerHolder)qnt_obj), which, glx);
- free(strMethodName);
- free(strSignature);
-}
-
-
-JNIEXPORT void JNICALL
-Java_gl4java_GLUFunc14JauJNI_gluQuadricCallback( JNIEnv *env, jobject obj,
- jlong qobj, jint which,
- jobject methodClassInstance,
- jstring methodName,
- jstring signature)
-{
- if ( disp__gluQuadricCallback == NULL ) return;
-
- switch(which)
- {
- case GLU_ERROR:
- disp__gluQuadricCallback((void *)((PointerHolder)qobj),
- which, cbf_GLU_ERROR );
- break;
- default:
- jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !");
- return;
- }
- _AddCallbackNode(env,
- qobj, which, methodClassInstance, methodName,
- signature,
- 0, 0, 0, 0, 0);
-}
-
-
-JNIEXPORT void JNICALL
-Java_gl4java_GLUFunc14JauJNI_gluNurbsCallback( JNIEnv *env, jobject obj,
- jlong nobj, jint which,
- jobject methodClassInstance,
- jstring methodName,
- jstring signature)
-{
- if ( disp__gluNurbsCallback == NULL ) return;
-
- switch(which)
- {
- case GLU_ERROR:
- disp__gluNurbsCallback((void *)((PointerHolder)nobj), which,
- cbf_GLU_ERROR );
- break;
- default:
- jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !");
- return;
- }
- _AddCallbackNode(env,
- nobj, which, methodClassInstance, methodName,
- signature,
- 0, 0, 0, 0, 0);
-}
-
-JNIEXPORT void JNICALL
-Java_gl4java_GLUFunc14JauJNI_gluTessCallback( JNIEnv *env, jobject obj,
- jlong tobj, jint which,
- jobject methodClassInstance,
- jstring methodName,
- jstring signature,
- jint arrayLen1,
- jint arrayLen2,
- jint arrayLen3,
- jint arrayLen4,
- jint arrayLen5)
-{
- if ( disp__gluTessCallback == NULL ) return;
-
- switch(which)
- {
- case GLU_TESS_BEGIN:
- disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
- which,
- cbf_GLU_TESS_BEGIN );
- break;
- case GLU_TESS_BEGIN_DATA:
- disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
- which,
- cbf_GLU_TESS_BEGIN_DATA );
- break;
- case GLU_TESS_EDGE_FLAG:
- disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
- which,
- cbf_GLU_TESS_EDGE_FLAG );
- break;
- case GLU_TESS_EDGE_FLAG_DATA:
- disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
- which,
- cbf_GLU_TESS_EDGE_FLAG_DATA );
- break;
- case GLU_TESS_VERTEX:
- disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
- which,
- cbf_GLU_TESS_VERTEX );
- break;
- case GLU_TESS_VERTEX_DATA:
- disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
- which,
- cbf_GLU_TESS_VERTEX_DATA );
- break;
- case GLU_TESS_END:
- disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
- which,
- cbf_GLU_TESS_END );
- break;
- case GLU_TESS_END_DATA:
- disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
- which,
- cbf_GLU_TESS_END_DATA );
- break;
- case GLU_TESS_ERROR:
- disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
- which,
- cbf_GLU_TESS_ERROR );
- break;
- case GLU_TESS_ERROR_DATA:
- disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
- which,
- cbf_GLU_TESS_ERROR_DATA );
- break;
- case GLU_TESS_COMBINE:
- disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
- which,
- cbf_GLU_TESS_COMBINE );
- break;
- case GLU_TESS_COMBINE_DATA:
- disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
- which,
- cbf_GLU_TESS_COMBINE_DATA );
- break;
- default:
- jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !");
- return;
- }
- _AddCallbackNode(env,
- tobj, which, methodClassInstance, methodName,
- signature,
- arrayLen1, arrayLen2, arrayLen3,
- arrayLen4, arrayLen5);
-}
-
-JNIEXPORT void JNICALL
-Java_gl4java_GLUFunc14JauJNI_gluDeleteQuadric( JNIEnv *env, jobject obj,
- jlong qobj )
-{
- if ( disp__gluDeleteQuadric == NULL ) return;
-
- disp__gluDeleteQuadric((void *)((PointerHolder)qobj));
- RemoveCallbackNodes((void *)((PointerHolder)qobj));
-}
-
-JNIEXPORT void JNICALL
-Java_gl4java_GLUFunc14JauJNI_gluDeleteNurbsRenderer( JNIEnv *env, jobject obj,
- jlong nobj )
-{
- if ( disp__gluDeleteNurbsRenderer == NULL ) return;
-
- disp__gluDeleteNurbsRenderer((void *)((PointerHolder)nobj));
- RemoveCallbackNodes((void *)((PointerHolder)nobj));
-}
-
-JNIEXPORT void JNICALL
-Java_gl4java_GLUFunc14JauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
- jlong tobj )
-{
- if ( disp__gluDeleteTess == NULL ) return;
-
- disp__gluDeleteTess((GLUtesselator *)((PointerHolder)tobj));
- RemoveCallbackNodes((void *)((PointerHolder)tobj));
-}
-
-JNIEXPORT jlong JNICALL
-Java_gl4java_GLUFunc14JauJNI_gluNewQuadric( JNIEnv *env, jobject obj)
-{
- if ( disp__gluNewQuadric == NULL ) return 0;
-
- return (jlong)((PointerHolder)disp__gluNewQuadric());
-}
-
-JNIEXPORT jlong JNICALL
-Java_gl4java_GLUFunc14JauJNI_gluNewNurbsRenderer( JNIEnv *env, jobject obj)
-{
- if ( disp__gluNewNurbsRenderer == NULL ) return 0;
-
- return (jlong)((PointerHolder)disp__gluNewNurbsRenderer());
-}
-
-JNIEXPORT jlong JNICALL
-Java_gl4java_GLUFunc14JauJNI_gluNewTess( JNIEnv *env, jobject obj)
-{
- if ( disp__gluNewTess == NULL ) return 0;
-
- return (jlong)((PointerHolder)disp__gluNewTess());
-}
-
-#include "MemoryManager.h"
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluTessBeginContour ( GLUtesselator * tess ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessBeginContour (
- JNIEnv *env, jobject obj,
- jlong tess)
- {
-
- if ( disp__gluTessBeginContour == NULL ) return;
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessBeginContour (
- (GLUtesselator *) (PointerHolder) tess
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluTessBeginPolygon ( GLUtesselator * tess , GLvoid * data ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3B (
- JNIEnv *env, jobject obj,
- jlong tess,
- jbyteArray data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jbyte *ptr1 = NULL;
-
- if ( disp__gluTessBeginPolygon == NULL ) return;
-
- if(data!=NULL)
- {
- ptr1 = (jbyte *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessBeginPolygon (
- (GLUtesselator *) (PointerHolder) tess,
- (GLvoid *) ptr1
- );
-
- if(data!=NULL)
- {
- (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3S (
- JNIEnv *env, jobject obj,
- jlong tess,
- jshortArray data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jshort *ptr1 = NULL;
-
- if ( disp__gluTessBeginPolygon == NULL ) return;
-
- if(data!=NULL)
- {
- ptr1 = (jshort *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessBeginPolygon (
- (GLUtesselator *) (PointerHolder) tess,
- (GLvoid *) ptr1
- );
-
- if(data!=NULL)
- {
- (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3I (
- JNIEnv *env, jobject obj,
- jlong tess,
- jintArray data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jint *ptr1 = NULL;
-
- if ( disp__gluTessBeginPolygon == NULL ) return;
-
- if(data!=NULL)
- {
- ptr1 = (jint *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessBeginPolygon (
- (GLUtesselator *) (PointerHolder) tess,
- (GLvoid *) ptr1
- );
-
- if(data!=NULL)
- {
- (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3F (
- JNIEnv *env, jobject obj,
- jlong tess,
- jfloatArray data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jfloat *ptr1 = NULL;
-
- if ( disp__gluTessBeginPolygon == NULL ) return;
-
- if(data!=NULL)
- {
- ptr1 = (jfloat *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessBeginPolygon (
- (GLUtesselator *) (PointerHolder) tess,
- (GLvoid *) ptr1
- );
-
- if(data!=NULL)
- {
- (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3D (
- JNIEnv *env, jobject obj,
- jlong tess,
- jdoubleArray data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jdouble *ptr1 = NULL;
-
- if ( disp__gluTessBeginPolygon == NULL ) return;
-
- if(data!=NULL)
- {
- ptr1 = (jdouble *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessBeginPolygon (
- (GLUtesselator *) (PointerHolder) tess,
- (GLvoid *) ptr1
- );
-
- if(data!=NULL)
- {
- (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3Z (
- JNIEnv *env, jobject obj,
- jlong tess,
- jbooleanArray data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jboolean *ptr1 = NULL;
-
- if ( disp__gluTessBeginPolygon == NULL ) return;
-
- if(data!=NULL)
- {
- ptr1 = (jboolean *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessBeginPolygon (
- (GLUtesselator *) (PointerHolder) tess,
- (GLvoid *) ptr1
- );
-
- if(data!=NULL)
- {
- (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3J (
- JNIEnv *env, jobject obj,
- jlong tess,
- jlongArray data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jlong *ptr1 = NULL;
-
- if ( disp__gluTessBeginPolygon == NULL ) return;
-
- if(data!=NULL)
- {
- ptr1 = (jlong *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessBeginPolygon (
- (GLUtesselator *) (PointerHolder) tess,
- (GLvoid *) ptr1
- );
-
- if(data!=NULL)
- {
- (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__JLjava_nio_Buffer_2 (
- JNIEnv *env, jobject obj,
- jlong tess,
- jobject data)
- {
- void *ptr1 = NULL;
-
- if ( disp__gluTessBeginPolygon == NULL ) return;
-
- if(data!=NULL)
- {
- ptr1 = (*env)->GetDirectBufferAddress(env, data);
- if (ptr1 == NULL) {
- (*env)->ThrowNew(env, (*env)->FindClass(env, "java/lang/IllegalArgumentException"),
- "Argument 1 was not a direct buffer");
- return ;
- }
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessBeginPolygon (
- (GLUtesselator *) (PointerHolder) tess,
- (GLvoid *) ptr1
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluTessEndContour ( GLUtesselator * tess ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessEndContour (
- JNIEnv *env, jobject obj,
- jlong tess)
- {
-
- if ( disp__gluTessEndContour == NULL ) return;
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessEndContour (
- (GLUtesselator *) (PointerHolder) tess
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluTessEndPolygon ( GLUtesselator * tess ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessEndPolygon (
- JNIEnv *env, jobject obj,
- jlong tess)
- {
-
- if ( disp__gluTessEndPolygon == NULL ) return;
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessEndPolygon (
- (GLUtesselator *) (PointerHolder) tess
- );
- FreeArrays(env, MEMM_TESSELATOR);
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluTessNormal ( GLUtesselator * tess , GLdouble valueX , GLdouble valueY , GLdouble valueZ ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessNormal (
- JNIEnv *env, jobject obj,
- jlong tess,
- jdouble valueX,
- jdouble valueY,
- jdouble valueZ)
- {
-
- if ( disp__gluTessNormal == NULL ) return;
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessNormal (
- (GLUtesselator *) (PointerHolder) tess,
- (GLdouble) valueX,
- (GLdouble) valueY,
- (GLdouble) valueZ
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluTessProperty ( GLUtesselator * tess , GLenum which , GLdouble data ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessProperty (
- JNIEnv *env, jobject obj,
- jlong tess,
- jint which,
- jdouble data)
- {
-
- if ( disp__gluTessProperty == NULL ) return;
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessProperty (
- (GLUtesselator *) (PointerHolder) tess,
- (GLenum) which,
- (GLdouble) data
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluTessVertex ( GLUtesselator * tess , GLdouble * location , GLvoid * data ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3B (
- JNIEnv *env, jobject obj,
- jlong tess,
- jdoubleArray location,
- jbyteArray data)
- {
- jdouble *ptr1 = NULL;
- jbyte *ptr2 = NULL;
-
- if ( disp__gluTessVertex == NULL ) return;
-
- if(location!=NULL)
- {
- ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
- RegisterArray(env, location, ptr1, MEMM_DOUBLE, MEMM_TESSELATOR);
- }
- if(data!=NULL)
- {
- ptr2 = (jbyte *) (*env)->GetByteArrayElements(env, data, 0);
- RegisterArray(env, data, ptr2, MEMM_BYTE, MEMM_TESSELATOR);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessVertex (
- (GLUtesselator *) (PointerHolder) tess,
- (GLdouble *) ptr1,
- (GLvoid *) ptr2
- );
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3S (
- JNIEnv *env, jobject obj,
- jlong tess,
- jdoubleArray location,
- jshortArray data)
- {
- jdouble *ptr1 = NULL;
- jshort *ptr2 = NULL;
-
- if ( disp__gluTessVertex == NULL ) return;
-
- if(location!=NULL)
- {
- ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
- RegisterArray(env, location, ptr1, MEMM_DOUBLE, MEMM_TESSELATOR);
- }
- if(data!=NULL)
- {
- ptr2 = (jshort *) (*env)->GetShortArrayElements(env, data, 0);
- RegisterArray(env, data, ptr2, MEMM_SHORT, MEMM_TESSELATOR);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessVertex (
- (GLUtesselator *) (PointerHolder) tess,
- (GLdouble *) ptr1,
- (GLvoid *) ptr2
- );
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3I (
- JNIEnv *env, jobject obj,
- jlong tess,
- jdoubleArray location,
- jintArray data)
- {
- jdouble *ptr1 = NULL;
- jint *ptr2 = NULL;
-
- if ( disp__gluTessVertex == NULL ) return;
-
- if(location!=NULL)
- {
- ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
- RegisterArray(env, location, ptr1, MEMM_DOUBLE, MEMM_TESSELATOR);
- }
- if(data!=NULL)
- {
- ptr2 = (jint *) (*env)->GetIntArrayElements(env, data, 0);
- RegisterArray(env, data, ptr2, MEMM_INT, MEMM_TESSELATOR);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessVertex (
- (GLUtesselator *) (PointerHolder) tess,
- (GLdouble *) ptr1,
- (GLvoid *) ptr2
- );
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3F (
- JNIEnv *env, jobject obj,
- jlong tess,
- jdoubleArray location,
- jfloatArray data)
- {
- jdouble *ptr1 = NULL;
- jfloat *ptr2 = NULL;
-
- if ( disp__gluTessVertex == NULL ) return;
-
- if(location!=NULL)
- {
- ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
- RegisterArray(env, location, ptr1, MEMM_DOUBLE, MEMM_TESSELATOR);
- }
- if(data!=NULL)
- {
- ptr2 = (jfloat *) (*env)->GetFloatArrayElements(env, data, 0);
- RegisterArray(env, data, ptr2, MEMM_FLOAT, MEMM_TESSELATOR);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessVertex (
- (GLUtesselator *) (PointerHolder) tess,
- (GLdouble *) ptr1,
- (GLvoid *) ptr2
- );
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3D (
- JNIEnv *env, jobject obj,
- jlong tess,
- jdoubleArray location,
- jdoubleArray data)
- {
- jdouble *ptr1 = NULL;
- jdouble *ptr2 = NULL;
-
- if ( disp__gluTessVertex == NULL ) return;
-
- if(location!=NULL)
- {
- ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
- RegisterArray(env, location, ptr1, MEMM_DOUBLE, MEMM_TESSELATOR);
- }
- if(data!=NULL)
- {
- ptr2 = (jdouble *) (*env)->GetDoubleArrayElements(env, data, 0);
- RegisterArray(env, data, ptr2, MEMM_DOUBLE, MEMM_TESSELATOR);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessVertex (
- (GLUtesselator *) (PointerHolder) tess,
- (GLdouble *) ptr1,
- (GLvoid *) ptr2
- );
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3Z (
- JNIEnv *env, jobject obj,
- jlong tess,
- jdoubleArray location,
- jbooleanArray data)
- {
- jdouble *ptr1 = NULL;
- jboolean *ptr2 = NULL;
-
- if ( disp__gluTessVertex == NULL ) return;
-
- if(location!=NULL)
- {
- ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
- RegisterArray(env, location, ptr1, MEMM_DOUBLE, MEMM_TESSELATOR);
- }
- if(data!=NULL)
- {
- ptr2 = (jboolean *) (*env)->GetBooleanArrayElements(env, data, 0);
- RegisterArray(env, data, ptr2, MEMM_BOOLEAN, MEMM_TESSELATOR);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessVertex (
- (GLUtesselator *) (PointerHolder) tess,
- (GLdouble *) ptr1,
- (GLvoid *) ptr2
- );
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3J (
- JNIEnv *env, jobject obj,
- jlong tess,
- jdoubleArray location,
- jlongArray data)
- {
- jdouble *ptr1 = NULL;
- jlong *ptr2 = NULL;
-
- if ( disp__gluTessVertex == NULL ) return;
-
- if(location!=NULL)
- {
- ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
- RegisterArray(env, location, ptr1, MEMM_DOUBLE, MEMM_TESSELATOR);
- }
- if(data!=NULL)
- {
- ptr2 = (jlong *) (*env)->GetLongArrayElements(env, data, 0);
- RegisterArray(env, data, ptr2, MEMM_LONG, MEMM_TESSELATOR);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessVertex (
- (GLUtesselator *) (PointerHolder) tess,
- (GLdouble *) ptr1,
- (GLvoid *) ptr2
- );
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3DLjava_nio_Buffer_2 (
- JNIEnv *env, jobject obj,
- jlong tess,
- jdoubleArray location,
- jobject data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jdouble *ptr1 = NULL;
- void *ptr2 = NULL;
-
- if ( disp__gluTessVertex == NULL ) return;
-
- if(data!=NULL)
- {
- ptr2 = (*env)->GetDirectBufferAddress(env, data);
- if (ptr2 == NULL) {
- (*env)->ThrowNew(env, (*env)->FindClass(env, "java/lang/IllegalArgumentException"),
- "Argument 2 was not a direct buffer");
- return ;
- }
- }
- if(location!=NULL)
- {
- ptr1 = (jdouble *) (*env)->GetPrimitiveArrayCritical(env, location, &isCopiedArray1);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessVertex (
- (GLUtesselator *) (PointerHolder) tess,
- (GLdouble *) ptr1,
- (GLvoid *) ptr2
- );
-
- if(location!=NULL)
- {
- (*env)->ReleasePrimitiveArrayCritical(env, location, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
-
+/** THIS IS A MANUAL CODED PART
+ glu-manualCodedImplJNI14.java
+*/
+
+static const char _glu_n_a_string[] = "GLU-String not available !";
+
+static const char * _glu_lib_vendor_="Jausoft - Sven Goethel Software Development";
+static const char * _glu_lib_version_="2.8.3.0";
+
+/* ---------------------------------------------------------------------- */
+
+JNIEXPORT jstring JNICALL
+Java_gl4java_GLUFunc14JauJNI_gluErrorString ( JNIEnv *env, jobject obj,
+ jint errorCode )
+{
+ const char *tmpString=0;
+
+ if ( disp__gluErrorString == NULL )
+ return (*env)->NewStringUTF(env, _glu_n_a_string);
+
+ tmpString = disp__gluErrorString ( /* jint */ errorCode );
+ if(tmpString==NULL)
+ tmpString=_glu_n_a_string;
+
+ return (*env)->NewStringUTF(env, tmpString);
+}
+
+JNIEXPORT jstring JNICALL
+Java_gl4java_GLUFunc14JauJNI_gluGetString ( JNIEnv *env, jobject obj,
+ jint name )
+{
+ const char *tmpString=0;
+
+ if ( disp__gluGetString == NULL )
+ return (*env)->NewStringUTF(env, _glu_n_a_string);
+
+ tmpString = disp__gluGetString ( /* jint */ name);
+ if(tmpString==NULL)
+ tmpString=_glu_n_a_string;
+
+ return (*env)->NewStringUTF(env, tmpString);
+}
+
+JNIEXPORT jstring JNICALL
+Java_gl4java_GLUFunc14JauJNI_getNativeVendor ( JNIEnv *env, jobject obj )
+{
+ return (*env)->NewStringUTF(env, _glu_lib_vendor_);
+}
+
+JNIEXPORT jstring JNICALL
+Java_gl4java_GLUFunc14JauJNI_getNativeVersion ( JNIEnv *env, jobject obj )
+{
+ return (*env)->NewStringUTF(env, _glu_lib_version_);
+}
+
+
+/* ---------------------------------------------------------------------- */
+
+static void _AddCallbackNode(JNIEnv *env,
+ jlong qnt_obj, jint which,
+ jobject methodClassInstance,
+ jstring methodName,
+ jstring signature,
+ jint arrayLen1,
+ jint arrayLen2,
+ jint arrayLen3,
+ jint arrayLen4,
+ jint arrayLen5)
+{
+ char * strMethodName = jnitoolsGetJavaString(env, methodName);
+ char * strSignature = jnitoolsGetJavaString(env, signature);
+ jlong glx=0;
+
+ glx = GetCurrentGLContext();
+
+ AddCallbackNode(env, methodClassInstance, strMethodName, strSignature,
+ arrayLen1, arrayLen2, arrayLen3,
+ arrayLen4, arrayLen5,
+ (void *)((PointerHolder)qnt_obj), which, glx);
+ free(strMethodName);
+ free(strSignature);
+}
+
+static void _AddCallbackNodeForCbObj(JNIEnv *env,
+ jlong qnt_obj, jint which,
+ jobject methodClassInstance,
+ jstring methodName,
+ jstring signature,
+ jint arrayLen1,
+ jint arrayLen2,
+ jint arrayLen3,
+ jint arrayLen4,
+ jint arrayLen5)
+{
+ char * strMethodName = jnitoolsGetJavaString(env, methodName);
+ char * strSignature = jnitoolsGetJavaString(env, signature);
+ jlong glx=0;
+
+ glx = GetCurrentGLContext();
+
+ AddCallbackNodeForCbObj(env, methodClassInstance, strMethodName, strSignature,
+ arrayLen1, arrayLen2, arrayLen3,
+ arrayLen4, arrayLen5,
+ (void *)((PointerHolder)qnt_obj), which, glx);
+ free(strMethodName);
+ free(strSignature);
+}
+
+
+JNIEXPORT void JNICALL
+Java_gl4java_GLUFunc14JauJNI_gluQuadricCallback( JNIEnv *env, jobject obj,
+ jlong qobj, jint which,
+ jobject methodClassInstance,
+ jstring methodName,
+ jstring signature)
+{
+ if ( disp__gluQuadricCallback == NULL ) return;
+
+ switch(which)
+ {
+ case GLU_ERROR:
+ disp__gluQuadricCallback((void *)((PointerHolder)qobj),
+ which, cbf_GLU_ERROR );
+ break;
+ default:
+ jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !");
+ return;
+ }
+ _AddCallbackNode(env,
+ qobj, which, methodClassInstance, methodName,
+ signature,
+ 0, 0, 0, 0, 0);
+}
+
+
+JNIEXPORT void JNICALL
+Java_gl4java_GLUFunc14JauJNI_gluNurbsCallback( JNIEnv *env, jobject obj,
+ jlong nobj, jint which,
+ jobject methodClassInstance,
+ jstring methodName,
+ jstring signature)
+{
+ if ( disp__gluNurbsCallback == NULL ) return;
+
+ switch(which)
+ {
+ case GLU_ERROR:
+ disp__gluNurbsCallback((void *)((PointerHolder)nobj), which,
+ cbf_GLU_ERROR );
+ break;
+ default:
+ jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !");
+ return;
+ }
+ _AddCallbackNode(env,
+ nobj, which, methodClassInstance, methodName,
+ signature,
+ 0, 0, 0, 0, 0);
+}
+
+JNIEXPORT void JNICALL
+Java_gl4java_GLUFunc14JauJNI_gluTessCallback( JNIEnv *env, jobject obj,
+ jlong tobj, jint which,
+ jobject methodClassInstance,
+ jstring methodName,
+ jstring signature,
+ jint arrayLen1,
+ jint arrayLen2,
+ jint arrayLen3,
+ jint arrayLen4,
+ jint arrayLen5)
+{
+ if ( disp__gluTessCallback == NULL ) return;
+
+ switch(which)
+ {
+ case GLU_TESS_BEGIN:
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ which,
+ cbf_GLU_TESS_BEGIN );
+ break;
+ case GLU_TESS_BEGIN_DATA:
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ which,
+ cbf_GLU_TESS_BEGIN_DATA );
+ break;
+ case GLU_TESS_EDGE_FLAG:
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ which,
+ cbf_GLU_TESS_EDGE_FLAG );
+ break;
+ case GLU_TESS_EDGE_FLAG_DATA:
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ which,
+ cbf_GLU_TESS_EDGE_FLAG_DATA );
+ break;
+ case GLU_TESS_VERTEX:
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ which,
+ cbf_GLU_TESS_VERTEX );
+ break;
+ case GLU_TESS_VERTEX_DATA:
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ which,
+ cbf_GLU_TESS_VERTEX_DATA );
+ break;
+ case GLU_TESS_END:
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ which,
+ cbf_GLU_TESS_END );
+ break;
+ case GLU_TESS_END_DATA:
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ which,
+ cbf_GLU_TESS_END_DATA );
+ break;
+ case GLU_TESS_ERROR:
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ which,
+ cbf_GLU_TESS_ERROR );
+ break;
+ case GLU_TESS_ERROR_DATA:
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ which,
+ cbf_GLU_TESS_ERROR_DATA );
+ break;
+ case GLU_TESS_COMBINE:
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ which,
+ cbf_GLU_TESS_COMBINE );
+ break;
+ case GLU_TESS_COMBINE_DATA:
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ which,
+ cbf_GLU_TESS_COMBINE_DATA );
+ break;
+ default:
+ jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !");
+ return;
+ }
+ _AddCallbackNodeForCbObj(env,
+ tobj, which, methodClassInstance, methodName,
+ signature,
+ arrayLen1, arrayLen2, arrayLen3,
+ arrayLen4, arrayLen5);
+}
+
+JNIEXPORT void JNICALL
+Java_gl4java_GLUFunc14JauJNI_gluDeleteQuadric( JNIEnv *env, jobject obj,
+ jlong qobj )
+{
+ if ( disp__gluDeleteQuadric == NULL ) return;
+
+ disp__gluDeleteQuadric((void *)((PointerHolder)qobj));
+ RemoveCallbackNodes((void *)((PointerHolder)qobj));
+}
+
+JNIEXPORT void JNICALL
+Java_gl4java_GLUFunc14JauJNI_gluDeleteNurbsRenderer( JNIEnv *env, jobject obj,
+ jlong nobj )
+{
+ if ( disp__gluDeleteNurbsRenderer == NULL ) return;
+
+ disp__gluDeleteNurbsRenderer((void *)((PointerHolder)nobj));
+ RemoveCallbackNodes((void *)((PointerHolder)nobj));
+}
+
+JNIEXPORT void JNICALL
+Java_gl4java_GLUFunc14JauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
+ jlong tobj )
+{
+ if ( disp__gluDeleteTess == NULL ) return;
+
+ disp__gluDeleteTess((GLUtesselator *)((PointerHolder)tobj));
+ RemoveCallbackNodes((void *)((PointerHolder)tobj));
+}
+
+JNIEXPORT jlong JNICALL
+Java_gl4java_GLUFunc14JauJNI_gluNewQuadric( JNIEnv *env, jobject obj)
+{
+ if ( disp__gluNewQuadric == NULL ) return 0;
+
+ return (jlong)((PointerHolder)disp__gluNewQuadric());
+}
+
+JNIEXPORT jlong JNICALL
+Java_gl4java_GLUFunc14JauJNI_gluNewNurbsRenderer( JNIEnv *env, jobject obj)
+{
+ if ( disp__gluNewNurbsRenderer == NULL ) return 0;
+
+ return (jlong)((PointerHolder)disp__gluNewNurbsRenderer());
+}
+
+JNIEXPORT jlong JNICALL
+Java_gl4java_GLUFunc14JauJNI_gluNewTess( JNIEnv *env, jobject obj)
+{
+ if ( disp__gluNewTess == NULL ) return 0;
+
+ return (jlong)((PointerHolder)disp__gluNewTess());
+}
+
+#include "MemoryManager.h"
+
+/**
+ * Original Function-Prototype :
+ * <pre>
+ extern void gluTessBeginContour ( GLUtesselator * tess ) ;
+ * </pre>
+ */
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessBeginContour (
+ JNIEnv *env, jobject obj,
+ jlong tess)
+ {
+
+ if ( disp__gluTessBeginContour == NULL ) return;
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessBeginContour (
+ (GLUtesselator *) (PointerHolder) tess
+ );
+
+ }
+
+/**
+ * Original Function-Prototype :
+ * <pre>
+ extern void gluTessBeginPolygon ( GLUtesselator * tess , GLvoid * data ) ;
+ * </pre>
+ */
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3B (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jbyteArray data)
+ {
+ jboolean isCopiedArray1 = JNI_FALSE;
+ jbyte *ptr1 = NULL;
+
+ if ( disp__gluTessBeginPolygon == NULL ) return;
+
+ if(data!=NULL)
+ {
+ ptr1 = (jbyte *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessBeginPolygon (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLvoid *) ptr1
+ );
+
+ if(data!=NULL)
+ {
+ (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
+ }
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3S (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jshortArray data)
+ {
+ jboolean isCopiedArray1 = JNI_FALSE;
+ jshort *ptr1 = NULL;
+
+ if ( disp__gluTessBeginPolygon == NULL ) return;
+
+ if(data!=NULL)
+ {
+ ptr1 = (jshort *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessBeginPolygon (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLvoid *) ptr1
+ );
+
+ if(data!=NULL)
+ {
+ (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
+ }
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3I (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jintArray data)
+ {
+ jboolean isCopiedArray1 = JNI_FALSE;
+ jint *ptr1 = NULL;
+
+ if ( disp__gluTessBeginPolygon == NULL ) return;
+
+ if(data!=NULL)
+ {
+ ptr1 = (jint *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessBeginPolygon (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLvoid *) ptr1
+ );
+
+ if(data!=NULL)
+ {
+ (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
+ }
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3F (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jfloatArray data)
+ {
+ jboolean isCopiedArray1 = JNI_FALSE;
+ jfloat *ptr1 = NULL;
+
+ if ( disp__gluTessBeginPolygon == NULL ) return;
+
+ if(data!=NULL)
+ {
+ ptr1 = (jfloat *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessBeginPolygon (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLvoid *) ptr1
+ );
+
+ if(data!=NULL)
+ {
+ (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
+ }
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3D (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jdoubleArray data)
+ {
+ jboolean isCopiedArray1 = JNI_FALSE;
+ jdouble *ptr1 = NULL;
+
+ if ( disp__gluTessBeginPolygon == NULL ) return;
+
+ if(data!=NULL)
+ {
+ ptr1 = (jdouble *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessBeginPolygon (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLvoid *) ptr1
+ );
+
+ if(data!=NULL)
+ {
+ (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
+ }
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3Z (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jbooleanArray data)
+ {
+ jboolean isCopiedArray1 = JNI_FALSE;
+ jboolean *ptr1 = NULL;
+
+ if ( disp__gluTessBeginPolygon == NULL ) return;
+
+ if(data!=NULL)
+ {
+ ptr1 = (jboolean *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessBeginPolygon (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLvoid *) ptr1
+ );
+
+ if(data!=NULL)
+ {
+ (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
+ }
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3J (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jlongArray data)
+ {
+ jboolean isCopiedArray1 = JNI_FALSE;
+ jlong *ptr1 = NULL;
+
+ if ( disp__gluTessBeginPolygon == NULL ) return;
+
+ if(data!=NULL)
+ {
+ ptr1 = (jlong *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessBeginPolygon (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLvoid *) ptr1
+ );
+
+ if(data!=NULL)
+ {
+ (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
+ }
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__JLjava_nio_Buffer_2 (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jobject data)
+ {
+ void *ptr1 = NULL;
+
+ if ( disp__gluTessBeginPolygon == NULL ) return;
+
+ if(data!=NULL)
+ {
+ ptr1 = (*env)->GetDirectBufferAddress(env, data);
+ if (ptr1 == NULL) {
+ (*env)->ThrowNew(env, (*env)->FindClass(env, "java/lang/IllegalArgumentException"),
+ "Argument 1 was not a direct buffer");
+ return ;
+ }
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessBeginPolygon (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLvoid *) ptr1
+ );
+
+ }
+
+/**
+ * Original Function-Prototype :
+ * <pre>
+ extern void gluTessEndContour ( GLUtesselator * tess ) ;
+ * </pre>
+ */
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessEndContour (
+ JNIEnv *env, jobject obj,
+ jlong tess)
+ {
+
+ if ( disp__gluTessEndContour == NULL ) return;
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessEndContour (
+ (GLUtesselator *) (PointerHolder) tess
+ );
+
+ }
+
+/**
+ * Original Function-Prototype :
+ * <pre>
+ extern void gluTessEndPolygon ( GLUtesselator * tess ) ;
+ * </pre>
+ */
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessEndPolygon (
+ JNIEnv *env, jobject obj,
+ jlong tess)
+ {
+
+ if ( disp__gluTessEndPolygon == NULL ) return;
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessEndPolygon (
+ (GLUtesselator *) (PointerHolder) tess
+ );
+ FreeArrays(env, MEMM_TESSELATOR);
+
+ }
+
+/**
+ * Original Function-Prototype :
+ * <pre>
+ extern void gluTessNormal ( GLUtesselator * tess , GLdouble valueX , GLdouble valueY , GLdouble valueZ ) ;
+ * </pre>
+ */
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessNormal (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jdouble valueX,
+ jdouble valueY,
+ jdouble valueZ)
+ {
+
+ if ( disp__gluTessNormal == NULL ) return;
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessNormal (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLdouble) valueX,
+ (GLdouble) valueY,
+ (GLdouble) valueZ
+ );
+
+ }
+
+/**
+ * Original Function-Prototype :
+ * <pre>
+ extern void gluTessProperty ( GLUtesselator * tess , GLenum which , GLdouble data ) ;
+ * </pre>
+ */
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessProperty (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jint which,
+ jdouble data)
+ {
+
+ if ( disp__gluTessProperty == NULL ) return;
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessProperty (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLenum) which,
+ (GLdouble) data
+ );
+
+ }
+
+/**
+ * Original Function-Prototype :
+ * <pre>
+ extern void gluTessVertex ( GLUtesselator * tess , GLdouble * location , GLvoid * data ) ;
+ * </pre>
+ */
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3B (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jdoubleArray location,
+ jbyteArray data)
+ {
+ jdouble *ptr1 = NULL;
+ jbyte *ptr2 = NULL;
+
+ if ( disp__gluTessVertex == NULL ) return;
+
+ if(location!=NULL)
+ {
+ ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
+ RegisterArray(env, location, ptr1, T_DOUBLE_ARRAY, MEMM_TESSELATOR);
+ }
+ if(data!=NULL)
+ {
+ ptr2 = (jbyte *) (*env)->GetByteArrayElements(env, data, 0);
+ RegisterArray(env, data, ptr2, T_BYTE_ARRAY, MEMM_TESSELATOR);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessVertex (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLdouble *) ptr1,
+ (GLvoid *) ptr2
+ );
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3S (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jdoubleArray location,
+ jshortArray data)
+ {
+ jdouble *ptr1 = NULL;
+ jshort *ptr2 = NULL;
+
+ if ( disp__gluTessVertex == NULL ) return;
+
+ if(location!=NULL)
+ {
+ ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
+ RegisterArray(env, location, ptr1, T_DOUBLE_ARRAY, MEMM_TESSELATOR);
+ }
+ if(data!=NULL)
+ {
+ ptr2 = (jshort *) (*env)->GetShortArrayElements(env, data, 0);
+ RegisterArray(env, data, ptr2, T_SHORT_ARRAY, MEMM_TESSELATOR);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessVertex (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLdouble *) ptr1,
+ (GLvoid *) ptr2
+ );
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3I (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jdoubleArray location,
+ jintArray data)
+ {
+ jdouble *ptr1 = NULL;
+ jint *ptr2 = NULL;
+
+ if ( disp__gluTessVertex == NULL ) return;
+
+ if(location!=NULL)
+ {
+ ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
+ RegisterArray(env, location, ptr1, T_DOUBLE_ARRAY, MEMM_TESSELATOR);
+ }
+ if(data!=NULL)
+ {
+ ptr2 = (jint *) (*env)->GetIntArrayElements(env, data, 0);
+ RegisterArray(env, data, ptr2, T_INT_ARRAY, MEMM_TESSELATOR);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessVertex (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLdouble *) ptr1,
+ (GLvoid *) ptr2
+ );
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3F (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jdoubleArray location,
+ jfloatArray data)
+ {
+ jdouble *ptr1 = NULL;
+ jfloat *ptr2 = NULL;
+
+ if ( disp__gluTessVertex == NULL ) return;
+
+ if(location!=NULL)
+ {
+ ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
+ RegisterArray(env, location, ptr1, T_DOUBLE_ARRAY, MEMM_TESSELATOR);
+ }
+ if(data!=NULL)
+ {
+ ptr2 = (jfloat *) (*env)->GetFloatArrayElements(env, data, 0);
+ RegisterArray(env, data, ptr2, T_FLOAT_ARRAY, MEMM_TESSELATOR);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessVertex (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLdouble *) ptr1,
+ (GLvoid *) ptr2
+ );
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3D (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jdoubleArray location,
+ jdoubleArray data)
+ {
+ jdouble *ptr1 = NULL;
+ jdouble *ptr2 = NULL;
+
+ if ( disp__gluTessVertex == NULL ) return;
+
+ if(location!=NULL)
+ {
+ ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
+ RegisterArray(env, location, ptr1, T_DOUBLE_ARRAY, MEMM_TESSELATOR);
+ }
+ if(data!=NULL)
+ {
+ ptr2 = (jdouble *) (*env)->GetDoubleArrayElements(env, data, 0);
+ RegisterArray(env, data, ptr2, T_DOUBLE_ARRAY, MEMM_TESSELATOR);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessVertex (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLdouble *) ptr1,
+ (GLvoid *) ptr2
+ );
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3Z (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jdoubleArray location,
+ jbooleanArray data)
+ {
+ jdouble *ptr1 = NULL;
+ jboolean *ptr2 = NULL;
+
+ if ( disp__gluTessVertex == NULL ) return;
+
+ if(location!=NULL)
+ {
+ ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
+ RegisterArray(env, location, ptr1, T_DOUBLE_ARRAY, MEMM_TESSELATOR);
+ }
+ if(data!=NULL)
+ {
+ ptr2 = (jboolean *) (*env)->GetBooleanArrayElements(env, data, 0);
+ RegisterArray(env, data, ptr2, T_BOOLEAN_ARRAY, MEMM_TESSELATOR);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessVertex (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLdouble *) ptr1,
+ (GLvoid *) ptr2
+ );
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3J (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jdoubleArray location,
+ jlongArray data)
+ {
+ jdouble *ptr1 = NULL;
+ jlong *ptr2 = NULL;
+
+ if ( disp__gluTessVertex == NULL ) return;
+
+ if(location!=NULL)
+ {
+ ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
+ RegisterArray(env, location, ptr1, T_DOUBLE_ARRAY, MEMM_TESSELATOR);
+ }
+ if(data!=NULL)
+ {
+ ptr2 = (jlong *) (*env)->GetLongArrayElements(env, data, 0);
+ RegisterArray(env, data, ptr2, T_LONG_ARRAY, MEMM_TESSELATOR);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessVertex (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLdouble *) ptr1,
+ (GLvoid *) ptr2
+ );
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessVertex__JLjava_nio_DoubleBuffer_2Ljava_nio_Buffer_2 (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jobject location,
+ jobject data)
+ {
+ jboolean isCopiedArray1 = JNI_FALSE;
+ jdouble *ptr1 = NULL;
+ void *ptr2 = NULL;
+
+ if ( disp__gluTessVertex == NULL ) return;
+
+ if(location!=NULL)
+ {
+ ptr1 = (jdouble *) (*env)->GetDirectBufferAddress(env, location);
+ if (ptr1 == NULL) {
+ (*env)->ThrowNew(env, (*env)->FindClass(env, "java/lang/IllegalArgumentException"),
+ "Argument 1 was not a direct double buffer");
+ return ;
+ }
+ }
+ if(data!=NULL)
+ {
+ ptr2 = (*env)->GetDirectBufferAddress(env, data);
+ if (ptr2 == NULL) {
+ (*env)->ThrowNew(env, (*env)->FindClass(env, "java/lang/IllegalArgumentException"),
+ "Argument 2 was not a direct buffer");
+ return ;
+ }
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessVertex (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLdouble *) ptr1,
+ (GLvoid *) ptr2
+ );
+ }
+
diff --git a/C2J/manual/glu-manualCodedVirt-14.java b/C2J/manual/glu-manualCodedVirt-14.java
index 642fb4f..470c16a 100644
--- a/C2J/manual/glu-manualCodedVirt-14.java
+++ b/C2J/manual/glu-manualCodedVirt-14.java
@@ -31,5 +31,5 @@ public void gluTessBeginPolygon ( long tess, Buffer data) ;
extern void gluTessVertex ( GLUtesselator * tess , GLdouble * location , GLvoid * data ) ;
* </pre>
*/
-public void gluTessVertex ( long tess, double[] location, Buffer data) ;
+public void gluTessVertex ( long tess, DoubleBuffer location, Buffer data) ;
diff --git a/CHANGES.txt b/CHANGES.txt
index ed4565c..4168898 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -34,15 +34,22 @@ Mar 2002 (Version 2.8.3 - CVS .. much TODO YET )
o wglDeleteContext is used right now,
Thanxs to Kenneth and ??
+ o Adding / Merging Pepijn Van Eeckhoudt's JVM <= 1.3 GC fixes
+
+ o Tesselation with NIO support
+
+ o Improved native library loading
+ - Unix: read dlerror
+
+ o Added MAKE macro to symbols.mak / makefile
+
+ o SGI Irix 6.5 may works now ..
o TODO:
- - Adding / Merging Pepijn Van Eeckhoudt's GC fixes
- - Tesselation with NIO support
- Textures with NIO support
- Reviewing GL compatibility and support ..
-
11th Dec 2001 (Version 2.8.2 - ReleaseCandidate 1 - 2.8.2.0)
o Added dynamic binding/loading of jawt (kbr)
diff --git a/CNativeCode/GLCallbackHelperJNI.c b/CNativeCode/GLCallbackHelperJNI.c
index 6900b5e..d992622 100644
--- a/CNativeCode/GLCallbackHelperJNI.c
+++ b/CNativeCode/GLCallbackHelperJNI.c
@@ -130,6 +130,36 @@ CallbackNode * LIBAPIENTRY FindCallbackNode(GLenum which, jlong glx)
cbe->methodName, cbe->signature,
cbe->which, (long)(cbe->glx));
+ if( cbe->which == which && cbe->glx == glx )
+ )
+ break;
+ cbn=cbn->next;
+ }
+ #else
+ while(cbn!=NULL &&
+ (cbn->this->which!=which || cbn->this->glx!=glx )
+ )
+ cbn=cbn->next;
+ #endif
+
+ return cbn;
+}
+
+CallbackNode * LIBAPIENTRY FindCallbackNodeOfCurrentCbObj(GLenum which, jlong glx)
+{
+ CallbackNode * cbn = pCallbackNodeRoot;
+
+ #ifdef DEBUG
+ CallbackEntry * cbe = NULL;
+ printf("FindCallbackNode> which:=%d, glx:=%ld\n",
+ which, (long)glx);
+ while(cbn!=NULL)
+ {
+ cbe=cbn->this;
+ printf(" test cbe(%s %s): which:=%d, glx:=%ld\n",
+ cbe->methodName, cbe->signature,
+ cbe->which, (long)(cbe->glx));
+
if( cbe->which == which && cbe->glx == glx &&
((curCbObj == NULL) || (cbe->cb_obj == curCbObj))
)
@@ -147,6 +177,7 @@ CallbackNode * LIBAPIENTRY FindCallbackNode(GLenum which, jlong glx)
return cbn;
}
+
CallbackEntry * LIBAPIENTRY FindCallbackEntry(GLenum which, jlong glx)
{
CallbackNode * cbn = FindCallbackNode(which, glx);
@@ -154,6 +185,13 @@ CallbackEntry * LIBAPIENTRY FindCallbackEntry(GLenum which, jlong glx)
return cbn->this;
}
+CallbackEntry * LIBAPIENTRY FindCallbackEntryOfCurrentCbObj(GLenum which, jlong glx)
+{
+ CallbackNode * cbn = FindCallbackNodeOfCurrentCbObj(which, glx);
+ if(cbn==NULL) return NULL;
+ return cbn->this;
+}
+
void LIBAPIENTRY AddCallbackNode(JNIEnv * env, jobject jobj,
const char *methodName, const char *signature,
int arrayLen1, int arrayLen2, int arrayLen3,
@@ -164,6 +202,7 @@ void LIBAPIENTRY AddCallbackNode(JNIEnv * env, jobject jobj,
CallbackNode * last_cbn = NULL;
CallbackEntry * cbe = NULL;
+ SetCurrentCallbackObject(cb_obj);
cbn = FindCallbackNode (which, glx);
if(cbn != NULL)
{
@@ -210,6 +249,63 @@ void LIBAPIENTRY AddCallbackNode(JNIEnv * env, jobject jobj,
DBG_PRINT_CBN("AddCallbackNode", cbn);
}
+void LIBAPIENTRY AddCallbackNodeForCbObj(JNIEnv * env, jobject jobj,
+ const char *methodName, const char *signature,
+ int arrayLen1, int arrayLen2, int arrayLen3,
+ int arrayLen4, int arrayLen5,
+ void *cb_obj, GLenum which, jlong glx)
+{
+ CallbackNode * cbn = NULL;
+ CallbackNode * last_cbn = NULL;
+ CallbackEntry * cbe = NULL;
+
+ SetCurrentCallbackObject(cb_obj);
+ cbn = FindCallbackNodeOfCurrentCbObj (which, glx);
+ if(cbn != NULL)
+ {
+ cbe = cbn->this;
+ CleanCallbackEntry(cbe);
+ } else {
+ cbe = calloc(1, sizeof(CallbackEntry));
+ }
+
+ cbe->env=env;
+ cbe->jobj= (*env)->NewGlobalRef(env, jobj);
+ if(methodName!=NULL)
+ {
+ cbe->methodName=calloc(strlen(methodName)+1, 1);
+ strcpy(cbe->methodName, methodName);
+ }
+ if(signature!=NULL)
+ {
+ cbe->signature=calloc(strlen(signature)+1, 1);
+ strcpy(cbe->signature, signature);
+ }
+ cbe->argListNumber= jnitoolsGetArgNumber(env, signature, cbe->methodName);
+ cbe->arrayLen1=arrayLen1;
+ cbe->arrayLen2=arrayLen2;
+ cbe->arrayLen3=arrayLen3;
+ cbe->arrayLen4=arrayLen4;
+ cbe->arrayLen5=arrayLen5;
+ cbe->cb_obj=cb_obj;
+ cbe->which=which;
+ cbe->glx=glx;
+
+ if(cbn == NULL)
+ {
+ cbn = calloc(1, sizeof(CallbackNode));
+ cbn->this = cbe;
+ last_cbn = LastCallbackNode();
+ if(last_cbn==NULL)
+ pCallbackNodeRoot=cbn;
+ else {
+ last_cbn->next=cbn;
+ cbn->prev=last_cbn;
+ }
+ }
+ DBG_PRINT_CBN("AddCallbackNode", cbn);
+}
+
void LIBAPIENTRY RemoveCallbackNodes(void *cb_obj)
{
CallbackNode * cbn = NULL;
diff --git a/CNativeCode/GLCallbackHelperJNI.h b/CNativeCode/GLCallbackHelperJNI.h
index 0a1dd63..a432af1 100644
--- a/CNativeCode/GLCallbackHelperJNI.h
+++ b/CNativeCode/GLCallbackHelperJNI.h
@@ -54,14 +54,21 @@
LIBAPI CallbackNode * LIBAPIENTRY FindNextCallbackNodeOfCbObj(void *cb_obj);
LIBAPI CallbackNode * LIBAPIENTRY FindCallbackNode(GLenum which, jlong glx);
+ LIBAPI CallbackNode * LIBAPIENTRY FindCallbackNodeOfCurrentCbObj(GLenum which, jlong glx);
LIBAPI CallbackEntry * LIBAPIENTRY FindCallbackEntry(GLenum which, jlong glx);
+ LIBAPI CallbackEntry * LIBAPIENTRY FindCallbackEntryOfCurrentCbObj(GLenum which, jlong glx);
LIBAPI void LIBAPIENTRY AddCallbackNode(JNIEnv * env, jobject jobj,
const char *methodName, const char *signature,
int arrayLen1, int arrayLen2, int arrayLen3,
int arrayLen4, int arrayLen5,
void *cb_obj, GLenum which, jlong glx);
+ LIBAPI void LIBAPIENTRY AddCallbackNodeForCbObj(JNIEnv * env, jobject jobj,
+ const char *methodName, const char *signature,
+ int arrayLen1, int arrayLen2, int arrayLen3,
+ int arrayLen4, int arrayLen5,
+ void *cb_obj, GLenum which, jlong glx);
LIBAPI void LIBAPIENTRY RemoveCallbackNodes(void *cb_obj);
diff --git a/CNativeCode/GLUCallbackJNI.c b/CNativeCode/GLUCallbackJNI.c
index ef2da51..4d98f9c 100644
--- a/CNativeCode/GLUCallbackJNI.c
+++ b/CNativeCode/GLUCallbackJNI.c
@@ -11,7 +11,7 @@ void LIBAPIENTRY cbf_GLU_TESS_BEGIN (GLenum type)
jmethodID id=0;
CallbackEntry * cbe = NULL;
- cbe = FindCallbackEntry(GLU_TESS_BEGIN, GetCurrentGLContext());
+ cbe = FindCallbackEntryOfCurrentCbObj(GLU_TESS_BEGIN, GetCurrentGLContext());
if(cbe==NULL)
{
@@ -47,7 +47,7 @@ void LIBAPIENTRY cbf_GLU_TESS_BEGIN_DATA (GLenum type, void *udata)
JavaBasicType jbt=0;
jarray arr=0;
- CallbackEntry * cbe = FindCallbackEntry(GLU_TESS_BEGIN_DATA, GetCurrentGLContext());
+ CallbackEntry * cbe = FindCallbackEntryOfCurrentCbObj(GLU_TESS_BEGIN_DATA, GetCurrentGLContext());
if(cbe==NULL)
{
@@ -92,7 +92,7 @@ void LIBAPIENTRY cbf_GLU_TESS_EDGE_FLAG (GLboolean flag)
jclass oclass=0;
jmethodID id=0;
- CallbackEntry * cbe = FindCallbackEntry(GLU_TESS_EDGE_FLAG, GetCurrentGLContext());
+ CallbackEntry * cbe = FindCallbackEntryOfCurrentCbObj(GLU_TESS_EDGE_FLAG, GetCurrentGLContext());
if(cbe==NULL)
{
@@ -125,7 +125,7 @@ void LIBAPIENTRY cbf_GLU_TESS_EDGE_FLAG_DATA (GLboolean flag, void *udata)
JavaBasicType jbt=0;
jarray arr=0;
- CallbackEntry * cbe = FindCallbackEntry(GLU_TESS_EDGE_FLAG_DATA, GetCurrentGLContext());
+ CallbackEntry * cbe = FindCallbackEntryOfCurrentCbObj(GLU_TESS_EDGE_FLAG_DATA, GetCurrentGLContext());
if(cbe==NULL)
{
@@ -172,7 +172,7 @@ void LIBAPIENTRY cbf_GLU_TESS_VERTEX (void * vdata)
JavaBasicType jbt=0;
jarray arr=0;
- CallbackEntry * cbe = FindCallbackEntry(GLU_TESS_VERTEX, GetCurrentGLContext());
+ CallbackEntry * cbe = FindCallbackEntryOfCurrentCbObj(GLU_TESS_VERTEX, GetCurrentGLContext());
if(cbe==NULL)
{
@@ -221,7 +221,7 @@ void LIBAPIENTRY cbf_GLU_TESS_VERTEX_DATA (void * vdata, void * udata)
JavaBasicType jbt1=0;
jarray arr1=0;
- CallbackEntry * cbe = FindCallbackEntry(GLU_TESS_VERTEX_DATA, GetCurrentGLContext());
+ CallbackEntry * cbe = FindCallbackEntryOfCurrentCbObj(GLU_TESS_VERTEX_DATA, GetCurrentGLContext());
if(cbe==NULL)
{
@@ -271,7 +271,7 @@ void LIBAPIENTRY cbf_GLU_TESS_END (void)
jclass oclass=0;
jmethodID id=0;
- CallbackEntry * cbe = FindCallbackEntry(GLU_TESS_END, GetCurrentGLContext());
+ CallbackEntry * cbe = FindCallbackEntryOfCurrentCbObj(GLU_TESS_END, GetCurrentGLContext());
if(cbe==NULL)
{
@@ -304,7 +304,7 @@ void LIBAPIENTRY cbf_GLU_TESS_END_DATA (void * udata)
JavaBasicType jbt=0;
jarray arr=0;
- CallbackEntry * cbe = FindCallbackEntry(GLU_TESS_END_DATA, GetCurrentGLContext());
+ CallbackEntry * cbe = FindCallbackEntryOfCurrentCbObj(GLU_TESS_END_DATA, GetCurrentGLContext());
if(cbe==NULL)
{
@@ -349,7 +349,7 @@ void LIBAPIENTRY cbf_GLU_TESS_ERROR (GLenum errno)
jclass oclass=0;
jmethodID id=0;
- CallbackEntry * cbe = FindCallbackEntry(GLU_TESS_ERROR, GetCurrentGLContext());
+ CallbackEntry * cbe = FindCallbackEntryOfCurrentCbObj(GLU_TESS_ERROR, GetCurrentGLContext());
if(cbe==NULL)
{
@@ -382,7 +382,7 @@ void LIBAPIENTRY cbf_GLU_TESS_ERROR_DATA (GLenum errno, void * udata)
JavaBasicType jbt=0;
jarray arr=0;
- CallbackEntry * cbe = FindCallbackEntry(GLU_TESS_ERROR_DATA, GetCurrentGLContext());
+ CallbackEntry * cbe = FindCallbackEntryOfCurrentCbObj(GLU_TESS_ERROR_DATA, GetCurrentGLContext());
if(cbe==NULL)
{
@@ -438,7 +438,7 @@ void LIBAPIENTRY cbf_GLU_TESS_COMBINE (GLdouble coords[3], void *vdata[4],
void * combdata = NULL;
CallbackEntry * cbe = NULL;
- cbe = FindCallbackEntry(GLU_TESS_COMBINE, GetCurrentGLContext());
+ cbe = FindCallbackEntryOfCurrentCbObj(GLU_TESS_COMBINE, GetCurrentGLContext());
if(cbe==NULL)
{
@@ -530,7 +530,7 @@ void LIBAPIENTRY cbf_GLU_TESS_COMBINE_DATA (GLdouble coords[3], void *vdata[4],
jarray arr4=0;
void * combdata = NULL;
- CallbackEntry * cbe = FindCallbackEntry(GLU_TESS_COMBINE_DATA, GetCurrentGLContext());
+ CallbackEntry * cbe = FindCallbackEntryOfCurrentCbObj(GLU_TESS_COMBINE_DATA, GetCurrentGLContext());
if(cbe==NULL)
{
diff --git a/CNativeCode/OpenGLU_JauJNI12_funcs.c b/CNativeCode/OpenGLU_JauJNI12_funcs.c
index c0792f4..c4c3090 100644
--- a/CNativeCode/OpenGLU_JauJNI12_funcs.c
+++ b/CNativeCode/OpenGLU_JauJNI12_funcs.c
@@ -33,8 +33,17 @@
* herein lies the native JAVA methods for the OpenGL functions.
*/
+/** THIS IS A MANUAL CODED PART
+ glu-manualCodedImplJNI14.java
+*/
+
static const char _glu_n_a_string[] = "GLU-String not available !";
+static const char * _glu_lib_vendor_="Jausoft - Sven Goethel Software Development";
+static const char * _glu_lib_version_="2.8.3.0";
+
+/* ---------------------------------------------------------------------- */
+
JNIEXPORT jstring JNICALL
Java_gl4java_GLUFuncJauJNI_gluErrorString ( JNIEnv *env, jobject obj,
jint errorCode )
@@ -67,9 +76,6 @@ Java_gl4java_GLUFuncJauJNI_gluGetString ( JNIEnv *env, jobject obj,
return (*env)->NewStringUTF(env, tmpString);
}
-static const char * _glu_lib_vendor_="Jausoft - Sven Goethel Software Development";
-static const char * _glu_lib_version_="2.8.3.0";
-
JNIEXPORT jstring JNICALL
Java_gl4java_GLUFuncJauJNI_getNativeVendor ( JNIEnv *env, jobject obj )
{
@@ -106,6 +112,31 @@ static void _AddCallbackNode(JNIEnv *env,
free(strMethodName);
free(strSignature);
}
+
+static void _AddCallbackNodeForCbObj(JNIEnv *env,
+ jlong qnt_obj, jint which,
+ jobject methodClassInstance,
+ jstring methodName,
+ jstring signature,
+ jint arrayLen1,
+ jint arrayLen2,
+ jint arrayLen3,
+ jint arrayLen4,
+ jint arrayLen5)
+{
+ char * strMethodName = jnitoolsGetJavaString(env, methodName);
+ char * strSignature = jnitoolsGetJavaString(env, signature);
+ jlong glx=0;
+
+ glx = GetCurrentGLContext();
+
+ AddCallbackNodeForCbObj(env, methodClassInstance, strMethodName, strSignature,
+ arrayLen1, arrayLen2, arrayLen3,
+ arrayLen4, arrayLen5,
+ (void *)((PointerHolder)qnt_obj), which, glx);
+ free(strMethodName);
+ free(strSignature);
+}
JNIEXPORT void JNICALL
@@ -172,7 +203,7 @@ Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj,
jint arrayLen5)
{
if ( disp__gluTessCallback == NULL ) return;
-
+
switch(which)
{
case GLU_TESS_BEGIN:
@@ -239,7 +270,7 @@ Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj,
jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !");
return;
}
- _AddCallbackNode(env,
+ _AddCallbackNodeForCbObj(env,
tobj, which, methodClassInstance, methodName,
signature,
arrayLen1, arrayLen2, arrayLen3,
diff --git a/CNativeCode/OpenGLU_JauJNI12nf_funcs.c b/CNativeCode/OpenGLU_JauJNI12nf_funcs.c
index b7c6237..705106f 100755
--- a/CNativeCode/OpenGLU_JauJNI12nf_funcs.c
+++ b/CNativeCode/OpenGLU_JauJNI12nf_funcs.c
@@ -33,8 +33,17 @@
* herein lies the native JAVA methods for the OpenGL functions.
*/
+/** THIS IS A MANUAL CODED PART
+ glu-manualCodedImplJNI14.java
+*/
+
static const char _glu_n_a_string[] = "GLU-String not available !";
+static const char * _glu_lib_vendor_="Jausoft - Sven Goethel Software Development";
+static const char * _glu_lib_version_="2.8.3.0";
+
+/* ---------------------------------------------------------------------- */
+
JNIEXPORT jstring JNICALL
Java_gl4java_GLUFuncJauJNInf_gluErrorString ( JNIEnv *env, jobject obj,
jint errorCode )
@@ -67,9 +76,6 @@ Java_gl4java_GLUFuncJauJNInf_gluGetString ( JNIEnv *env, jobject obj,
return (*env)->NewStringUTF(env, tmpString);
}
-static const char * _glu_lib_vendor_="Jausoft - Sven Goethel Software Development";
-static const char * _glu_lib_version_="2.8.3.0";
-
JNIEXPORT jstring JNICALL
Java_gl4java_GLUFuncJauJNInf_getNativeVendor ( JNIEnv *env, jobject obj )
{
@@ -106,6 +112,31 @@ static void _AddCallbackNode(JNIEnv *env,
free(strMethodName);
free(strSignature);
}
+
+static void _AddCallbackNodeForCbObj(JNIEnv *env,
+ jlong qnt_obj, jint which,
+ jobject methodClassInstance,
+ jstring methodName,
+ jstring signature,
+ jint arrayLen1,
+ jint arrayLen2,
+ jint arrayLen3,
+ jint arrayLen4,
+ jint arrayLen5)
+{
+ char * strMethodName = jnitoolsGetJavaString(env, methodName);
+ char * strSignature = jnitoolsGetJavaString(env, signature);
+ jlong glx=0;
+
+ glx = GetCurrentGLContext();
+
+ AddCallbackNodeForCbObj(env, methodClassInstance, strMethodName, strSignature,
+ arrayLen1, arrayLen2, arrayLen3,
+ arrayLen4, arrayLen5,
+ (void *)((PointerHolder)qnt_obj), which, glx);
+ free(strMethodName);
+ free(strSignature);
+}
JNIEXPORT void JNICALL
@@ -172,7 +203,7 @@ Java_gl4java_GLUFuncJauJNInf_gluTessCallback( JNIEnv *env, jobject obj,
jint arrayLen5)
{
if ( disp__gluTessCallback == NULL ) return;
-
+
switch(which)
{
case GLU_TESS_BEGIN:
@@ -239,7 +270,7 @@ Java_gl4java_GLUFuncJauJNInf_gluTessCallback( JNIEnv *env, jobject obj,
jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !");
return;
}
- _AddCallbackNode(env,
+ _AddCallbackNodeForCbObj(env,
tobj, which, methodClassInstance, methodName,
signature,
arrayLen1, arrayLen2, arrayLen3,
diff --git a/CNativeCode/OpenGLU_JauJNI12tst_funcs.c b/CNativeCode/OpenGLU_JauJNI12tst_funcs.c
index 5ff2d5a..9899539 100644
--- a/CNativeCode/OpenGLU_JauJNI12tst_funcs.c
+++ b/CNativeCode/OpenGLU_JauJNI12tst_funcs.c
@@ -33,8 +33,17 @@
* herein lies the native JAVA methods for the OpenGL functions.
*/
+/** THIS IS A MANUAL CODED PART
+ glu-manualCodedImplJNI14.java
+*/
+
static const char _glu_n_a_string[] = "GLU-String not available !";
+static const char * _glu_lib_vendor_="Jausoft - Sven Goethel Software Development";
+static const char * _glu_lib_version_="2.8.3.0";
+
+/* ---------------------------------------------------------------------- */
+
JNIEXPORT jstring JNICALL
Java_gl4java_GLUFuncJauJNI_gluErrorString ( JNIEnv *env, jobject obj,
jint errorCode )
@@ -67,9 +76,6 @@ Java_gl4java_GLUFuncJauJNI_gluGetString ( JNIEnv *env, jobject obj,
return (*env)->NewStringUTF(env, tmpString);
}
-static const char * _glu_lib_vendor_="Jausoft - Sven Goethel Software Development";
-static const char * _glu_lib_version_="2.8.3.0";
-
JNIEXPORT jstring JNICALL
Java_gl4java_GLUFuncJauJNI_getNativeVendor ( JNIEnv *env, jobject obj )
{
@@ -106,6 +112,31 @@ static void _AddCallbackNode(JNIEnv *env,
free(strMethodName);
free(strSignature);
}
+
+static void _AddCallbackNodeForCbObj(JNIEnv *env,
+ jlong qnt_obj, jint which,
+ jobject methodClassInstance,
+ jstring methodName,
+ jstring signature,
+ jint arrayLen1,
+ jint arrayLen2,
+ jint arrayLen3,
+ jint arrayLen4,
+ jint arrayLen5)
+{
+ char * strMethodName = jnitoolsGetJavaString(env, methodName);
+ char * strSignature = jnitoolsGetJavaString(env, signature);
+ jlong glx=0;
+
+ glx = GetCurrentGLContext();
+
+ AddCallbackNodeForCbObj(env, methodClassInstance, strMethodName, strSignature,
+ arrayLen1, arrayLen2, arrayLen3,
+ arrayLen4, arrayLen5,
+ (void *)((PointerHolder)qnt_obj), which, glx);
+ free(strMethodName);
+ free(strSignature);
+}
JNIEXPORT void JNICALL
@@ -172,7 +203,7 @@ Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj,
jint arrayLen5)
{
if ( disp__gluTessCallback == NULL ) return;
-
+
switch(which)
{
case GLU_TESS_BEGIN:
@@ -239,7 +270,7 @@ Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj,
jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !");
return;
}
- _AddCallbackNode(env,
+ _AddCallbackNodeForCbObj(env,
tobj, which, methodClassInstance, methodName,
signature,
arrayLen1, arrayLen2, arrayLen3,
diff --git a/CNativeCode/OpenGLU_JauJNI14_funcs.c b/CNativeCode/OpenGLU_JauJNI14_funcs.c
index ce0faa1..d07a365 100644
--- a/CNativeCode/OpenGLU_JauJNI14_funcs.c
+++ b/CNativeCode/OpenGLU_JauJNI14_funcs.c
@@ -33,858 +33,883 @@
* herein lies the native JAVA methods for the OpenGL functions.
*/
-/** THIS IS A MANUAL CODED PART
- glu-manualCodedImplJNI14.java
-*/
-
-static const char _glu_n_a_string[] = "GLU-String not avaiable !";
-
-static const char * _glu_lib_vendor_="Jausoft - Sven Goethel Software Development";
-static const char * _glu_lib_version_="2.8.3.0";
-
-/* ---------------------------------------------------------------------- */
-
-JNIEXPORT jstring JNICALL
-Java_gl4java_GLUFunc14JauJNI_gluErrorString ( JNIEnv *env, jobject obj,
- jint errorCode )
-{
- const char *tmpString=0;
-
- if ( disp__gluErrorString == NULL )
- return (*env)->NewStringUTF(env, _glu_n_a_string);
-
- tmpString = disp__gluErrorString ( /* jint */ errorCode );
- if(tmpString==NULL)
- tmpString=_glu_n_a_string;
-
- return (*env)->NewStringUTF(env, tmpString);
-}
-
-JNIEXPORT jstring JNICALL
-Java_gl4java_GLUFunc14JauJNI_gluGetString ( JNIEnv *env, jobject obj,
- jint name )
-{
- const char *tmpString=0;
-
- if ( disp__gluGetString == NULL )
- return (*env)->NewStringUTF(env, _glu_n_a_string);
-
- tmpString = disp__gluGetString ( /* jint */ name);
- if(tmpString==NULL)
- tmpString=_glu_n_a_string;
-
- return (*env)->NewStringUTF(env, tmpString);
-}
-
-JNIEXPORT jstring JNICALL
-Java_gl4java_GLUFunc14JauJNI_getNativeVendor ( JNIEnv *env, jobject obj )
-{
- return (*env)->NewStringUTF(env, _glu_lib_vendor_);
-}
-
-JNIEXPORT jstring JNICALL
-Java_gl4java_GLUFunc14JauJNI_getNativeVersion ( JNIEnv *env, jobject obj )
-{
- return (*env)->NewStringUTF(env, _glu_lib_version_);
-}
-
-
-/* ---------------------------------------------------------------------- */
-
-static void _AddCallbackNode(JNIEnv *env,
- jlong qnt_obj, jint which,
- jobject methodClassInstance,
- jstring methodName,
- jstring signature,
- jint arrayLen1,
- jint arrayLen2,
- jint arrayLen3,
- jint arrayLen4,
- jint arrayLen5)
-{
- char * strMethodName = jnitoolsGetJavaString(env, methodName);
- char * strSignature = jnitoolsGetJavaString(env, signature);
- jlong glx=0;
-
- glx = GetCurrentGLContext();
-
- AddCallbackNode(env, methodClassInstance, strMethodName, strSignature,
- arrayLen1, arrayLen2, arrayLen3,
- arrayLen4, arrayLen5,
- (void *)((PointerHolder)qnt_obj), which, glx);
- free(strMethodName);
- free(strSignature);
-}
-
-
-JNIEXPORT void JNICALL
-Java_gl4java_GLUFunc14JauJNI_gluQuadricCallback( JNIEnv *env, jobject obj,
- jlong qobj, jint which,
- jobject methodClassInstance,
- jstring methodName,
- jstring signature)
-{
- if ( disp__gluQuadricCallback == NULL ) return;
-
- switch(which)
- {
- case GLU_ERROR:
- disp__gluQuadricCallback((void *)((PointerHolder)qobj),
- which, cbf_GLU_ERROR );
- break;
- default:
- jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !");
- return;
- }
- _AddCallbackNode(env,
- qobj, which, methodClassInstance, methodName,
- signature,
- 0, 0, 0, 0, 0);
-}
-
-
-JNIEXPORT void JNICALL
-Java_gl4java_GLUFunc14JauJNI_gluNurbsCallback( JNIEnv *env, jobject obj,
- jlong nobj, jint which,
- jobject methodClassInstance,
- jstring methodName,
- jstring signature)
-{
- if ( disp__gluNurbsCallback == NULL ) return;
-
- switch(which)
- {
- case GLU_ERROR:
- disp__gluNurbsCallback((void *)((PointerHolder)nobj), which,
- cbf_GLU_ERROR );
- break;
- default:
- jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !");
- return;
- }
- _AddCallbackNode(env,
- nobj, which, methodClassInstance, methodName,
- signature,
- 0, 0, 0, 0, 0);
-}
-
-JNIEXPORT void JNICALL
-Java_gl4java_GLUFunc14JauJNI_gluTessCallback( JNIEnv *env, jobject obj,
- jlong tobj, jint which,
- jobject methodClassInstance,
- jstring methodName,
- jstring signature,
- jint arrayLen1,
- jint arrayLen2,
- jint arrayLen3,
- jint arrayLen4,
- jint arrayLen5)
-{
- if ( disp__gluTessCallback == NULL ) return;
-
- switch(which)
- {
- case GLU_TESS_BEGIN:
- disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
- which,
- cbf_GLU_TESS_BEGIN );
- break;
- case GLU_TESS_BEGIN_DATA:
- disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
- which,
- cbf_GLU_TESS_BEGIN_DATA );
- break;
- case GLU_TESS_EDGE_FLAG:
- disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
- which,
- cbf_GLU_TESS_EDGE_FLAG );
- break;
- case GLU_TESS_EDGE_FLAG_DATA:
- disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
- which,
- cbf_GLU_TESS_EDGE_FLAG_DATA );
- break;
- case GLU_TESS_VERTEX:
- disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
- which,
- cbf_GLU_TESS_VERTEX );
- break;
- case GLU_TESS_VERTEX_DATA:
- disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
- which,
- cbf_GLU_TESS_VERTEX_DATA );
- break;
- case GLU_TESS_END:
- disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
- which,
- cbf_GLU_TESS_END );
- break;
- case GLU_TESS_END_DATA:
- disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
- which,
- cbf_GLU_TESS_END_DATA );
- break;
- case GLU_TESS_ERROR:
- disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
- which,
- cbf_GLU_TESS_ERROR );
- break;
- case GLU_TESS_ERROR_DATA:
- disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
- which,
- cbf_GLU_TESS_ERROR_DATA );
- break;
- case GLU_TESS_COMBINE:
- disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
- which,
- cbf_GLU_TESS_COMBINE );
- break;
- case GLU_TESS_COMBINE_DATA:
- disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
- which,
- cbf_GLU_TESS_COMBINE_DATA );
- break;
- default:
- jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !");
- return;
- }
- _AddCallbackNode(env,
- tobj, which, methodClassInstance, methodName,
- signature,
- arrayLen1, arrayLen2, arrayLen3,
- arrayLen4, arrayLen5);
-}
-
-JNIEXPORT void JNICALL
-Java_gl4java_GLUFunc14JauJNI_gluDeleteQuadric( JNIEnv *env, jobject obj,
- jlong qobj )
-{
- if ( disp__gluDeleteQuadric == NULL ) return;
-
- disp__gluDeleteQuadric((void *)((PointerHolder)qobj));
- RemoveCallbackNodes((void *)((PointerHolder)qobj));
-}
-
-JNIEXPORT void JNICALL
-Java_gl4java_GLUFunc14JauJNI_gluDeleteNurbsRenderer( JNIEnv *env, jobject obj,
- jlong nobj )
-{
- if ( disp__gluDeleteNurbsRenderer == NULL ) return;
-
- disp__gluDeleteNurbsRenderer((void *)((PointerHolder)nobj));
- RemoveCallbackNodes((void *)((PointerHolder)nobj));
-}
-
-JNIEXPORT void JNICALL
-Java_gl4java_GLUFunc14JauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
- jlong tobj )
-{
- if ( disp__gluDeleteTess == NULL ) return;
-
- disp__gluDeleteTess((GLUtesselator *)((PointerHolder)tobj));
- RemoveCallbackNodes((void *)((PointerHolder)tobj));
-}
-
-JNIEXPORT jlong JNICALL
-Java_gl4java_GLUFunc14JauJNI_gluNewQuadric( JNIEnv *env, jobject obj)
-{
- if ( disp__gluNewQuadric == NULL ) return 0;
-
- return (jlong)((PointerHolder)disp__gluNewQuadric());
-}
-
-JNIEXPORT jlong JNICALL
-Java_gl4java_GLUFunc14JauJNI_gluNewNurbsRenderer( JNIEnv *env, jobject obj)
-{
- if ( disp__gluNewNurbsRenderer == NULL ) return 0;
-
- return (jlong)((PointerHolder)disp__gluNewNurbsRenderer());
-}
-
-JNIEXPORT jlong JNICALL
-Java_gl4java_GLUFunc14JauJNI_gluNewTess( JNIEnv *env, jobject obj)
-{
- if ( disp__gluNewTess == NULL ) return 0;
-
- return (jlong)((PointerHolder)disp__gluNewTess());
-}
-
-#include "MemoryManager.h"
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluTessBeginContour ( GLUtesselator * tess ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessBeginContour (
- JNIEnv *env, jobject obj,
- jlong tess)
- {
-
- if ( disp__gluTessBeginContour == NULL ) return;
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessBeginContour (
- (GLUtesselator *) (PointerHolder) tess
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluTessBeginPolygon ( GLUtesselator * tess , GLvoid * data ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3B (
- JNIEnv *env, jobject obj,
- jlong tess,
- jbyteArray data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jbyte *ptr1 = NULL;
-
- if ( disp__gluTessBeginPolygon == NULL ) return;
-
- if(data!=NULL)
- {
- ptr1 = (jbyte *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessBeginPolygon (
- (GLUtesselator *) (PointerHolder) tess,
- (GLvoid *) ptr1
- );
-
- if(data!=NULL)
- {
- (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3S (
- JNIEnv *env, jobject obj,
- jlong tess,
- jshortArray data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jshort *ptr1 = NULL;
-
- if ( disp__gluTessBeginPolygon == NULL ) return;
-
- if(data!=NULL)
- {
- ptr1 = (jshort *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessBeginPolygon (
- (GLUtesselator *) (PointerHolder) tess,
- (GLvoid *) ptr1
- );
-
- if(data!=NULL)
- {
- (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3I (
- JNIEnv *env, jobject obj,
- jlong tess,
- jintArray data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jint *ptr1 = NULL;
-
- if ( disp__gluTessBeginPolygon == NULL ) return;
-
- if(data!=NULL)
- {
- ptr1 = (jint *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessBeginPolygon (
- (GLUtesselator *) (PointerHolder) tess,
- (GLvoid *) ptr1
- );
-
- if(data!=NULL)
- {
- (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3F (
- JNIEnv *env, jobject obj,
- jlong tess,
- jfloatArray data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jfloat *ptr1 = NULL;
-
- if ( disp__gluTessBeginPolygon == NULL ) return;
-
- if(data!=NULL)
- {
- ptr1 = (jfloat *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessBeginPolygon (
- (GLUtesselator *) (PointerHolder) tess,
- (GLvoid *) ptr1
- );
-
- if(data!=NULL)
- {
- (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3D (
- JNIEnv *env, jobject obj,
- jlong tess,
- jdoubleArray data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jdouble *ptr1 = NULL;
-
- if ( disp__gluTessBeginPolygon == NULL ) return;
-
- if(data!=NULL)
- {
- ptr1 = (jdouble *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessBeginPolygon (
- (GLUtesselator *) (PointerHolder) tess,
- (GLvoid *) ptr1
- );
-
- if(data!=NULL)
- {
- (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3Z (
- JNIEnv *env, jobject obj,
- jlong tess,
- jbooleanArray data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jboolean *ptr1 = NULL;
-
- if ( disp__gluTessBeginPolygon == NULL ) return;
-
- if(data!=NULL)
- {
- ptr1 = (jboolean *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessBeginPolygon (
- (GLUtesselator *) (PointerHolder) tess,
- (GLvoid *) ptr1
- );
-
- if(data!=NULL)
- {
- (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3J (
- JNIEnv *env, jobject obj,
- jlong tess,
- jlongArray data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jlong *ptr1 = NULL;
-
- if ( disp__gluTessBeginPolygon == NULL ) return;
-
- if(data!=NULL)
- {
- ptr1 = (jlong *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessBeginPolygon (
- (GLUtesselator *) (PointerHolder) tess,
- (GLvoid *) ptr1
- );
-
- if(data!=NULL)
- {
- (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__JLjava_nio_Buffer_2 (
- JNIEnv *env, jobject obj,
- jlong tess,
- jobject data)
- {
- void *ptr1 = NULL;
-
- if ( disp__gluTessBeginPolygon == NULL ) return;
-
- if(data!=NULL)
- {
- ptr1 = (*env)->GetDirectBufferAddress(env, data);
- if (ptr1 == NULL) {
- (*env)->ThrowNew(env, (*env)->FindClass(env, "java/lang/IllegalArgumentException"),
- "Argument 1 was not a direct buffer");
- return ;
- }
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessBeginPolygon (
- (GLUtesselator *) (PointerHolder) tess,
- (GLvoid *) ptr1
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluTessEndContour ( GLUtesselator * tess ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessEndContour (
- JNIEnv *env, jobject obj,
- jlong tess)
- {
-
- if ( disp__gluTessEndContour == NULL ) return;
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessEndContour (
- (GLUtesselator *) (PointerHolder) tess
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluTessEndPolygon ( GLUtesselator * tess ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessEndPolygon (
- JNIEnv *env, jobject obj,
- jlong tess)
- {
-
- if ( disp__gluTessEndPolygon == NULL ) return;
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessEndPolygon (
- (GLUtesselator *) (PointerHolder) tess
- );
- FreeArrays(env, MEMM_TESSELATOR);
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluTessNormal ( GLUtesselator * tess , GLdouble valueX , GLdouble valueY , GLdouble valueZ ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessNormal (
- JNIEnv *env, jobject obj,
- jlong tess,
- jdouble valueX,
- jdouble valueY,
- jdouble valueZ)
- {
-
- if ( disp__gluTessNormal == NULL ) return;
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessNormal (
- (GLUtesselator *) (PointerHolder) tess,
- (GLdouble) valueX,
- (GLdouble) valueY,
- (GLdouble) valueZ
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluTessProperty ( GLUtesselator * tess , GLenum which , GLdouble data ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessProperty (
- JNIEnv *env, jobject obj,
- jlong tess,
- jint which,
- jdouble data)
- {
-
- if ( disp__gluTessProperty == NULL ) return;
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessProperty (
- (GLUtesselator *) (PointerHolder) tess,
- (GLenum) which,
- (GLdouble) data
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluTessVertex ( GLUtesselator * tess , GLdouble * location , GLvoid * data ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3B (
- JNIEnv *env, jobject obj,
- jlong tess,
- jdoubleArray location,
- jbyteArray data)
- {
- jdouble *ptr1 = NULL;
- jbyte *ptr2 = NULL;
-
- if ( disp__gluTessVertex == NULL ) return;
-
- if(location!=NULL)
- {
- ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
- RegisterArray(env, location, ptr1, MEMM_DOUBLE, MEMM_TESSELATOR);
- }
- if(data!=NULL)
- {
- ptr2 = (jbyte *) (*env)->GetByteArrayElements(env, data, 0);
- RegisterArray(env, data, ptr2, MEMM_BYTE, MEMM_TESSELATOR);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessVertex (
- (GLUtesselator *) (PointerHolder) tess,
- (GLdouble *) ptr1,
- (GLvoid *) ptr2
- );
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3S (
- JNIEnv *env, jobject obj,
- jlong tess,
- jdoubleArray location,
- jshortArray data)
- {
- jdouble *ptr1 = NULL;
- jshort *ptr2 = NULL;
-
- if ( disp__gluTessVertex == NULL ) return;
-
- if(location!=NULL)
- {
- ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
- RegisterArray(env, location, ptr1, MEMM_DOUBLE, MEMM_TESSELATOR);
- }
- if(data!=NULL)
- {
- ptr2 = (jshort *) (*env)->GetShortArrayElements(env, data, 0);
- RegisterArray(env, data, ptr2, MEMM_SHORT, MEMM_TESSELATOR);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessVertex (
- (GLUtesselator *) (PointerHolder) tess,
- (GLdouble *) ptr1,
- (GLvoid *) ptr2
- );
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3I (
- JNIEnv *env, jobject obj,
- jlong tess,
- jdoubleArray location,
- jintArray data)
- {
- jdouble *ptr1 = NULL;
- jint *ptr2 = NULL;
-
- if ( disp__gluTessVertex == NULL ) return;
-
- if(location!=NULL)
- {
- ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
- RegisterArray(env, location, ptr1, MEMM_DOUBLE, MEMM_TESSELATOR);
- }
- if(data!=NULL)
- {
- ptr2 = (jint *) (*env)->GetIntArrayElements(env, data, 0);
- RegisterArray(env, data, ptr2, MEMM_INT, MEMM_TESSELATOR);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessVertex (
- (GLUtesselator *) (PointerHolder) tess,
- (GLdouble *) ptr1,
- (GLvoid *) ptr2
- );
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3F (
- JNIEnv *env, jobject obj,
- jlong tess,
- jdoubleArray location,
- jfloatArray data)
- {
- jdouble *ptr1 = NULL;
- jfloat *ptr2 = NULL;
-
- if ( disp__gluTessVertex == NULL ) return;
-
- if(location!=NULL)
- {
- ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
- RegisterArray(env, location, ptr1, MEMM_DOUBLE, MEMM_TESSELATOR);
- }
- if(data!=NULL)
- {
- ptr2 = (jfloat *) (*env)->GetFloatArrayElements(env, data, 0);
- RegisterArray(env, data, ptr2, MEMM_FLOAT, MEMM_TESSELATOR);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessVertex (
- (GLUtesselator *) (PointerHolder) tess,
- (GLdouble *) ptr1,
- (GLvoid *) ptr2
- );
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3D (
- JNIEnv *env, jobject obj,
- jlong tess,
- jdoubleArray location,
- jdoubleArray data)
- {
- jdouble *ptr1 = NULL;
- jdouble *ptr2 = NULL;
-
- if ( disp__gluTessVertex == NULL ) return;
-
- if(location!=NULL)
- {
- ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
- RegisterArray(env, location, ptr1, MEMM_DOUBLE, MEMM_TESSELATOR);
- }
- if(data!=NULL)
- {
- ptr2 = (jdouble *) (*env)->GetDoubleArrayElements(env, data, 0);
- RegisterArray(env, data, ptr2, MEMM_DOUBLE, MEMM_TESSELATOR);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessVertex (
- (GLUtesselator *) (PointerHolder) tess,
- (GLdouble *) ptr1,
- (GLvoid *) ptr2
- );
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3Z (
- JNIEnv *env, jobject obj,
- jlong tess,
- jdoubleArray location,
- jbooleanArray data)
- {
- jdouble *ptr1 = NULL;
- jboolean *ptr2 = NULL;
-
- if ( disp__gluTessVertex == NULL ) return;
-
- if(location!=NULL)
- {
- ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
- RegisterArray(env, location, ptr1, MEMM_DOUBLE, MEMM_TESSELATOR);
- }
- if(data!=NULL)
- {
- ptr2 = (jboolean *) (*env)->GetBooleanArrayElements(env, data, 0);
- RegisterArray(env, data, ptr2, MEMM_BOOLEAN, MEMM_TESSELATOR);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessVertex (
- (GLUtesselator *) (PointerHolder) tess,
- (GLdouble *) ptr1,
- (GLvoid *) ptr2
- );
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3J (
- JNIEnv *env, jobject obj,
- jlong tess,
- jdoubleArray location,
- jlongArray data)
- {
- jdouble *ptr1 = NULL;
- jlong *ptr2 = NULL;
-
- if ( disp__gluTessVertex == NULL ) return;
-
- if(location!=NULL)
- {
- ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
- RegisterArray(env, location, ptr1, MEMM_DOUBLE, MEMM_TESSELATOR);
- }
- if(data!=NULL)
- {
- ptr2 = (jlong *) (*env)->GetLongArrayElements(env, data, 0);
- RegisterArray(env, data, ptr2, MEMM_LONG, MEMM_TESSELATOR);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessVertex (
- (GLUtesselator *) (PointerHolder) tess,
- (GLdouble *) ptr1,
- (GLvoid *) ptr2
- );
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3DLjava_nio_Buffer_2 (
- JNIEnv *env, jobject obj,
- jlong tess,
- jdoubleArray location,
- jobject data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jdouble *ptr1 = NULL;
- void *ptr2 = NULL;
-
- if ( disp__gluTessVertex == NULL ) return;
-
- if(data!=NULL)
- {
- ptr2 = (*env)->GetDirectBufferAddress(env, data);
- if (ptr2 == NULL) {
- (*env)->ThrowNew(env, (*env)->FindClass(env, "java/lang/IllegalArgumentException"),
- "Argument 2 was not a direct buffer");
- return ;
- }
- }
- if(location!=NULL)
- {
- ptr1 = (jdouble *) (*env)->GetPrimitiveArrayCritical(env, location, &isCopiedArray1);
- }
- SetCurrentCallbackObject((void *) (PointerHolder) tess);
- disp__gluTessVertex (
- (GLUtesselator *) (PointerHolder) tess,
- (GLdouble *) ptr1,
- (GLvoid *) ptr2
- );
-
- if(location!=NULL)
- {
- (*env)->ReleasePrimitiveArrayCritical(env, location, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
-
+/** THIS IS A MANUAL CODED PART
+ glu-manualCodedImplJNI14.java
+*/
+
+static const char _glu_n_a_string[] = "GLU-String not available !";
+
+static const char * _glu_lib_vendor_="Jausoft - Sven Goethel Software Development";
+static const char * _glu_lib_version_="2.8.3.0";
+
+/* ---------------------------------------------------------------------- */
+
+JNIEXPORT jstring JNICALL
+Java_gl4java_GLUFunc14JauJNI_gluErrorString ( JNIEnv *env, jobject obj,
+ jint errorCode )
+{
+ const char *tmpString=0;
+
+ if ( disp__gluErrorString == NULL )
+ return (*env)->NewStringUTF(env, _glu_n_a_string);
+
+ tmpString = disp__gluErrorString ( /* jint */ errorCode );
+ if(tmpString==NULL)
+ tmpString=_glu_n_a_string;
+
+ return (*env)->NewStringUTF(env, tmpString);
+}
+
+JNIEXPORT jstring JNICALL
+Java_gl4java_GLUFunc14JauJNI_gluGetString ( JNIEnv *env, jobject obj,
+ jint name )
+{
+ const char *tmpString=0;
+
+ if ( disp__gluGetString == NULL )
+ return (*env)->NewStringUTF(env, _glu_n_a_string);
+
+ tmpString = disp__gluGetString ( /* jint */ name);
+ if(tmpString==NULL)
+ tmpString=_glu_n_a_string;
+
+ return (*env)->NewStringUTF(env, tmpString);
+}
+
+JNIEXPORT jstring JNICALL
+Java_gl4java_GLUFunc14JauJNI_getNativeVendor ( JNIEnv *env, jobject obj )
+{
+ return (*env)->NewStringUTF(env, _glu_lib_vendor_);
+}
+
+JNIEXPORT jstring JNICALL
+Java_gl4java_GLUFunc14JauJNI_getNativeVersion ( JNIEnv *env, jobject obj )
+{
+ return (*env)->NewStringUTF(env, _glu_lib_version_);
+}
+
+
+/* ---------------------------------------------------------------------- */
+
+static void _AddCallbackNode(JNIEnv *env,
+ jlong qnt_obj, jint which,
+ jobject methodClassInstance,
+ jstring methodName,
+ jstring signature,
+ jint arrayLen1,
+ jint arrayLen2,
+ jint arrayLen3,
+ jint arrayLen4,
+ jint arrayLen5)
+{
+ char * strMethodName = jnitoolsGetJavaString(env, methodName);
+ char * strSignature = jnitoolsGetJavaString(env, signature);
+ jlong glx=0;
+
+ glx = GetCurrentGLContext();
+
+ AddCallbackNode(env, methodClassInstance, strMethodName, strSignature,
+ arrayLen1, arrayLen2, arrayLen3,
+ arrayLen4, arrayLen5,
+ (void *)((PointerHolder)qnt_obj), which, glx);
+ free(strMethodName);
+ free(strSignature);
+}
+
+static void _AddCallbackNodeForCbObj(JNIEnv *env,
+ jlong qnt_obj, jint which,
+ jobject methodClassInstance,
+ jstring methodName,
+ jstring signature,
+ jint arrayLen1,
+ jint arrayLen2,
+ jint arrayLen3,
+ jint arrayLen4,
+ jint arrayLen5)
+{
+ char * strMethodName = jnitoolsGetJavaString(env, methodName);
+ char * strSignature = jnitoolsGetJavaString(env, signature);
+ jlong glx=0;
+
+ glx = GetCurrentGLContext();
+
+ AddCallbackNodeForCbObj(env, methodClassInstance, strMethodName, strSignature,
+ arrayLen1, arrayLen2, arrayLen3,
+ arrayLen4, arrayLen5,
+ (void *)((PointerHolder)qnt_obj), which, glx);
+ free(strMethodName);
+ free(strSignature);
+}
+
+
+JNIEXPORT void JNICALL
+Java_gl4java_GLUFunc14JauJNI_gluQuadricCallback( JNIEnv *env, jobject obj,
+ jlong qobj, jint which,
+ jobject methodClassInstance,
+ jstring methodName,
+ jstring signature)
+{
+ if ( disp__gluQuadricCallback == NULL ) return;
+
+ switch(which)
+ {
+ case GLU_ERROR:
+ disp__gluQuadricCallback((void *)((PointerHolder)qobj),
+ which, cbf_GLU_ERROR );
+ break;
+ default:
+ jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !");
+ return;
+ }
+ _AddCallbackNode(env,
+ qobj, which, methodClassInstance, methodName,
+ signature,
+ 0, 0, 0, 0, 0);
+}
+
+
+JNIEXPORT void JNICALL
+Java_gl4java_GLUFunc14JauJNI_gluNurbsCallback( JNIEnv *env, jobject obj,
+ jlong nobj, jint which,
+ jobject methodClassInstance,
+ jstring methodName,
+ jstring signature)
+{
+ if ( disp__gluNurbsCallback == NULL ) return;
+
+ switch(which)
+ {
+ case GLU_ERROR:
+ disp__gluNurbsCallback((void *)((PointerHolder)nobj), which,
+ cbf_GLU_ERROR );
+ break;
+ default:
+ jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !");
+ return;
+ }
+ _AddCallbackNode(env,
+ nobj, which, methodClassInstance, methodName,
+ signature,
+ 0, 0, 0, 0, 0);
+}
+
+JNIEXPORT void JNICALL
+Java_gl4java_GLUFunc14JauJNI_gluTessCallback( JNIEnv *env, jobject obj,
+ jlong tobj, jint which,
+ jobject methodClassInstance,
+ jstring methodName,
+ jstring signature,
+ jint arrayLen1,
+ jint arrayLen2,
+ jint arrayLen3,
+ jint arrayLen4,
+ jint arrayLen5)
+{
+ if ( disp__gluTessCallback == NULL ) return;
+
+ switch(which)
+ {
+ case GLU_TESS_BEGIN:
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ which,
+ cbf_GLU_TESS_BEGIN );
+ break;
+ case GLU_TESS_BEGIN_DATA:
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ which,
+ cbf_GLU_TESS_BEGIN_DATA );
+ break;
+ case GLU_TESS_EDGE_FLAG:
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ which,
+ cbf_GLU_TESS_EDGE_FLAG );
+ break;
+ case GLU_TESS_EDGE_FLAG_DATA:
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ which,
+ cbf_GLU_TESS_EDGE_FLAG_DATA );
+ break;
+ case GLU_TESS_VERTEX:
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ which,
+ cbf_GLU_TESS_VERTEX );
+ break;
+ case GLU_TESS_VERTEX_DATA:
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ which,
+ cbf_GLU_TESS_VERTEX_DATA );
+ break;
+ case GLU_TESS_END:
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ which,
+ cbf_GLU_TESS_END );
+ break;
+ case GLU_TESS_END_DATA:
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ which,
+ cbf_GLU_TESS_END_DATA );
+ break;
+ case GLU_TESS_ERROR:
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ which,
+ cbf_GLU_TESS_ERROR );
+ break;
+ case GLU_TESS_ERROR_DATA:
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ which,
+ cbf_GLU_TESS_ERROR_DATA );
+ break;
+ case GLU_TESS_COMBINE:
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ which,
+ cbf_GLU_TESS_COMBINE );
+ break;
+ case GLU_TESS_COMBINE_DATA:
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ which,
+ cbf_GLU_TESS_COMBINE_DATA );
+ break;
+ default:
+ jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !");
+ return;
+ }
+ _AddCallbackNodeForCbObj(env,
+ tobj, which, methodClassInstance, methodName,
+ signature,
+ arrayLen1, arrayLen2, arrayLen3,
+ arrayLen4, arrayLen5);
+}
+
+JNIEXPORT void JNICALL
+Java_gl4java_GLUFunc14JauJNI_gluDeleteQuadric( JNIEnv *env, jobject obj,
+ jlong qobj )
+{
+ if ( disp__gluDeleteQuadric == NULL ) return;
+
+ disp__gluDeleteQuadric((void *)((PointerHolder)qobj));
+ RemoveCallbackNodes((void *)((PointerHolder)qobj));
+}
+
+JNIEXPORT void JNICALL
+Java_gl4java_GLUFunc14JauJNI_gluDeleteNurbsRenderer( JNIEnv *env, jobject obj,
+ jlong nobj )
+{
+ if ( disp__gluDeleteNurbsRenderer == NULL ) return;
+
+ disp__gluDeleteNurbsRenderer((void *)((PointerHolder)nobj));
+ RemoveCallbackNodes((void *)((PointerHolder)nobj));
+}
+
+JNIEXPORT void JNICALL
+Java_gl4java_GLUFunc14JauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
+ jlong tobj )
+{
+ if ( disp__gluDeleteTess == NULL ) return;
+
+ disp__gluDeleteTess((GLUtesselator *)((PointerHolder)tobj));
+ RemoveCallbackNodes((void *)((PointerHolder)tobj));
+}
+
+JNIEXPORT jlong JNICALL
+Java_gl4java_GLUFunc14JauJNI_gluNewQuadric( JNIEnv *env, jobject obj)
+{
+ if ( disp__gluNewQuadric == NULL ) return 0;
+
+ return (jlong)((PointerHolder)disp__gluNewQuadric());
+}
+
+JNIEXPORT jlong JNICALL
+Java_gl4java_GLUFunc14JauJNI_gluNewNurbsRenderer( JNIEnv *env, jobject obj)
+{
+ if ( disp__gluNewNurbsRenderer == NULL ) return 0;
+
+ return (jlong)((PointerHolder)disp__gluNewNurbsRenderer());
+}
+
+JNIEXPORT jlong JNICALL
+Java_gl4java_GLUFunc14JauJNI_gluNewTess( JNIEnv *env, jobject obj)
+{
+ if ( disp__gluNewTess == NULL ) return 0;
+
+ return (jlong)((PointerHolder)disp__gluNewTess());
+}
+
+#include "MemoryManager.h"
+
+/**
+ * Original Function-Prototype :
+ * <pre>
+ extern void gluTessBeginContour ( GLUtesselator * tess ) ;
+ * </pre>
+ */
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessBeginContour (
+ JNIEnv *env, jobject obj,
+ jlong tess)
+ {
+
+ if ( disp__gluTessBeginContour == NULL ) return;
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessBeginContour (
+ (GLUtesselator *) (PointerHolder) tess
+ );
+
+ }
+
+/**
+ * Original Function-Prototype :
+ * <pre>
+ extern void gluTessBeginPolygon ( GLUtesselator * tess , GLvoid * data ) ;
+ * </pre>
+ */
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3B (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jbyteArray data)
+ {
+ jboolean isCopiedArray1 = JNI_FALSE;
+ jbyte *ptr1 = NULL;
+
+ if ( disp__gluTessBeginPolygon == NULL ) return;
+
+ if(data!=NULL)
+ {
+ ptr1 = (jbyte *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessBeginPolygon (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLvoid *) ptr1
+ );
+
+ if(data!=NULL)
+ {
+ (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
+ }
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3S (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jshortArray data)
+ {
+ jboolean isCopiedArray1 = JNI_FALSE;
+ jshort *ptr1 = NULL;
+
+ if ( disp__gluTessBeginPolygon == NULL ) return;
+
+ if(data!=NULL)
+ {
+ ptr1 = (jshort *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessBeginPolygon (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLvoid *) ptr1
+ );
+
+ if(data!=NULL)
+ {
+ (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
+ }
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3I (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jintArray data)
+ {
+ jboolean isCopiedArray1 = JNI_FALSE;
+ jint *ptr1 = NULL;
+
+ if ( disp__gluTessBeginPolygon == NULL ) return;
+
+ if(data!=NULL)
+ {
+ ptr1 = (jint *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessBeginPolygon (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLvoid *) ptr1
+ );
+
+ if(data!=NULL)
+ {
+ (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
+ }
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3F (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jfloatArray data)
+ {
+ jboolean isCopiedArray1 = JNI_FALSE;
+ jfloat *ptr1 = NULL;
+
+ if ( disp__gluTessBeginPolygon == NULL ) return;
+
+ if(data!=NULL)
+ {
+ ptr1 = (jfloat *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessBeginPolygon (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLvoid *) ptr1
+ );
+
+ if(data!=NULL)
+ {
+ (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
+ }
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3D (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jdoubleArray data)
+ {
+ jboolean isCopiedArray1 = JNI_FALSE;
+ jdouble *ptr1 = NULL;
+
+ if ( disp__gluTessBeginPolygon == NULL ) return;
+
+ if(data!=NULL)
+ {
+ ptr1 = (jdouble *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessBeginPolygon (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLvoid *) ptr1
+ );
+
+ if(data!=NULL)
+ {
+ (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
+ }
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3Z (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jbooleanArray data)
+ {
+ jboolean isCopiedArray1 = JNI_FALSE;
+ jboolean *ptr1 = NULL;
+
+ if ( disp__gluTessBeginPolygon == NULL ) return;
+
+ if(data!=NULL)
+ {
+ ptr1 = (jboolean *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessBeginPolygon (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLvoid *) ptr1
+ );
+
+ if(data!=NULL)
+ {
+ (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
+ }
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__J_3J (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jlongArray data)
+ {
+ jboolean isCopiedArray1 = JNI_FALSE;
+ jlong *ptr1 = NULL;
+
+ if ( disp__gluTessBeginPolygon == NULL ) return;
+
+ if(data!=NULL)
+ {
+ ptr1 = (jlong *) (*env)->GetPrimitiveArrayCritical(env, data, &isCopiedArray1);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessBeginPolygon (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLvoid *) ptr1
+ );
+
+ if(data!=NULL)
+ {
+ (*env)->ReleasePrimitiveArrayCritical(env, data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
+ }
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessBeginPolygon__JLjava_nio_Buffer_2 (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jobject data)
+ {
+ void *ptr1 = NULL;
+
+ if ( disp__gluTessBeginPolygon == NULL ) return;
+
+ if(data!=NULL)
+ {
+ ptr1 = (*env)->GetDirectBufferAddress(env, data);
+ if (ptr1 == NULL) {
+ (*env)->ThrowNew(env, (*env)->FindClass(env, "java/lang/IllegalArgumentException"),
+ "Argument 1 was not a direct buffer");
+ return ;
+ }
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessBeginPolygon (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLvoid *) ptr1
+ );
+
+ }
+
+/**
+ * Original Function-Prototype :
+ * <pre>
+ extern void gluTessEndContour ( GLUtesselator * tess ) ;
+ * </pre>
+ */
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessEndContour (
+ JNIEnv *env, jobject obj,
+ jlong tess)
+ {
+
+ if ( disp__gluTessEndContour == NULL ) return;
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessEndContour (
+ (GLUtesselator *) (PointerHolder) tess
+ );
+
+ }
+
+/**
+ * Original Function-Prototype :
+ * <pre>
+ extern void gluTessEndPolygon ( GLUtesselator * tess ) ;
+ * </pre>
+ */
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessEndPolygon (
+ JNIEnv *env, jobject obj,
+ jlong tess)
+ {
+
+ if ( disp__gluTessEndPolygon == NULL ) return;
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessEndPolygon (
+ (GLUtesselator *) (PointerHolder) tess
+ );
+ FreeArrays(env, MEMM_TESSELATOR);
+
+ }
+
+/**
+ * Original Function-Prototype :
+ * <pre>
+ extern void gluTessNormal ( GLUtesselator * tess , GLdouble valueX , GLdouble valueY , GLdouble valueZ ) ;
+ * </pre>
+ */
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessNormal (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jdouble valueX,
+ jdouble valueY,
+ jdouble valueZ)
+ {
+
+ if ( disp__gluTessNormal == NULL ) return;
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessNormal (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLdouble) valueX,
+ (GLdouble) valueY,
+ (GLdouble) valueZ
+ );
+
+ }
+
+/**
+ * Original Function-Prototype :
+ * <pre>
+ extern void gluTessProperty ( GLUtesselator * tess , GLenum which , GLdouble data ) ;
+ * </pre>
+ */
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessProperty (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jint which,
+ jdouble data)
+ {
+
+ if ( disp__gluTessProperty == NULL ) return;
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessProperty (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLenum) which,
+ (GLdouble) data
+ );
+
+ }
+
+/**
+ * Original Function-Prototype :
+ * <pre>
+ extern void gluTessVertex ( GLUtesselator * tess , GLdouble * location , GLvoid * data ) ;
+ * </pre>
+ */
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3B (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jdoubleArray location,
+ jbyteArray data)
+ {
+ jdouble *ptr1 = NULL;
+ jbyte *ptr2 = NULL;
+
+ if ( disp__gluTessVertex == NULL ) return;
+
+ if(location!=NULL)
+ {
+ ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
+ RegisterArray(env, location, ptr1, T_DOUBLE_ARRAY, MEMM_TESSELATOR);
+ }
+ if(data!=NULL)
+ {
+ ptr2 = (jbyte *) (*env)->GetByteArrayElements(env, data, 0);
+ RegisterArray(env, data, ptr2, T_BYTE_ARRAY, MEMM_TESSELATOR);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessVertex (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLdouble *) ptr1,
+ (GLvoid *) ptr2
+ );
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3S (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jdoubleArray location,
+ jshortArray data)
+ {
+ jdouble *ptr1 = NULL;
+ jshort *ptr2 = NULL;
+
+ if ( disp__gluTessVertex == NULL ) return;
+
+ if(location!=NULL)
+ {
+ ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
+ RegisterArray(env, location, ptr1, T_DOUBLE_ARRAY, MEMM_TESSELATOR);
+ }
+ if(data!=NULL)
+ {
+ ptr2 = (jshort *) (*env)->GetShortArrayElements(env, data, 0);
+ RegisterArray(env, data, ptr2, T_SHORT_ARRAY, MEMM_TESSELATOR);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessVertex (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLdouble *) ptr1,
+ (GLvoid *) ptr2
+ );
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3I (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jdoubleArray location,
+ jintArray data)
+ {
+ jdouble *ptr1 = NULL;
+ jint *ptr2 = NULL;
+
+ if ( disp__gluTessVertex == NULL ) return;
+
+ if(location!=NULL)
+ {
+ ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
+ RegisterArray(env, location, ptr1, T_DOUBLE_ARRAY, MEMM_TESSELATOR);
+ }
+ if(data!=NULL)
+ {
+ ptr2 = (jint *) (*env)->GetIntArrayElements(env, data, 0);
+ RegisterArray(env, data, ptr2, T_INT_ARRAY, MEMM_TESSELATOR);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessVertex (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLdouble *) ptr1,
+ (GLvoid *) ptr2
+ );
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3F (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jdoubleArray location,
+ jfloatArray data)
+ {
+ jdouble *ptr1 = NULL;
+ jfloat *ptr2 = NULL;
+
+ if ( disp__gluTessVertex == NULL ) return;
+
+ if(location!=NULL)
+ {
+ ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
+ RegisterArray(env, location, ptr1, T_DOUBLE_ARRAY, MEMM_TESSELATOR);
+ }
+ if(data!=NULL)
+ {
+ ptr2 = (jfloat *) (*env)->GetFloatArrayElements(env, data, 0);
+ RegisterArray(env, data, ptr2, T_FLOAT_ARRAY, MEMM_TESSELATOR);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessVertex (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLdouble *) ptr1,
+ (GLvoid *) ptr2
+ );
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3D (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jdoubleArray location,
+ jdoubleArray data)
+ {
+ jdouble *ptr1 = NULL;
+ jdouble *ptr2 = NULL;
+
+ if ( disp__gluTessVertex == NULL ) return;
+
+ if(location!=NULL)
+ {
+ ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
+ RegisterArray(env, location, ptr1, T_DOUBLE_ARRAY, MEMM_TESSELATOR);
+ }
+ if(data!=NULL)
+ {
+ ptr2 = (jdouble *) (*env)->GetDoubleArrayElements(env, data, 0);
+ RegisterArray(env, data, ptr2, T_DOUBLE_ARRAY, MEMM_TESSELATOR);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessVertex (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLdouble *) ptr1,
+ (GLvoid *) ptr2
+ );
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3Z (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jdoubleArray location,
+ jbooleanArray data)
+ {
+ jdouble *ptr1 = NULL;
+ jboolean *ptr2 = NULL;
+
+ if ( disp__gluTessVertex == NULL ) return;
+
+ if(location!=NULL)
+ {
+ ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
+ RegisterArray(env, location, ptr1, T_DOUBLE_ARRAY, MEMM_TESSELATOR);
+ }
+ if(data!=NULL)
+ {
+ ptr2 = (jboolean *) (*env)->GetBooleanArrayElements(env, data, 0);
+ RegisterArray(env, data, ptr2, T_BOOLEAN_ARRAY, MEMM_TESSELATOR);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessVertex (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLdouble *) ptr1,
+ (GLvoid *) ptr2
+ );
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessVertex__J_3D_3J (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jdoubleArray location,
+ jlongArray data)
+ {
+ jdouble *ptr1 = NULL;
+ jlong *ptr2 = NULL;
+
+ if ( disp__gluTessVertex == NULL ) return;
+
+ if(location!=NULL)
+ {
+ ptr1 = (jdouble *) (*env)->GetDoubleArrayElements(env, location, 0);
+ RegisterArray(env, location, ptr1, T_DOUBLE_ARRAY, MEMM_TESSELATOR);
+ }
+ if(data!=NULL)
+ {
+ ptr2 = (jlong *) (*env)->GetLongArrayElements(env, data, 0);
+ RegisterArray(env, data, ptr2, T_LONG_ARRAY, MEMM_TESSELATOR);
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessVertex (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLdouble *) ptr1,
+ (GLvoid *) ptr2
+ );
+ }
+ JNIEXPORT void JNICALL
+ Java_gl4java_GLUFunc14JauJNI_gluTessVertex__JLjava_nio_DoubleBuffer_2Ljava_nio_Buffer_2 (
+ JNIEnv *env, jobject obj,
+ jlong tess,
+ jobject location,
+ jobject data)
+ {
+ jboolean isCopiedArray1 = JNI_FALSE;
+ jdouble *ptr1 = NULL;
+ void *ptr2 = NULL;
+
+ if ( disp__gluTessVertex == NULL ) return;
+
+ if(location!=NULL)
+ {
+ ptr1 = (jdouble *) (*env)->GetDirectBufferAddress(env, location);
+ if (ptr1 == NULL) {
+ (*env)->ThrowNew(env, (*env)->FindClass(env, "java/lang/IllegalArgumentException"),
+ "Argument 1 was not a direct double buffer");
+ return ;
+ }
+ }
+ if(data!=NULL)
+ {
+ ptr2 = (*env)->GetDirectBufferAddress(env, data);
+ if (ptr2 == NULL) {
+ (*env)->ThrowNew(env, (*env)->FindClass(env, "java/lang/IllegalArgumentException"),
+ "Argument 2 was not a direct buffer");
+ return ;
+ }
+ }
+ SetCurrentCallbackObject((void *) (PointerHolder) tess);
+ disp__gluTessVertex (
+ (GLUtesselator *) (PointerHolder) tess,
+ (GLdouble *) ptr1,
+ (GLvoid *) ptr2
+ );
+ }
+
/**
* C2J Parser Version 3.0
* Jausoft - Sven Goethel Software Development
diff --git a/CNativeCode/OpenGLU_JauJNI_funcs.c b/CNativeCode/OpenGLU_JauJNI_funcs.c
index 9bc474c..52bf4ae 100644
--- a/CNativeCode/OpenGLU_JauJNI_funcs.c
+++ b/CNativeCode/OpenGLU_JauJNI_funcs.c
@@ -33,8 +33,17 @@
* herein lies the native JAVA methods for the OpenGL functions.
*/
+/** THIS IS A MANUAL CODED PART
+ glu-manualCodedImplJNI14.java
+*/
+
static const char _glu_n_a_string[] = "GLU-String not available !";
+static const char * _glu_lib_vendor_="Jausoft - Sven Goethel Software Development";
+static const char * _glu_lib_version_="2.8.3.0";
+
+/* ---------------------------------------------------------------------- */
+
JNIEXPORT jstring JNICALL
Java_gl4java_GLUFuncJauJNI_gluErrorString ( JNIEnv *env, jobject obj,
jint errorCode )
@@ -67,9 +76,6 @@ Java_gl4java_GLUFuncJauJNI_gluGetString ( JNIEnv *env, jobject obj,
return (*env)->NewStringUTF(env, tmpString);
}
-static const char * _glu_lib_vendor_="Jausoft - Sven Goethel Software Development";
-static const char * _glu_lib_version_="2.8.3.0";
-
JNIEXPORT jstring JNICALL
Java_gl4java_GLUFuncJauJNI_getNativeVendor ( JNIEnv *env, jobject obj )
{
@@ -106,6 +112,31 @@ static void _AddCallbackNode(JNIEnv *env,
free(strMethodName);
free(strSignature);
}
+
+static void _AddCallbackNodeForCbObj(JNIEnv *env,
+ jlong qnt_obj, jint which,
+ jobject methodClassInstance,
+ jstring methodName,
+ jstring signature,
+ jint arrayLen1,
+ jint arrayLen2,
+ jint arrayLen3,
+ jint arrayLen4,
+ jint arrayLen5)
+{
+ char * strMethodName = jnitoolsGetJavaString(env, methodName);
+ char * strSignature = jnitoolsGetJavaString(env, signature);
+ jlong glx=0;
+
+ glx = GetCurrentGLContext();
+
+ AddCallbackNodeForCbObj(env, methodClassInstance, strMethodName, strSignature,
+ arrayLen1, arrayLen2, arrayLen3,
+ arrayLen4, arrayLen5,
+ (void *)((PointerHolder)qnt_obj), which, glx);
+ free(strMethodName);
+ free(strSignature);
+}
JNIEXPORT void JNICALL
@@ -172,7 +203,7 @@ Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj,
jint arrayLen5)
{
if ( disp__gluTessCallback == NULL ) return;
-
+
switch(which)
{
case GLU_TESS_BEGIN:
@@ -239,7 +270,7 @@ Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj,
jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !");
return;
}
- _AddCallbackNode(env,
+ _AddCallbackNodeForCbObj(env,
tobj, which, methodClassInstance, methodName,
signature,
arrayLen1, arrayLen2, arrayLen3,
diff --git a/CNativeCode/gltool.c b/CNativeCode/gltool.c
index 695c0da..c5fa2ff 100755
--- a/CNativeCode/gltool.c
+++ b/CNativeCode/gltool.c
@@ -189,6 +189,9 @@ int LIBAPIENTRY loadGLLibrary (const char * libGLName, const char * libGLUName,
Str255 errName;
OSErr returnError=fragNoErr;
#endif
+#ifdef _X11_
+ const char *err=NULL;
+#endif
if(_glLibsLoaded) return 1;
@@ -237,7 +240,9 @@ int LIBAPIENTRY loadGLLibrary (const char * libGLName, const char * libGLUName,
libHandleGL = dlopen (libGLName, RTLD_LAZY | RTLD_GLOBAL);
if (libHandleGL == NULL)
{
+ err=dlerror();
printf ("GLERROR: cannot access OpenGL library %s\n", libGLName);
+ if(err!=NULL) printf("\t dlerror: %s\n", err);
fflush (NULL);
return 0;
}
@@ -245,7 +250,9 @@ int LIBAPIENTRY loadGLLibrary (const char * libGLName, const char * libGLUName,
libHandleGLU = dlopen (libGLUName, RTLD_LAZY | RTLD_GLOBAL);
if (libHandleGLU == NULL)
{
+ err=dlerror();
printf ("GLERROR: cannot access GLU library %s\n", libGLUName);
+ if(err!=NULL) printf("\t dlerror: %s\n", err);
fflush (NULL);
return 0;
}
diff --git a/CNativeCode/invokejvm.c b/CNativeCode/invokejvm.c
index 78e5699..dd43a2c 100755
--- a/CNativeCode/invokejvm.c
+++ b/CNativeCode/invokejvm.c
@@ -43,6 +43,7 @@ int main(int argc, char ** argv)
#endif
#ifdef _X11_
void * lib;
+ const char *err=NULL;
#endif
char ** myargv;
@@ -69,7 +70,9 @@ int main(int argc, char ** argv)
lib = dlopen (libname, RTLD_LAZY | RTLD_GLOBAL);
if (lib == NULL)
{
+ err=dlerror();
printf ("GLERROR: cannot access library %s\n", libname);
+ if(err!=NULL) printf("\t dlerror: %s\n", err);
exit(1);
}
#endif
diff --git a/CNativeCode/jawt_misc.c b/CNativeCode/jawt_misc.c
index 4f083d7..9fabd78 100644
--- a/CNativeCode/jawt_misc.c
+++ b/CNativeCode/jawt_misc.c
@@ -36,7 +36,7 @@ jawt_init (char* jawtLibName)
if ( hDLL_JAWT==NULL )
{
- printf(" jawt_init: LoadLibrary failed\n");
+ printf(" jawt_init: LoadLibrary failed: %s\n", jawtLibName);
return JNI_FALSE;
}
@@ -44,7 +44,8 @@ jawt_init (char* jawtLibName)
GetProcAddress(hDLL_JAWT, "_JAWT_GetAWT@8");
if (JAWT_GetAWT_fn == NULL) {
- printf(" jawt_init: GetProcAddress failed\n");
+ printf(" jawt_init: GetProcAddress failed: %s in %s\n",
+ "_JAWT_GetAWT@8", jawtLibName);
return JNI_FALSE;
}
return JNI_TRUE;
@@ -52,19 +53,23 @@ jawt_init (char* jawtLibName)
#endif
#ifdef _X11_
+ const char *err=NULL;
if ( libHandleJAWT == NULL )
libHandleJAWT = dlopen(jawtLibName, RTLD_LAZY | RTLD_GLOBAL);
if ( libHandleJAWT == NULL) {
- printf(" jawt_init: dlopen failed\n");
+ err=dlerror();
+ printf(" jawt_init: dlopen failed: %s\n", jawtLibName);
+ if(err!=NULL) printf(" jawt_init: dlerror: %s\n", err);
return JNI_FALSE;
}
JAWT_GetAWT_fn = (JAWT_GetAWT_fn_t*) dlsym(libHandleJAWT, "JAWT_GetAWT");
if (JAWT_GetAWT_fn == NULL) {
- printf(" jawt_init: dlsym failed\n");
+ printf(" jawt_init: dlsym failed: %s in %s\n",
+ "JAWT_GetAWT", jawtLibName);
return JNI_FALSE;
}
diff --git a/gl4java/GLContext.java.skel b/gl4java/GLContext.java.skel
index 3e11bc8..7e441ba 100644
--- a/gl4java/GLContext.java.skel
+++ b/gl4java/GLContext.java.skel
@@ -2203,7 +2203,7 @@ public class GLContext extends Object
if (libpath == null) {
libpath = findInPath(System.getProperty("sun.boot.library.path"), jawtName0);
} else if (gljClassDebug) {
- System.err.println("Located: " + jawtName0 + ", within: java.library.path: "+
+ System.err.println("Located: " + jawtName0 + ": "+libpath+", within: java.library.path: "+
System.getProperty("java.library.path"));
found = true;
}
@@ -2222,7 +2222,7 @@ public class GLContext extends Object
libpath = findInPath(System.getProperty("java.library.path"), jawtName1);
} else if (gljClassDebug && !found) {
- System.err.println("Located: " + jawtName0 + ", within: sun.boot.library.path: "+
+ System.err.println("Located: " + jawtName0 + ": "+libpath+", within: sun.boot.library.path: "+
System.getProperty("sun.boot.library.path"));
found = true;
}
@@ -2234,7 +2234,7 @@ public class GLContext extends Object
if (libpath == null) {
libpath = findInPath(System.getProperty("sun.boot.library.path"), jawtName1);
} else if (gljClassDebug && !found) {
- System.err.println("Located: " + jawtName1 + ", within: java.library.path: "+
+ System.err.println("Located: " + jawtName1 + ": "+libpath+", within: java.library.path: "+
System.getProperty("java.library.path"));
found = true;
}
@@ -2246,7 +2246,7 @@ public class GLContext extends Object
System.err.println(" sun.boot.library.path = " + System.getProperty("sun.boot.library.path"));
return false;
} else if (gljClassDebug && !found) {
- System.err.println("Located: " + jawtName0 + ", within: sun.boot.library.path: "+
+ System.err.println("Located: " + jawtName0 + ": "+libpath+", within: sun.boot.library.path: "+
System.getProperty("sun.boot.library.path"));
found = true;
}
diff --git a/gl4java/GLUFunc14.java b/gl4java/GLUFunc14.java
index 2e81dec..8c24cfb 100644
--- a/gl4java/GLUFunc14.java
+++ b/gl4java/GLUFunc14.java
@@ -37,7 +37,7 @@ public void gluTessBeginPolygon ( long tess, Buffer data) ;
extern void gluTessVertex ( GLUtesselator * tess , GLdouble * location , GLvoid * data ) ;
* </pre>
*/
-public void gluTessVertex ( long tess, double[] location, Buffer data) ;
+public void gluTessVertex ( long tess, DoubleBuffer location, Buffer data) ;
public String gluErrorString ( int errorCode ) ;
diff --git a/gl4java/GLUFunc14JauJNI.java b/gl4java/GLUFunc14JauJNI.java
index 5d24f22..14b0cf2 100644
--- a/gl4java/GLUFunc14JauJNI.java
+++ b/gl4java/GLUFunc14JauJNI.java
@@ -37,7 +37,7 @@ public final native void gluTessBeginPolygon ( long tess, Buffer data) ;
extern void gluTessVertex ( GLUtesselator * tess , GLdouble * location , GLvoid * data ) ;
* </pre>
*/
-public final native void gluTessVertex ( long tess, double[] location, Buffer data) ;
+public final native void gluTessVertex ( long tess, DoubleBuffer location, Buffer data) ;
public final native String gluErrorString ( int errorCode ) ;
diff --git a/makefile b/makefile
index 74f9e44..84a0182 100644
--- a/makefile
+++ b/makefile
@@ -594,14 +594,14 @@ $(HOME_LIB_DIR)/$(LIBRARY3_TST): $(FILES3_TST.o)
######################################################################
#tools :
-# cd C2J ; make C2J
+# cd C2J ; $(MAKE) C2J
#
gl2j :
- cd C2J ; make gl2j
+ cd C2J ; $(MAKE) gl2j
gl2c :
- cd C2J ; make gl2c
+ cd C2J ; $(MAKE) gl2c
$(PACKAGEDIR)/GLContext.java: makefile $(PACKAGEDIR)/GLContext.java.skel
sed -e 's/__SED_CLASS_VERSION__/\"$(LIBMAJOR).$(LIBMINOR).$(LIBBUGFIX).$(RELEASE)\"/g' \
@@ -713,8 +713,8 @@ cleanall: clean
for i in $$(find . -name \*.class) ; do \
rm -f $$i ; \
done
- cd demos ; make clean
- cd demos/natives/x11 ; make cleanall
+ cd demos ; $(MAKE) clean
+ cd demos/natives/x11 ; $(MAKE) cleanall
clean: cleannative cleanupw32 cleanhtmldoc cleantemp
@@ -727,11 +727,11 @@ cleannative:
$(HOME_LIB_DIR)/${LIBNAME3}.* $(HOME_LIB_DIR)/${LIBNAME3_NF}.* \
$(HOME_LIB_DIR)/${LIBNAME3_TST}.* \
$(CNATIVEDIR)/winstuff.h
- cd demos/natives/x11 ; make clean
+ cd demos/natives/x11 ; $(MAKE) clean
cleanupw32: cleanup Win32VC6/libs Win32VC6/temp
- rm -rvf Win32VC6/libs/*
- rm -fv `find Win32VC6 -name \*.plg -o -name \*.idb -o -name \*.opt -o -name \*.ncb`
+ rm -rf Win32VC6/libs/*
+ rm -f `find Win32VC6 -name \*.plg -o -name \*.idb -o -name \*.opt -o -name \*.ncb`
cleanup: $(CHEADERDIR) archive binpkg
rm -f errors
@@ -742,7 +742,7 @@ cleantemp:
rm -f `find . -iname errors`
rm -f `find . -iname *.log`
rm -f `find . -iname *.tmp`
- cd demos ; make clean
+ cd demos ; $(MAKE) clean
cleanhtmldoc:
rm -rf doxygens/html
@@ -793,7 +793,7 @@ doxygendoc:
doxygen
javadoc:
- cd C2J; make htmldoc
+ cd C2J; $(MAKE) htmldoc
$(JAVADOC) -J-Xmx64m -protected -d docs/html \
-sourcepath "$(JDK_HOME)/lib/classes.zip:$(THISDIR):$(THISDIR)/demos" \
-author -version \
@@ -815,7 +815,7 @@ javadoc:
2>&1 | tee -a errors
javadocw32:
- cd C2J; make htmldoc
+ cd C2J; $(MAKE) htmldoc
$(JAVADOC) -protected -d docs\\html \
-sourcepath "$(THISDIR_w32);$(THISDIR_w32)\\demos" \
-author -version \
@@ -925,7 +925,7 @@ javacalldemos:
cd demos/GLFDemos ; $(JAVAC_13) *.java
cd demos/GLLandScape ; $(JAVAC_13) *.java
cd demos/HodglimsNeHe ; $(JAVAC_13) *.java
- cd demos/MiscDemos ; make
+ cd demos/MiscDemos ; $(MAKE)
cd demos/NVidia ; $(JAVAC_14) *.java
cd demos/RonsDemos ; $(JAVAC_13) *.java
cd demos/SwingDemos ; $(JAVAC_13) *.java
diff --git a/symbols.mak.linux-java2-xf86-ppc-32bit b/symbols.mak.linux-java2-xf86-ppc-32bit
index 178d52f..dbc7101 100644
--- a/symbols.mak.linux-java2-xf86-ppc-32bit
+++ b/symbols.mak.linux-java2-xf86-ppc-32bit
@@ -52,6 +52,7 @@ JAVAC_13 = $(JDK13_HOME)/bin/javac -classpath ".:$(THISDIR):$(THISDIR)/capsapi
JAR_DESTS = /usr/local/lib/jdk1.3.0-FCS-blackdown/jre/lib/ext \
/usr/local/lib/j2sdk1.3.1/jre/lib/ext
+MAKE = make
CC = gcc
MKLIB = mklibs/mkslib.linux
MKEXP = echo
diff --git a/symbols.mak.linux-java2-xf86-x86-32bit b/symbols.mak.linux-java2-xf86-x86-32bit
index c85a470..3db851c 100644
--- a/symbols.mak.linux-java2-xf86-x86-32bit
+++ b/symbols.mak.linux-java2-xf86-x86-32bit
@@ -58,6 +58,7 @@ JAR_DESTS = /usr/local/lib/jdk1.2.2-FCS-blackdown/jre/lib/ext \
/usr/local/lib/jdk1.3.1-sun/jre/lib/ext \
/usr/local/lib/jdk1.4.0-sun/jre/lib/ext
+MAKE = make
CC = gcc
MKLIB = mklibs/mkslib.linux
MKEXP = echo
diff --git a/symbols.mak.sgi-irix65-mips-gcc-32bit b/symbols.mak.sgi-irix65-mips-gcc-32bit
index d680453..9e59a4a 100644
--- a/symbols.mak.sgi-irix65-mips-gcc-32bit
+++ b/symbols.mak.sgi-irix65-mips-gcc-32bit
@@ -4,28 +4,62 @@
# and CC etc. on your system
######################################################################
-SHELL = /usr/bin/bash
+SHELL = /usr/sglocal/bin/bash
THISDIR = ${PWD}
HOME_LIB_DIR = ${HOME}/lib
DEST_CLASSES_DIR = ${HOME}/lib-java
UNIXTYPE = SGI-IRIX-65-mips
-JDK_HOME = $(shell dirname $$(which java))/..
+#
+# JDK_HOME must point to the highest JDK being used,
+# e.g. to JDK14_HOME, if using JDK14, otherwise JDK13_HOME
+#
+# AT LEAST JDK13_HOME MUST BE DEFINED !
+#
+JDK13_HOME = /usr/java
+#JDK14_HOME =
+JDK_HOME = $(JDK13_HOME)
+
JAVASHAREINC = $(JDK_HOME)/include
JAVAOSINC = $(JDK_HOME)/include/irix
+JAVAOSLIB = $(JDK_HOME)/jre/lib/mips
+
+JAVADOC = $(JDK_HOME)/bin/javadoc
+JAVAH = $(JDK_HOME)/bin/javah
+JAR = $(JDK13_HOME)/bin/jar
+
+# If MSJAVAC is specified on Win32 platforms, it will be used to
+# compile window system-specific files for the Microsoft VM. In order
+# to build a complete GL4Java distribution on Windows, MSJAVAC must be
+# specified.
+# MSJAVAC = //D/MSJVM/Bin/jvc -nomessage -x- -cp:p .\;$(THISDIR_w32)\;$(THISDIR_w32)\\CAPSAPI_CLASSES.ZIP
+# At least JAVAC_13 must be defined.
+# JAVAC_14 may be defined to create JDK 1.4 related things ..
+#
+# JAVAC_14 is being used to build the JDK 1.4 specific classes only
+#
+# JAVAC_13 is being used to build all JDK 1.1 - 1.3 related classes
+#
+# In order to build a complete GL4Java distribution on X11, Win32, and (once JDK 1.4 is available)
+# Macintosh, both JAVAC_13 and JAVAC_14 must be specified.
+#
+JAVAC_13 = $(JDK13_HOME)/bin/javac -classpath ".:$(THISDIR):$(THISDIR)/capsapi_classes.zip:$(THISDIR)/png.jar"
+#JAVAC_14 =
+
+JAR_DESTS = ${HOME}/jre/lib/ext
+
+
+MAKE = gmake
CC = gcc
MKLIB = mklibs/mkslib.irix6.2-gcc
MKEXP = echo
-JAVAC = $(JDK_HOME)/bin/javac -classpath ".:$(THISDIR):$(THISDIR)/capsapi_classes.zip"
-JAVAH = $(JDK_HOME)/bin/javah
-JAR = $(JDK_HOME)/bin/jar
OGLINCDIR = /usr/include
-XINCDIR = /usr/include/X11
-XLIBDIR = /usr/lib/X11
+XINCDIR = /usr/include
+XLIBDIR = /usr/lib32
MATHLIB = -lm