From 3e2b16a820bfe03f8f3837c3aaa615c8c4b7f18c Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 13 Feb 2001 05:32:07 +0000 Subject: JAWT Support JDK >=1.3 --- C2J/C2J.java | 10 +- C2J/C2J.jj | 10 +- C2J/CFuncVariable.java | 4 +- C2J/gl-enum-auto.java | 4 +- C2J/gl-funcnames.skel | 4 +- C2J/gl-proto-auto.java | 4 +- C2J/gl-proto-dynauto-jni12.c | 4 +- C2J/gl-proto-dynauto-tst-jni12.c | 4 +- C2J/gl-proto-dynauto-tst.c | 4 +- C2J/gl-proto-dynauto.c | 4 +- C2J/gl-protoVirt-auto.java | 4 +- C2J/glu-enum-auto.java | 4 +- C2J/glu-proto-auto-jni12.c | 261 +++---- C2J/glu-proto-auto-tst-jni12.c | 261 +++---- C2J/glu-proto-auto-tst.c | 261 +++---- C2J/glu-proto-auto.c | 261 +++---- C2J/glu-proto-auto.java | 117 ++- C2J/glu-proto-auto.orig.h | 3 - C2J/glu-protoVirt-auto.java | 117 ++- C2J/manual/glu-manualCodedImplJNI.c | 88 ++- C2J/manual/glu-manualCodedImplJNI2.java | 16 +- C2J/manual/glu-manualCodedVirt.java | 16 +- CHANGES.txt | 48 +- CNativeCode/OpenGLU_JauJNI12_funcs.c | 381 ++++------ CNativeCode/OpenGLU_JauJNI12tst_funcs.c | 381 ++++------ CNativeCode/OpenGLU_JauJNI_funcs.c | 381 ++++------ CNativeCode/OpenGLU_JauJNInf_funcs.c | 381 ++++------ CNativeCode/OpenGLU_JauJNItst_funcs.c | 381 ++++------ CNativeCode/OpenGLU_funcs.c.skel | 32 +- CNativeCode/OpenGL_JauJNI12_dynfuncs.c | 4 +- CNativeCode/OpenGL_JauJNI12tst_dynfuncs.c | 4 +- CNativeCode/OpenGL_JauJNI_dynfuncs.c | 4 +- CNativeCode/OpenGL_JauJNInf_dynfuncs.c | 4 +- CNativeCode/OpenGL_JauJNItst_dynfuncs.c | 4 +- CNativeCode/OpenGL_Win32.c | 817 +++----------------- CNativeCode/OpenGL_Win32_JDirect.c | 32 +- CNativeCode/OpenGL_X11.c | 837 ++++----------------- CNativeCode/OpenGL_misc.c | 38 +- CNativeCode/OpenGL_misc.h | 13 + CNativeCode/jni12tools.c | 12 + CNativeCode/jnitools.c | 13 + CNativeCode/jnitools.h | 8 + Installer/GL4JInst_cacert_ns.html | 2 +- Installer/makeNetscapeSignedJar-Unix.sh | 2 +- Installer/versiondef.sh | 2 +- Win32VC6/GL4JavaJauGLJNI/GL4JavaJauGLJNI.plg | 13 +- Win32VC6/GL4JavaJauGLJNI12/GL4JavaJauGLJNI12.plg | 9 +- .../GL4JavaJauGLJNI12tst/GL4JavaJauGLJNI12tst.plg | 9 +- Win32VC6/GL4JavaJauGLJNInf/GL4JavaJauGLJNInf.plg | 9 +- Win32VC6/GL4JavaJauGLJNItst/GL4JavaJauGLJNItst.plg | 9 +- Win32VC6/GL4JavaJauGLUJNI/GL4JavaJauGLUJNI.plg | 9 +- Win32VC6/GL4JavaJauGLUJNI12/GL4JavaJauGLUJNI12.plg | 9 +- .../GL4JavaJauGLUJNI12tst.plg | 9 +- Win32VC6/GL4JavaJauGLUJNInf/GL4JavaJauGLUJNI.plg | 9 +- .../GL4JavaJauGLUJNItst/GL4JavaJauGLUJNItst.plg | 9 +- Win32VC6/GL4JavaJauGljJNI/GL4JavaJauGljJNI.dsp | 9 +- Win32VC6/GL4JavaJauGljJNI/GL4JavaJauGljJNI.plg | 62 +- Win32VC6/GL4JavaJauGljJNI12/GL4JavaJauGljJNI12.dsp | 5 +- Win32VC6/GL4JavaJauGljJNI12/GL4JavaJauGljJNI12.plg | 13 +- Win32VC6/GL4JavaMSJDirect/GL4JavaMSJDirect.plg | 9 +- Win32VC6/Win32VC6.dsw | 45 ++ demos/GLLandScape/GLLandScape1.java | 7 + demos/GLLandScape/GLLandScape1w1.java | 56 +- demos/GLLandScape/GLLandScape1w1Applet.java | 177 ++++- demos/HodglimsNeHe/Lesson1.java | 1 + demos/HodglimsNeHe/Lesson11.java | 1 + demos/HodglimsNeHe/Lesson12.java | 1 + demos/HodglimsNeHe/Lesson16.java | 7 + demos/HodglimsNeHe/Lesson18.java | 15 +- demos/HodglimsNeHe/Lesson2.java | 1 + demos/HodglimsNeHe/Lesson3.java | 1 + demos/HodglimsNeHe/Lesson4.java | 1 + demos/HodglimsNeHe/Lesson5.java | 1 + demos/HodglimsNeHe/Lesson6.java | 1 + demos/HodglimsNeHe/Lesson7.java | 7 + demos/HodglimsNeHe/Lesson8.java | 7 + demos/HodglimsNeHe/Lesson9.java | 1 + demos/HodglimsNeHe/index.html | 2 +- demos/HodglimsNeHe/index_plugin13.html | 2 +- demos/MiscDemos/DrawColoredPrimitives.java | 2 +- demos/MiscDemos/DrawColoredPrimitives2.java | 2 +- demos/MiscDemos/GLImageWorld1.java | 28 +- demos/MiscDemos/TriangleRotate.java | 2 +- demos/MiscDemos/accanti.java | 2 +- demos/MiscDemos/alpha3D.java | 2 +- demos/MiscDemos/gears.java | 37 +- demos/MiscDemos/glutFontBitmapTest2Applet.java | 27 +- demos/MiscDemos/index.html | 12 +- demos/MiscDemos/index_plugin13.html | 12 +- demos/MiscDemos/morph3d.java | 21 +- demos/MiscDemos/nurbs.java | 2 +- demos/MiscDemos/pngTextureTestApplet.java | 79 +- demos/MiscDemos/select.java | 2 +- demos/MiscDemos/spectex.java | 2 +- demos/MiscDemos/stencil.java | 2 +- demos/MiscDemos/tess.java | 2 +- demos/MiscDemos/tessdemo.java | 13 +- demos/MiscDemos/tesswind.java | 2 +- demos/RectRenderSpeed/GL4JCanvas.java | 4 +- demos/RonsDemos/dinoshade.java | 2 +- demos/RonsDemos/fog.java | 2 +- demos/RonsDemos/material.java | 2 +- demos/RonsDemos/molehill.java | 2 +- demos/RonsDemos/moth.java | 2 +- demos/RonsDemos/particle.java | 2 +- demos/RonsDemos/polyoff.java | 2 +- demos/RonsDemos/quadric.java | 2 +- demos/RonsDemos/reflect.java | 2 +- demos/RonsDemos/renormal.java | 2 +- demos/RonsDemos/rings.java | 2 +- demos/RonsDemos/shadowvol.java | 2 +- demos/RonsDemos/softshadow.java | 2 +- demos/RonsDemos/steam.java | 4 +- demos/RonsDemos/surface.java | 2 +- demos/RonsDemos/text3d.java | 1 + demos/SwingDemos/CrossColorJPanel.java | 1 - demos/SwingDemos/TessJPanel.java | 2 +- demos/demoCvs.java | 1 - demos/demoCvsAnim.java | 1 - demos/glDemosCvs.java | 140 ++-- demos/glLogoCvs.java | 1 - demos/glStencilTest.java | 2 - demos/index.html | 2 +- demos/olympicCvs.java | 1 - demos/starCvs.java | 1 - demos/test1Cvs.java | 1 - demos/testTextPPM1.java | 4 +- demos/waveCvs.java | 2 - docs/index.html | 4 + gl4java/GL4JavaReflections.java | 1 - gl4java/GLContext.java.skel | 559 ++++++++++---- gl4java/GLEnum.java | 4 +- gl4java/GLFunc.java | 8 +- gl4java/GLFuncJauJNI.java | 4 +- gl4java/GLFuncJauJNInf.java | 4 +- gl4java/GLUEnum.java | 4 +- gl4java/GLUFunc.java | 133 ++-- gl4java/GLUFuncJauJNI.java | 133 ++-- gl4java/GLUFuncJauJNInf.java | 133 ++-- gl4java/applet/SimpleGLAnimApplet1.java | 46 ++ gl4java/awt/GLAnimCanvas.java | 229 +++--- gl4java/awt/GLCanvas.java | 110 +-- gl4java/jau/awt/WinHandleAccess.java | 4 +- gl4java/jau/awt/macintosh/MacHandleAccess.java | 8 +- gl4java/jau/awt/motif/X11HandleAccess.java | 7 +- gl4java/jau/awt/windows/MSWin32HandleAccess.java | 7 +- gl4java/jau/awt/windows/Win32HandleAccess.java | 7 +- gl4java/swing/GLAnimJPanel.java | 155 ++-- gl4java/swing/GLJPanel.java | 95 +-- gl4java/system/GljMSJDirect.java | 12 +- gl4java/utils/Test.java | 2 +- gl4java/utils/glut/GLUTFuncLightImpl.java | 2 +- makefile | 64 +- 153 files changed, 3506 insertions(+), 4444 deletions(-) diff --git a/C2J/C2J.java b/C2J/C2J.java index c6105c6..1ae52cf 100644 --- a/C2J/C2J.java +++ b/C2J/C2J.java @@ -3,7 +3,7 @@ import java.util.*; public class C2J implements C2JConstants { - public static final String version = "C2J Parser Version 1.4 Beta" ; + public static final String version = "C2J Parser Version 1.5 Beta" ; public static final String vendor = "Jausoft - Sven Goethel Software Development"; public static final int EXPORT_JNI_JAVA = 1; @@ -673,22 +673,22 @@ import java.util.*; break; case GLUquadricObj: t = jj_consume_token(GLUquadricObj); - typeJava="int"; + typeJava="long"; cSrc += t.image+" "; break; case GLUnurbsObj: t = jj_consume_token(GLUnurbsObj); - typeJava="int"; + typeJava="long"; cSrc += t.image+" "; break; case GLUtesselator: t = jj_consume_token(GLUtesselator); - typeJava="int"; + typeJava="long"; cSrc += t.image+" "; break; case GLUtriangulatorObj: t = jj_consume_token(GLUtriangulatorObj); - typeJava="int"; + typeJava="long"; cSrc += t.image+" "; break; default: diff --git a/C2J/C2J.jj b/C2J/C2J.jj index 4376c97..d14d1a9 100644 --- a/C2J/C2J.jj +++ b/C2J/C2J.jj @@ -57,7 +57,7 @@ import java.util.*; public class C2J{ - public static final String version = "C2J Parser Version 1.4 Beta" ; + public static final String version = "C2J Parser Version 1.5 Beta" ; public static final String vendor = "Jausoft - Sven Goethel Software Development"; public static final int EXPORT_JNI_JAVA = 1; @@ -636,19 +636,19 @@ CFuncVariable TypeSpecifierGL(CFuncVariable cfvar) : cSrc += t.image+" "; } | t= - { typeJava="int"; + { typeJava="long"; cSrc += t.image+" "; } | t= - { typeJava="int"; + { typeJava="long"; cSrc += t.image+" "; } | t= - { typeJava="int"; + { typeJava="long"; cSrc += t.image+" "; } | t= - { typeJava="int"; + { typeJava="long"; cSrc += t.image+" "; } ) diff --git a/C2J/CFuncVariable.java b/C2J/CFuncVariable.java index a2e08f0..267420f 100644 --- a/C2J/CFuncVariable.java +++ b/C2J/CFuncVariable.java @@ -174,12 +174,12 @@ public class CFuncVariable res+=typeC; - if(arrayNumber>0||isGLUPtrObject) + if(arrayNumber>0 || isGLUPtrObject) res+=" "; for(j=0; j - extern GLUquadricObj * gluNewQuadric ( void ) ; - * - */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNI_gluNewQuadric ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewQuadric ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -885,12 +866,12 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricDrawStyle (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint drawStyle)
 	{
 
 		gluQuadricDrawStyle (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) drawStyle
 		);
 
@@ -905,12 +886,12 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricOrientation (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint orientation)
 	{
 
 		gluQuadricOrientation (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) orientation
 		);
 
@@ -925,12 +906,12 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricNormals (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint normals)
 	{
 
 		gluQuadricNormals (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) normals
 		);
 
@@ -945,12 +926,12 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricTexture (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jboolean textureCoords)
 	{
 
 		gluQuadricTexture (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLboolean) textureCoords
 		);
 
@@ -965,7 +946,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluCylinder (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble baseRadius,
 		jdouble topRadius,
 		jdouble height,
@@ -974,7 +955,7 @@
 	{
 
 		gluCylinder (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) baseRadius,
 			(GLdouble) topRadius,
 			(GLdouble) height,
@@ -993,14 +974,14 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluSphere (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble radius,
 		jint slices,
 		jint stacks)
 	{
 
 		gluSphere (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) radius,
 			(GLint) slices,
 			(GLint) stacks
@@ -1017,7 +998,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluDisk (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble innerRadius,
 		jdouble outerRadius,
 		jint slices,
@@ -1025,7 +1006,7 @@
 	{
 
 		gluDisk (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) innerRadius,
 			(GLdouble) outerRadius,
 			(GLint) slices,
@@ -1043,7 +1024,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluPartialDisk (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble innerRadius,
 		jdouble outerRadius,
 		jint slices,
@@ -1053,7 +1034,7 @@
 	{
 
 		gluPartialDisk (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) innerRadius,
 			(GLdouble) outerRadius,
 			(GLint) slices,
@@ -1064,25 +1045,6 @@
 
 	}
 
-/**
- * Original Function-Prototype :
- * 
 
-   extern GLUnurbsObj * gluNewNurbsRenderer ( void ) ;
- * 
- */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNI_gluNewNurbsRenderer ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewNurbsRenderer ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -1092,7 +1054,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluLoadSamplingMatrices (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jfloatArray modelMatrix,
 		jfloatArray projMatrix,
 		jintArray viewport)
@@ -1114,7 +1076,7 @@
 			ptr3 = (jint *) (*env)->GetPrimitiveArrayCritical(env, viewport, 0);
 		}
 		gluLoadSamplingMatrices (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(const GLfloat *) ptr1,
 			(const GLfloat *) ptr2,
 			(const GLint *) ptr3
@@ -1143,13 +1105,13 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluNurbsProperty (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint property,
 		jfloat value)
 	{
 
 		gluNurbsProperty (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLenum) property,
 			(GLfloat) value
 		);
@@ -1165,7 +1127,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluGetNurbsProperty (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint property,
 		jfloatArray value)
 	{
@@ -1177,7 +1139,7 @@
 			ptr2 = (jfloat *) (*env)->GetPrimitiveArrayCritical(env, value, &isCopiedArray2);
 		}
 		gluGetNurbsProperty (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLenum) property,
 			(GLfloat *) ptr2
 		);
@@ -1197,11 +1159,11 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluBeginCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginCurve (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1215,11 +1177,11 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluEndCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndCurve (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1233,7 +1195,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluNurbsCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint nknots,
 		jfloatArray knot,
 		jint stride,
@@ -1255,7 +1217,7 @@
 			ptr4 = (jfloat *) (*env)->GetPrimitiveArrayCritical(env, ctlarray, &isCopiedArray4);
 		}
 		gluNurbsCurve (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) nknots,
 			(GLfloat *) ptr2,
 			(GLint) stride,
@@ -1283,11 +1245,11 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluBeginSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginSurface (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1301,11 +1263,11 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluEndSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndSurface (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1319,7 +1281,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluNurbsSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint sknot_count,
 		jfloatArray sknot,
 		jint tknot_count,
@@ -1351,7 +1313,7 @@
 			ptr7 = (jfloat *) (*env)->GetPrimitiveArrayCritical(env, ctlarray, &isCopiedArray7);
 		}
 		gluNurbsSurface (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) sknot_count,
 			(GLfloat *) ptr2,
 			(GLint) tknot_count,
@@ -1387,11 +1349,11 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluBeginTrim (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginTrim (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1405,11 +1367,11 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluEndTrim (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndTrim (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1423,7 +1385,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluPwlCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint count,
 		jfloatArray array,
 		jint stride,
@@ -1437,7 +1399,7 @@
 			ptr2 = (jfloat *) (*env)->GetPrimitiveArrayCritical(env, array, &isCopiedArray2);
 		}
 		gluPwlCurve (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) count,
 			(GLfloat *) ptr2,
 			(GLint) stride,
@@ -1450,25 +1412,6 @@
 		}
 	}
 
-/**
- * Original Function-Prototype :
- * 
 
-   extern GLUtesselator * gluNewTess ( void ) ;
- * 
- */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNI_gluNewTess ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewTess ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -1476,9 +1419,9 @@
  * 
*/ JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3B ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3B ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jbyteArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1489,7 +1432,7 @@ ptr1 = (jbyte *) (*env)->GetPrimitiveArrayCritical(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1499,9 +1442,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3S ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3S ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jshortArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1512,7 +1455,7 @@ ptr1 = (jshort *) (*env)->GetPrimitiveArrayCritical(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1522,9 +1465,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3I ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3I ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jintArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1535,7 +1478,7 @@ ptr1 = (jint *) (*env)->GetPrimitiveArrayCritical(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1545,9 +1488,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3F ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3F ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jfloatArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1558,7 +1501,7 @@ ptr1 = (jfloat *) (*env)->GetPrimitiveArrayCritical(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1568,9 +1511,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3D ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3D ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1581,7 +1524,7 @@ ptr1 = (jdouble *) (*env)->GetPrimitiveArrayCritical(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1591,9 +1534,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3Z ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3Z ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jbooleanArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1604,7 +1547,7 @@ ptr1 = (jboolean *) (*env)->GetPrimitiveArrayCritical(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1614,9 +1557,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3J ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3J ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jlongArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1627,7 +1570,7 @@ ptr1 = (jlong *) (*env)->GetPrimitiveArrayCritical(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1646,11 +1589,11 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessBeginContour ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessBeginContour ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -1662,9 +1605,9 @@ *
*/ JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3B ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3B ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jbyteArray vertex_data) { @@ -1682,7 +1625,7 @@ ptr2 = (jbyte *) (*env)->GetPrimitiveArrayCritical(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -1697,9 +1640,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3S ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3S ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jshortArray vertex_data) { @@ -1717,7 +1660,7 @@ ptr2 = (jshort *) (*env)->GetPrimitiveArrayCritical(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -1732,9 +1675,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3I ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3I ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jintArray vertex_data) { @@ -1752,7 +1695,7 @@ ptr2 = (jint *) (*env)->GetPrimitiveArrayCritical(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -1767,9 +1710,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3F ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3F ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jfloatArray vertex_data) { @@ -1787,7 +1730,7 @@ ptr2 = (jfloat *) (*env)->GetPrimitiveArrayCritical(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -1802,9 +1745,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3D ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3D ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jdoubleArray vertex_data) { @@ -1822,7 +1765,7 @@ ptr2 = (jdouble *) (*env)->GetPrimitiveArrayCritical(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -1837,9 +1780,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3Z ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3Z ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jbooleanArray vertex_data) { @@ -1857,7 +1800,7 @@ ptr2 = (jboolean *) (*env)->GetPrimitiveArrayCritical(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -1872,9 +1815,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3J ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3J ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jlongArray vertex_data) { @@ -1892,7 +1835,7 @@ ptr2 = (jlong *) (*env)->GetPrimitiveArrayCritical(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -1916,11 +1859,11 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessEndContour ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessEndContour ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -1934,11 +1877,11 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessEndPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessEndPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -1952,13 +1895,13 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessProperty ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint which, jdouble value) { gluTessProperty ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) which, (GLdouble) value ); @@ -1974,14 +1917,14 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessNormal ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdouble x, jdouble y, jdouble z) { gluTessNormal ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble) x, (GLdouble) y, (GLdouble) z @@ -1998,7 +1941,7 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluGetTessProperty ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint which, jdoubleArray value) { @@ -2010,7 +1953,7 @@ ptr2 = (jdouble *) (*env)->GetPrimitiveArrayCritical(env, value, &isCopiedArray2); } gluGetTessProperty ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) which, (GLdouble *) ptr2 ); @@ -2030,11 +1973,11 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluBeginPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluBeginPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -2048,12 +1991,12 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluNextContour ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint type) { gluNextContour ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) type ); @@ -2068,13 +2011,13 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluEndPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluEndPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } -/* C2J Parser Version 1.4 Beta: Java program parsed successfully. */ +/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */ diff --git a/C2J/glu-proto-auto-tst-jni12.c b/C2J/glu-proto-auto-tst-jni12.c index c56efed..1c371f0 100644 --- a/C2J/glu-proto-auto-tst-jni12.c +++ b/C2J/glu-proto-auto-tst-jni12.c @@ -1,5 +1,5 @@ /** - * C2J Parser Version 1.4 Beta + * C2J Parser Version 1.5 Beta * Jausoft - Sven Goethel Software Development * Reading from file: glu-proto-auto.orig.h . . . * Destination-Class: gl4java_GLUFuncJauJNI ! @@ -1023,25 +1023,6 @@ return ret; } -/** - * Original Function-Prototype : - *
 
-   extern GLUquadricObj * gluNewQuadric ( void ) ;
- * 
- */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNI_gluNewQuadric ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewQuadric ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -1051,12 +1032,12 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricDrawStyle (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint drawStyle)
 	{
 
 		gluQuadricDrawStyle (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) drawStyle
 		);
 
@@ -1071,12 +1052,12 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricOrientation (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint orientation)
 	{
 
 		gluQuadricOrientation (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) orientation
 		);
 
@@ -1091,12 +1072,12 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricNormals (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint normals)
 	{
 
 		gluQuadricNormals (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) normals
 		);
 
@@ -1111,12 +1092,12 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricTexture (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jboolean textureCoords)
 	{
 
 		gluQuadricTexture (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLboolean) textureCoords
 		);
 
@@ -1131,7 +1112,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluCylinder (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble baseRadius,
 		jdouble topRadius,
 		jdouble height,
@@ -1140,7 +1121,7 @@
 	{
 
 		gluCylinder (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) baseRadius,
 			(GLdouble) topRadius,
 			(GLdouble) height,
@@ -1159,14 +1140,14 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluSphere (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble radius,
 		jint slices,
 		jint stacks)
 	{
 
 		gluSphere (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) radius,
 			(GLint) slices,
 			(GLint) stacks
@@ -1183,7 +1164,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluDisk (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble innerRadius,
 		jdouble outerRadius,
 		jint slices,
@@ -1191,7 +1172,7 @@
 	{
 
 		gluDisk (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) innerRadius,
 			(GLdouble) outerRadius,
 			(GLint) slices,
@@ -1209,7 +1190,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluPartialDisk (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble innerRadius,
 		jdouble outerRadius,
 		jint slices,
@@ -1219,7 +1200,7 @@
 	{
 
 		gluPartialDisk (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) innerRadius,
 			(GLdouble) outerRadius,
 			(GLint) slices,
@@ -1230,25 +1211,6 @@
 
 	}
 
-/**
- * Original Function-Prototype :
- * 
 
-   extern GLUnurbsObj * gluNewNurbsRenderer ( void ) ;
- * 
- */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNI_gluNewNurbsRenderer ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewNurbsRenderer ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -1258,7 +1220,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluLoadSamplingMatrices (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jfloatArray modelMatrix,
 		jfloatArray projMatrix,
 		jintArray viewport)
@@ -1298,7 +1260,7 @@
 			}
 		}
 		gluLoadSamplingMatrices (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(const GLfloat *) ptr1,
 			(const GLfloat *) ptr2,
 			(const GLint *) ptr3
@@ -1327,13 +1289,13 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluNurbsProperty (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint property,
 		jfloat value)
 	{
 
 		gluNurbsProperty (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLenum) property,
 			(GLfloat) value
 		);
@@ -1349,7 +1311,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluGetNurbsProperty (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint property,
 		jfloatArray value)
 	{
@@ -1366,7 +1328,7 @@
 			}
 		}
 		gluGetNurbsProperty (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLenum) property,
 			(GLfloat *) ptr2
 		);
@@ -1386,11 +1348,11 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluBeginCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginCurve (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1404,11 +1366,11 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluEndCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndCurve (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1422,7 +1384,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluNurbsCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint nknots,
 		jfloatArray knot,
 		jint stride,
@@ -1454,7 +1416,7 @@
 			}
 		}
 		gluNurbsCurve (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) nknots,
 			(GLfloat *) ptr2,
 			(GLint) stride,
@@ -1482,11 +1444,11 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluBeginSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginSurface (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1500,11 +1462,11 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluEndSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndSurface (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1518,7 +1480,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluNurbsSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint sknot_count,
 		jfloatArray sknot,
 		jint tknot_count,
@@ -1565,7 +1527,7 @@
 			}
 		}
 		gluNurbsSurface (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) sknot_count,
 			(GLfloat *) ptr2,
 			(GLint) tknot_count,
@@ -1601,11 +1563,11 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluBeginTrim (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginTrim (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1619,11 +1581,11 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluEndTrim (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndTrim (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1637,7 +1599,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluPwlCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint count,
 		jfloatArray array,
 		jint stride,
@@ -1656,7 +1618,7 @@
 			}
 		}
 		gluPwlCurve (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) count,
 			(GLfloat *) ptr2,
 			(GLint) stride,
@@ -1669,25 +1631,6 @@
 		}
 	}
 
-/**
- * Original Function-Prototype :
- * 
 
-   extern GLUtesselator * gluNewTess ( void ) ;
- * 
- */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNI_gluNewTess ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewTess ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -1695,9 +1638,9 @@
  * 
*/ JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3B ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3B ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jbyteArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1713,7 +1656,7 @@ } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1723,9 +1666,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3S ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3S ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jshortArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1741,7 +1684,7 @@ } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1751,9 +1694,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3I ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3I ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jintArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1769,7 +1712,7 @@ } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1779,9 +1722,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3F ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3F ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jfloatArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1797,7 +1740,7 @@ } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1807,9 +1750,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3D ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3D ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1825,7 +1768,7 @@ } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1835,9 +1778,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3Z ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3Z ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jbooleanArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1853,7 +1796,7 @@ } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1863,9 +1806,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3J ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3J ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jlongArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1881,7 +1824,7 @@ } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1900,11 +1843,11 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessBeginContour ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessBeginContour ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -1916,9 +1859,9 @@ *
*/ JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3B ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3B ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jbyteArray vertex_data) { @@ -1946,7 +1889,7 @@ } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -1961,9 +1904,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3S ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3S ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jshortArray vertex_data) { @@ -1991,7 +1934,7 @@ } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2006,9 +1949,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3I ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3I ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jintArray vertex_data) { @@ -2036,7 +1979,7 @@ } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2051,9 +1994,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3F ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3F ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jfloatArray vertex_data) { @@ -2081,7 +2024,7 @@ } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2096,9 +2039,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3D ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3D ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jdoubleArray vertex_data) { @@ -2126,7 +2069,7 @@ } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2141,9 +2084,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3Z ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3Z ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jbooleanArray vertex_data) { @@ -2171,7 +2114,7 @@ } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2186,9 +2129,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3J ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3J ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jlongArray vertex_data) { @@ -2216,7 +2159,7 @@ } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2240,11 +2183,11 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessEndContour ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessEndContour ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -2258,11 +2201,11 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessEndPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessEndPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -2276,13 +2219,13 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessProperty ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint which, jdouble value) { gluTessProperty ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) which, (GLdouble) value ); @@ -2298,14 +2241,14 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessNormal ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdouble x, jdouble y, jdouble z) { gluTessNormal ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble) x, (GLdouble) y, (GLdouble) z @@ -2322,7 +2265,7 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluGetTessProperty ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint which, jdoubleArray value) { @@ -2339,7 +2282,7 @@ } } gluGetTessProperty ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) which, (GLdouble *) ptr2 ); @@ -2359,11 +2302,11 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluBeginPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluBeginPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -2377,12 +2320,12 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluNextContour ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint type) { gluNextContour ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) type ); @@ -2397,13 +2340,13 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluEndPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluEndPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } -/* C2J Parser Version 1.4 Beta: Java program parsed successfully. */ +/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */ diff --git a/C2J/glu-proto-auto-tst.c b/C2J/glu-proto-auto-tst.c index 3af5a20..ebfc6f9 100644 --- a/C2J/glu-proto-auto-tst.c +++ b/C2J/glu-proto-auto-tst.c @@ -1,5 +1,5 @@ /** - * C2J Parser Version 1.4 Beta + * C2J Parser Version 1.5 Beta * Jausoft - Sven Goethel Software Development * Reading from file: glu-proto-auto.orig.h . . . * Destination-Class: gl4java_GLUFuncJauJNI ! @@ -1023,25 +1023,6 @@ return ret; } -/** - * Original Function-Prototype : - *
 
-   extern GLUquadricObj * gluNewQuadric ( void ) ;
- * 
- */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNI_gluNewQuadric ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewQuadric ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -1051,12 +1032,12 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricDrawStyle (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint drawStyle)
 	{
 
 		gluQuadricDrawStyle (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) drawStyle
 		);
 
@@ -1071,12 +1052,12 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricOrientation (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint orientation)
 	{
 
 		gluQuadricOrientation (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) orientation
 		);
 
@@ -1091,12 +1072,12 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricNormals (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint normals)
 	{
 
 		gluQuadricNormals (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) normals
 		);
 
@@ -1111,12 +1092,12 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricTexture (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jboolean textureCoords)
 	{
 
 		gluQuadricTexture (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLboolean) textureCoords
 		);
 
@@ -1131,7 +1112,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluCylinder (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble baseRadius,
 		jdouble topRadius,
 		jdouble height,
@@ -1140,7 +1121,7 @@
 	{
 
 		gluCylinder (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) baseRadius,
 			(GLdouble) topRadius,
 			(GLdouble) height,
@@ -1159,14 +1140,14 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluSphere (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble radius,
 		jint slices,
 		jint stacks)
 	{
 
 		gluSphere (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) radius,
 			(GLint) slices,
 			(GLint) stacks
@@ -1183,7 +1164,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluDisk (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble innerRadius,
 		jdouble outerRadius,
 		jint slices,
@@ -1191,7 +1172,7 @@
 	{
 
 		gluDisk (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) innerRadius,
 			(GLdouble) outerRadius,
 			(GLint) slices,
@@ -1209,7 +1190,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluPartialDisk (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble innerRadius,
 		jdouble outerRadius,
 		jint slices,
@@ -1219,7 +1200,7 @@
 	{
 
 		gluPartialDisk (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) innerRadius,
 			(GLdouble) outerRadius,
 			(GLint) slices,
@@ -1230,25 +1211,6 @@
 
 	}
 
-/**
- * Original Function-Prototype :
- * 
 
-   extern GLUnurbsObj * gluNewNurbsRenderer ( void ) ;
- * 
- */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNI_gluNewNurbsRenderer ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewNurbsRenderer ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -1258,7 +1220,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluLoadSamplingMatrices (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jfloatArray modelMatrix,
 		jfloatArray projMatrix,
 		jintArray viewport)
@@ -1298,7 +1260,7 @@
 			}
 		}
 		gluLoadSamplingMatrices (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(const GLfloat *) ptr1,
 			(const GLfloat *) ptr2,
 			(const GLint *) ptr3
@@ -1327,13 +1289,13 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluNurbsProperty (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint property,
 		jfloat value)
 	{
 
 		gluNurbsProperty (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLenum) property,
 			(GLfloat) value
 		);
@@ -1349,7 +1311,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluGetNurbsProperty (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint property,
 		jfloatArray value)
 	{
@@ -1366,7 +1328,7 @@
 			}
 		}
 		gluGetNurbsProperty (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLenum) property,
 			(GLfloat *) ptr2
 		);
@@ -1386,11 +1348,11 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluBeginCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginCurve (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1404,11 +1366,11 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluEndCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndCurve (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1422,7 +1384,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluNurbsCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint nknots,
 		jfloatArray knot,
 		jint stride,
@@ -1454,7 +1416,7 @@
 			}
 		}
 		gluNurbsCurve (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) nknots,
 			(GLfloat *) ptr2,
 			(GLint) stride,
@@ -1482,11 +1444,11 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluBeginSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginSurface (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1500,11 +1462,11 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluEndSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndSurface (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1518,7 +1480,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluNurbsSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint sknot_count,
 		jfloatArray sknot,
 		jint tknot_count,
@@ -1565,7 +1527,7 @@
 			}
 		}
 		gluNurbsSurface (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) sknot_count,
 			(GLfloat *) ptr2,
 			(GLint) tknot_count,
@@ -1601,11 +1563,11 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluBeginTrim (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginTrim (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1619,11 +1581,11 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluEndTrim (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndTrim (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1637,7 +1599,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluPwlCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint count,
 		jfloatArray array,
 		jint stride,
@@ -1656,7 +1618,7 @@
 			}
 		}
 		gluPwlCurve (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) count,
 			(GLfloat *) ptr2,
 			(GLint) stride,
@@ -1669,25 +1631,6 @@
 		}
 	}
 
-/**
- * Original Function-Prototype :
- * 
 
-   extern GLUtesselator * gluNewTess ( void ) ;
- * 
- */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNI_gluNewTess ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewTess ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -1695,9 +1638,9 @@
  * 
*/ JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3B ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3B ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jbyteArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1713,7 +1656,7 @@ } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1723,9 +1666,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3S ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3S ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jshortArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1741,7 +1684,7 @@ } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1751,9 +1694,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3I ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3I ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jintArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1769,7 +1712,7 @@ } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1779,9 +1722,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3F ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3F ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jfloatArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1797,7 +1740,7 @@ } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1807,9 +1750,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3D ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3D ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1825,7 +1768,7 @@ } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1835,9 +1778,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3Z ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3Z ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jbooleanArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1853,7 +1796,7 @@ } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1863,9 +1806,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3J ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3J ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jlongArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1881,7 +1824,7 @@ } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1900,11 +1843,11 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessBeginContour ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessBeginContour ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -1916,9 +1859,9 @@ *
*/ JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3B ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3B ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jbyteArray vertex_data) { @@ -1946,7 +1889,7 @@ } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -1961,9 +1904,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3S ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3S ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jshortArray vertex_data) { @@ -1991,7 +1934,7 @@ } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2006,9 +1949,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3I ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3I ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jintArray vertex_data) { @@ -2036,7 +1979,7 @@ } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2051,9 +1994,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3F ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3F ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jfloatArray vertex_data) { @@ -2081,7 +2024,7 @@ } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2096,9 +2039,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3D ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3D ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jdoubleArray vertex_data) { @@ -2126,7 +2069,7 @@ } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2141,9 +2084,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3Z ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3Z ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jbooleanArray vertex_data) { @@ -2171,7 +2114,7 @@ } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2186,9 +2129,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3J ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3J ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jlongArray vertex_data) { @@ -2216,7 +2159,7 @@ } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2240,11 +2183,11 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessEndContour ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessEndContour ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -2258,11 +2201,11 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessEndPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessEndPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -2276,13 +2219,13 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessProperty ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint which, jdouble value) { gluTessProperty ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) which, (GLdouble) value ); @@ -2298,14 +2241,14 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessNormal ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdouble x, jdouble y, jdouble z) { gluTessNormal ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble) x, (GLdouble) y, (GLdouble) z @@ -2322,7 +2265,7 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluGetTessProperty ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint which, jdoubleArray value) { @@ -2339,7 +2282,7 @@ } } gluGetTessProperty ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) which, (GLdouble *) ptr2 ); @@ -2359,11 +2302,11 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluBeginPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluBeginPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -2377,12 +2320,12 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluNextContour ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint type) { gluNextContour ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) type ); @@ -2397,13 +2340,13 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluEndPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluEndPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } -/* C2J Parser Version 1.4 Beta: Java program parsed successfully. */ +/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */ diff --git a/C2J/glu-proto-auto.c b/C2J/glu-proto-auto.c index a17b337..5153bfc 100644 --- a/C2J/glu-proto-auto.c +++ b/C2J/glu-proto-auto.c @@ -1,5 +1,5 @@ /** - * C2J Parser Version 1.4 Beta + * C2J Parser Version 1.5 Beta * Jausoft - Sven Goethel Software Development * Reading from file: glu-proto-auto.orig.h . . . * Destination-Class: gl4java_GLUFuncJauJNI ! @@ -857,25 +857,6 @@ return ret; } -/** - * Original Function-Prototype : - *
 
-   extern GLUquadricObj * gluNewQuadric ( void ) ;
- * 
- */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNI_gluNewQuadric ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewQuadric ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -885,12 +866,12 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricDrawStyle (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint drawStyle)
 	{
 
 		gluQuadricDrawStyle (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) drawStyle
 		);
 
@@ -905,12 +886,12 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricOrientation (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint orientation)
 	{
 
 		gluQuadricOrientation (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) orientation
 		);
 
@@ -925,12 +906,12 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricNormals (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint normals)
 	{
 
 		gluQuadricNormals (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) normals
 		);
 
@@ -945,12 +926,12 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricTexture (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jboolean textureCoords)
 	{
 
 		gluQuadricTexture (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLboolean) textureCoords
 		);
 
@@ -965,7 +946,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluCylinder (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble baseRadius,
 		jdouble topRadius,
 		jdouble height,
@@ -974,7 +955,7 @@
 	{
 
 		gluCylinder (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) baseRadius,
 			(GLdouble) topRadius,
 			(GLdouble) height,
@@ -993,14 +974,14 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluSphere (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble radius,
 		jint slices,
 		jint stacks)
 	{
 
 		gluSphere (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) radius,
 			(GLint) slices,
 			(GLint) stacks
@@ -1017,7 +998,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluDisk (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble innerRadius,
 		jdouble outerRadius,
 		jint slices,
@@ -1025,7 +1006,7 @@
 	{
 
 		gluDisk (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) innerRadius,
 			(GLdouble) outerRadius,
 			(GLint) slices,
@@ -1043,7 +1024,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluPartialDisk (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble innerRadius,
 		jdouble outerRadius,
 		jint slices,
@@ -1053,7 +1034,7 @@
 	{
 
 		gluPartialDisk (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) innerRadius,
 			(GLdouble) outerRadius,
 			(GLint) slices,
@@ -1064,25 +1045,6 @@
 
 	}
 
-/**
- * Original Function-Prototype :
- * 
 
-   extern GLUnurbsObj * gluNewNurbsRenderer ( void ) ;
- * 
- */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNI_gluNewNurbsRenderer ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewNurbsRenderer ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -1092,7 +1054,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluLoadSamplingMatrices (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jfloatArray modelMatrix,
 		jfloatArray projMatrix,
 		jintArray viewport)
@@ -1114,7 +1076,7 @@
 			ptr3 = (*env)->GetIntArrayElements(env, viewport, 0);
 		}
 		gluLoadSamplingMatrices (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(const GLfloat *) ptr1,
 			(const GLfloat *) ptr2,
 			(const GLint *) ptr3
@@ -1143,13 +1105,13 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluNurbsProperty (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint property,
 		jfloat value)
 	{
 
 		gluNurbsProperty (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLenum) property,
 			(GLfloat) value
 		);
@@ -1165,7 +1127,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluGetNurbsProperty (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint property,
 		jfloatArray value)
 	{
@@ -1177,7 +1139,7 @@
 			ptr2 = (*env)->GetFloatArrayElements(env, value, &isCopiedArray2);
 		}
 		gluGetNurbsProperty (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLenum) property,
 			(GLfloat *) ptr2
 		);
@@ -1197,11 +1159,11 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluBeginCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginCurve (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1215,11 +1177,11 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluEndCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndCurve (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1233,7 +1195,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluNurbsCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint nknots,
 		jfloatArray knot,
 		jint stride,
@@ -1255,7 +1217,7 @@
 			ptr4 = (*env)->GetFloatArrayElements(env, ctlarray, &isCopiedArray4);
 		}
 		gluNurbsCurve (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) nknots,
 			(GLfloat *) ptr2,
 			(GLint) stride,
@@ -1283,11 +1245,11 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluBeginSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginSurface (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1301,11 +1263,11 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluEndSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndSurface (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1319,7 +1281,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluNurbsSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint sknot_count,
 		jfloatArray sknot,
 		jint tknot_count,
@@ -1351,7 +1313,7 @@
 			ptr7 = (*env)->GetFloatArrayElements(env, ctlarray, &isCopiedArray7);
 		}
 		gluNurbsSurface (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) sknot_count,
 			(GLfloat *) ptr2,
 			(GLint) tknot_count,
@@ -1387,11 +1349,11 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluBeginTrim (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginTrim (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1405,11 +1367,11 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluEndTrim (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndTrim (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1423,7 +1385,7 @@
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluPwlCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint count,
 		jfloatArray array,
 		jint stride,
@@ -1437,7 +1399,7 @@
 			ptr2 = (*env)->GetFloatArrayElements(env, array, &isCopiedArray2);
 		}
 		gluPwlCurve (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) count,
 			(GLfloat *) ptr2,
 			(GLint) stride,
@@ -1450,25 +1412,6 @@
 		}
 	}
 
-/**
- * Original Function-Prototype :
- * 
 
-   extern GLUtesselator * gluNewTess ( void ) ;
- * 
- */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNI_gluNewTess ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewTess ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -1476,9 +1419,9 @@
  * 
*/ JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3B ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3B ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jbyteArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1489,7 +1432,7 @@ ptr1 = (*env)->GetByteArrayElements(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1499,9 +1442,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3S ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3S ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jshortArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1512,7 +1455,7 @@ ptr1 = (*env)->GetShortArrayElements(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1522,9 +1465,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3I ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3I ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jintArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1535,7 +1478,7 @@ ptr1 = (*env)->GetIntArrayElements(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1545,9 +1488,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3F ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3F ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jfloatArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1558,7 +1501,7 @@ ptr1 = (*env)->GetFloatArrayElements(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1568,9 +1511,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3D ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3D ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1581,7 +1524,7 @@ ptr1 = (*env)->GetDoubleArrayElements(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1591,9 +1534,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3Z ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3Z ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jbooleanArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1604,7 +1547,7 @@ ptr1 = (*env)->GetBooleanArrayElements(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1614,9 +1557,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3J ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3J ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jlongArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1627,7 +1570,7 @@ ptr1 = (*env)->GetLongArrayElements(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1646,11 +1589,11 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessBeginContour ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessBeginContour ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -1662,9 +1605,9 @@ *
*/ JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3B ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3B ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jbyteArray vertex_data) { @@ -1682,7 +1625,7 @@ ptr2 = (*env)->GetByteArrayElements(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -1697,9 +1640,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3S ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3S ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jshortArray vertex_data) { @@ -1717,7 +1660,7 @@ ptr2 = (*env)->GetShortArrayElements(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -1732,9 +1675,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3I ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3I ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jintArray vertex_data) { @@ -1752,7 +1695,7 @@ ptr2 = (*env)->GetIntArrayElements(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -1767,9 +1710,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3F ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3F ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jfloatArray vertex_data) { @@ -1787,7 +1730,7 @@ ptr2 = (*env)->GetFloatArrayElements(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -1802,9 +1745,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3D ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3D ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jdoubleArray vertex_data) { @@ -1822,7 +1765,7 @@ ptr2 = (*env)->GetDoubleArrayElements(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -1837,9 +1780,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3Z ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3Z ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jbooleanArray vertex_data) { @@ -1857,7 +1800,7 @@ ptr2 = (*env)->GetBooleanArrayElements(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -1872,9 +1815,9 @@ } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3J ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3J ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jlongArray vertex_data) { @@ -1892,7 +1835,7 @@ ptr2 = (*env)->GetLongArrayElements(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -1916,11 +1859,11 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessEndContour ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessEndContour ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -1934,11 +1877,11 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessEndPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessEndPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -1952,13 +1895,13 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessProperty ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint which, jdouble value) { gluTessProperty ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) which, (GLdouble) value ); @@ -1974,14 +1917,14 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessNormal ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdouble x, jdouble y, jdouble z) { gluTessNormal ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble) x, (GLdouble) y, (GLdouble) z @@ -1998,7 +1941,7 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluGetTessProperty ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint which, jdoubleArray value) { @@ -2010,7 +1953,7 @@ ptr2 = (*env)->GetDoubleArrayElements(env, value, &isCopiedArray2); } gluGetTessProperty ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) which, (GLdouble *) ptr2 ); @@ -2030,11 +1973,11 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluBeginPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluBeginPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -2048,12 +1991,12 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluNextContour ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint type) { gluNextContour ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) type ); @@ -2068,13 +2011,13 @@ JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluEndPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluEndPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } -/* C2J Parser Version 1.4 Beta: Java program parsed successfully. */ +/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */ diff --git a/C2J/glu-proto-auto.java b/C2J/glu-proto-auto.java index 8366474..7fe511c 100644 --- a/C2J/glu-proto-auto.java +++ b/C2J/glu-proto-auto.java @@ -1,5 +1,5 @@ /** - * C2J Parser Version 1.4 Beta + * C2J Parser Version 1.5 Beta * Jausoft - Sven Goethel Software Development * Reading from file: glu-proto-auto.orig.h . . . * Destination-Class: gl4java_GLUFuncJauJNI ! @@ -250,15 +250,6 @@ long[] data ) ; -/** - * Original Function-Prototype : - *
 
-   extern GLUquadricObj * gluNewQuadric ( void ) ;
- * 
- */ - public final native int gluNewQuadric ( - ) ; - /** * Original Function-Prototype : *
 
@@ -266,7 +257,7 @@
  * 
*/ public final native void gluQuadricDrawStyle ( - int quadObject, + long quadObject, int drawStyle ) ; @@ -277,7 +268,7 @@ *
*/ public final native void gluQuadricOrientation ( - int quadObject, + long quadObject, int orientation ) ; @@ -288,7 +279,7 @@ *
*/ public final native void gluQuadricNormals ( - int quadObject, + long quadObject, int normals ) ; @@ -299,7 +290,7 @@ *
*/ public final native void gluQuadricTexture ( - int quadObject, + long quadObject, boolean textureCoords ) ; @@ -310,7 +301,7 @@ *
*/ public final native void gluCylinder ( - int qobj, + long qobj, double baseRadius, double topRadius, double height, @@ -325,7 +316,7 @@ * */ public final native void gluSphere ( - int qobj, + long qobj, double radius, int slices, int stacks @@ -338,7 +329,7 @@ * */ public final native void gluDisk ( - int qobj, + long qobj, double innerRadius, double outerRadius, int slices, @@ -352,7 +343,7 @@ * */ public final native void gluPartialDisk ( - int qobj, + long qobj, double innerRadius, double outerRadius, int slices, @@ -361,15 +352,6 @@ double sweepAngle ) ; -/** - * Original Function-Prototype : - *
 
-   extern GLUnurbsObj * gluNewNurbsRenderer ( void ) ;
- * 
- */ - public final native int gluNewNurbsRenderer ( - ) ; - /** * Original Function-Prototype : *
 
@@ -377,7 +359,7 @@
  * 
*/ public final native void gluLoadSamplingMatrices ( - int nobj, + long nobj, float[] modelMatrix, float[] projMatrix, int[] viewport @@ -390,7 +372,7 @@ * */ public final native void gluNurbsProperty ( - int nobj, + long nobj, int property, float value ) ; @@ -402,7 +384,7 @@ * */ public final native void gluGetNurbsProperty ( - int nobj, + long nobj, int property, float[] value ) ; @@ -414,7 +396,7 @@ * */ public final native void gluBeginCurve ( - int nobj + long nobj ) ; /** @@ -424,7 +406,7 @@ * */ public final native void gluEndCurve ( - int nobj + long nobj ) ; /** @@ -434,7 +416,7 @@ * */ public final native void gluNurbsCurve ( - int nobj, + long nobj, int nknots, float[] knot, int stride, @@ -450,7 +432,7 @@ * */ public final native void gluBeginSurface ( - int nobj + long nobj ) ; /** @@ -460,7 +442,7 @@ * */ public final native void gluEndSurface ( - int nobj + long nobj ) ; /** @@ -470,7 +452,7 @@ * */ public final native void gluNurbsSurface ( - int nobj, + long nobj, int sknot_count, float[] sknot, int tknot_count, @@ -490,7 +472,7 @@ * */ public final native void gluBeginTrim ( - int nobj + long nobj ) ; /** @@ -500,7 +482,7 @@ * */ public final native void gluEndTrim ( - int nobj + long nobj ) ; /** @@ -510,22 +492,13 @@ * */ public final native void gluPwlCurve ( - int nobj, + long nobj, int count, float[] array, int stride, int type ) ; -/** - * Original Function-Prototype : - *
 
-   extern GLUtesselator * gluNewTess ( void ) ;
- * 
- */ - public final native int gluNewTess ( - ) ; - /** * Original Function-Prototype : *
 
@@ -533,31 +506,31 @@
  * 
*/ public final native void gluTessBeginPolygon ( - int tobj, + long tobj, byte[] polygon_data ) ; public final native void gluTessBeginPolygon ( - int tobj, + long tobj, short[] polygon_data ) ; public final native void gluTessBeginPolygon ( - int tobj, + long tobj, int[] polygon_data ) ; public final native void gluTessBeginPolygon ( - int tobj, + long tobj, float[] polygon_data ) ; public final native void gluTessBeginPolygon ( - int tobj, + long tobj, double[] polygon_data ) ; public final native void gluTessBeginPolygon ( - int tobj, + long tobj, boolean[] polygon_data ) ; public final native void gluTessBeginPolygon ( - int tobj, + long tobj, long[] polygon_data ) ; @@ -568,7 +541,7 @@ * */ public final native void gluTessBeginContour ( - int tobj + long tobj ) ; /** @@ -578,37 +551,37 @@ * */ public final native void gluTessVertex ( - int tobj, + long tobj, double[] coords, byte[] vertex_data ) ; public final native void gluTessVertex ( - int tobj, + long tobj, double[] coords, short[] vertex_data ) ; public final native void gluTessVertex ( - int tobj, + long tobj, double[] coords, int[] vertex_data ) ; public final native void gluTessVertex ( - int tobj, + long tobj, double[] coords, float[] vertex_data ) ; public final native void gluTessVertex ( - int tobj, + long tobj, double[] coords, double[] vertex_data ) ; public final native void gluTessVertex ( - int tobj, + long tobj, double[] coords, boolean[] vertex_data ) ; public final native void gluTessVertex ( - int tobj, + long tobj, double[] coords, long[] vertex_data ) ; @@ -620,7 +593,7 @@ * */ public final native void gluTessEndContour ( - int tobj + long tobj ) ; /** @@ -630,7 +603,7 @@ * */ public final native void gluTessEndPolygon ( - int tobj + long tobj ) ; /** @@ -640,7 +613,7 @@ * */ public final native void gluTessProperty ( - int tobj, + long tobj, int which, double value ) ; @@ -652,7 +625,7 @@ * */ public final native void gluTessNormal ( - int tobj, + long tobj, double x, double y, double z @@ -665,7 +638,7 @@ * */ public final native void gluGetTessProperty ( - int tobj, + long tobj, int which, double[] value ) ; @@ -677,7 +650,7 @@ * */ public final native void gluBeginPolygon ( - int tobj + long tobj ) ; /** @@ -687,7 +660,7 @@ * */ public final native void gluNextContour ( - int tobj, + long tobj, int type ) ; @@ -698,7 +671,7 @@ * */ public final native void gluEndPolygon ( - int tobj + long tobj ) ; -/* C2J Parser Version 1.4 Beta: Java program parsed successfully. */ +/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */ diff --git a/C2J/glu-proto-auto.orig.h b/C2J/glu-proto-auto.orig.h index 007921c..cf82c09 100644 --- a/C2J/glu-proto-auto.orig.h +++ b/C2J/glu-proto-auto.orig.h @@ -34,7 +34,6 @@ extern GLint gluBuild2DMipmaps( GLenum target, GLint components, GLint width, GLint height, GLenum format, GLenum type, const void *data ); -extern GLUquadricObj* gluNewQuadric( void ); extern void gluQuadricDrawStyle( GLUquadricObj *quadObject, GLenum drawStyle ); extern void gluQuadricOrientation( GLUquadricObj *quadObject, @@ -58,7 +57,6 @@ extern void gluPartialDisk( GLUquadricObj *qobj, GLdouble innerRadius, GLdouble outerRadius, GLint slices, GLint loops, GLdouble startAngle, GLdouble sweepAngle ); -extern GLUnurbsObj* gluNewNurbsRenderer( void ); extern void gluLoadSamplingMatrices( GLUnurbsObj *nobj, const GLfloat modelMatrix[16], const GLfloat projMatrix[16], @@ -87,7 +85,6 @@ extern void gluEndTrim( GLUnurbsObj *nobj ); extern void gluPwlCurve( GLUnurbsObj *nobj, GLint count, GLfloat *array, GLint stride, GLenum type ); -extern GLUtesselator* gluNewTess( void ); extern void gluTessBeginPolygon( GLUtesselator *tobj, void *polygon_data ); extern void gluTessBeginContour( GLUtesselator *tobj ); diff --git a/C2J/glu-protoVirt-auto.java b/C2J/glu-protoVirt-auto.java index 49e8364..a8f9c54 100644 --- a/C2J/glu-protoVirt-auto.java +++ b/C2J/glu-protoVirt-auto.java @@ -1,5 +1,5 @@ /** - * C2J Parser Version 1.4 Beta + * C2J Parser Version 1.5 Beta * Jausoft - Sven Goethel Software Development * Reading from file: glu-proto-auto.orig.h . . . * Destination-Class: gl4java_GLUFuncJauJNI ! @@ -250,15 +250,6 @@ long[] data ) ; -/** - * Original Function-Prototype : - *
 
-   extern GLUquadricObj * gluNewQuadric ( void ) ;
- * 
- */ - public int gluNewQuadric ( - ) ; - /** * Original Function-Prototype : *
 
@@ -266,7 +257,7 @@
  * 
*/ public void gluQuadricDrawStyle ( - int quadObject, + long quadObject, int drawStyle ) ; @@ -277,7 +268,7 @@ * */ public void gluQuadricOrientation ( - int quadObject, + long quadObject, int orientation ) ; @@ -288,7 +279,7 @@ * */ public void gluQuadricNormals ( - int quadObject, + long quadObject, int normals ) ; @@ -299,7 +290,7 @@ * */ public void gluQuadricTexture ( - int quadObject, + long quadObject, boolean textureCoords ) ; @@ -310,7 +301,7 @@ * */ public void gluCylinder ( - int qobj, + long qobj, double baseRadius, double topRadius, double height, @@ -325,7 +316,7 @@ * */ public void gluSphere ( - int qobj, + long qobj, double radius, int slices, int stacks @@ -338,7 +329,7 @@ * */ public void gluDisk ( - int qobj, + long qobj, double innerRadius, double outerRadius, int slices, @@ -352,7 +343,7 @@ * */ public void gluPartialDisk ( - int qobj, + long qobj, double innerRadius, double outerRadius, int slices, @@ -361,15 +352,6 @@ double sweepAngle ) ; -/** - * Original Function-Prototype : - *
 
-   extern GLUnurbsObj * gluNewNurbsRenderer ( void ) ;
- * 
- */ - public int gluNewNurbsRenderer ( - ) ; - /** * Original Function-Prototype : *
 
@@ -377,7 +359,7 @@
  * 
*/ public void gluLoadSamplingMatrices ( - int nobj, + long nobj, float[] modelMatrix, float[] projMatrix, int[] viewport @@ -390,7 +372,7 @@ * */ public void gluNurbsProperty ( - int nobj, + long nobj, int property, float value ) ; @@ -402,7 +384,7 @@ * */ public void gluGetNurbsProperty ( - int nobj, + long nobj, int property, float[] value ) ; @@ -414,7 +396,7 @@ * */ public void gluBeginCurve ( - int nobj + long nobj ) ; /** @@ -424,7 +406,7 @@ * */ public void gluEndCurve ( - int nobj + long nobj ) ; /** @@ -434,7 +416,7 @@ * */ public void gluNurbsCurve ( - int nobj, + long nobj, int nknots, float[] knot, int stride, @@ -450,7 +432,7 @@ * */ public void gluBeginSurface ( - int nobj + long nobj ) ; /** @@ -460,7 +442,7 @@ * */ public void gluEndSurface ( - int nobj + long nobj ) ; /** @@ -470,7 +452,7 @@ * */ public void gluNurbsSurface ( - int nobj, + long nobj, int sknot_count, float[] sknot, int tknot_count, @@ -490,7 +472,7 @@ * */ public void gluBeginTrim ( - int nobj + long nobj ) ; /** @@ -500,7 +482,7 @@ * */ public void gluEndTrim ( - int nobj + long nobj ) ; /** @@ -510,22 +492,13 @@ * */ public void gluPwlCurve ( - int nobj, + long nobj, int count, float[] array, int stride, int type ) ; -/** - * Original Function-Prototype : - *
 
-   extern GLUtesselator * gluNewTess ( void ) ;
- * 
- */ - public int gluNewTess ( - ) ; - /** * Original Function-Prototype : *
 
@@ -533,31 +506,31 @@
  * 
*/ public void gluTessBeginPolygon ( - int tobj, + long tobj, byte[] polygon_data ) ; public void gluTessBeginPolygon ( - int tobj, + long tobj, short[] polygon_data ) ; public void gluTessBeginPolygon ( - int tobj, + long tobj, int[] polygon_data ) ; public void gluTessBeginPolygon ( - int tobj, + long tobj, float[] polygon_data ) ; public void gluTessBeginPolygon ( - int tobj, + long tobj, double[] polygon_data ) ; public void gluTessBeginPolygon ( - int tobj, + long tobj, boolean[] polygon_data ) ; public void gluTessBeginPolygon ( - int tobj, + long tobj, long[] polygon_data ) ; @@ -568,7 +541,7 @@ * */ public void gluTessBeginContour ( - int tobj + long tobj ) ; /** @@ -578,37 +551,37 @@ * */ public void gluTessVertex ( - int tobj, + long tobj, double[] coords, byte[] vertex_data ) ; public void gluTessVertex ( - int tobj, + long tobj, double[] coords, short[] vertex_data ) ; public void gluTessVertex ( - int tobj, + long tobj, double[] coords, int[] vertex_data ) ; public void gluTessVertex ( - int tobj, + long tobj, double[] coords, float[] vertex_data ) ; public void gluTessVertex ( - int tobj, + long tobj, double[] coords, double[] vertex_data ) ; public void gluTessVertex ( - int tobj, + long tobj, double[] coords, boolean[] vertex_data ) ; public void gluTessVertex ( - int tobj, + long tobj, double[] coords, long[] vertex_data ) ; @@ -620,7 +593,7 @@ * */ public void gluTessEndContour ( - int tobj + long tobj ) ; /** @@ -630,7 +603,7 @@ * */ public void gluTessEndPolygon ( - int tobj + long tobj ) ; /** @@ -640,7 +613,7 @@ * */ public void gluTessProperty ( - int tobj, + long tobj, int which, double value ) ; @@ -652,7 +625,7 @@ * */ public void gluTessNormal ( - int tobj, + long tobj, double x, double y, double z @@ -665,7 +638,7 @@ * */ public void gluGetTessProperty ( - int tobj, + long tobj, int which, double[] value ) ; @@ -677,7 +650,7 @@ * */ public void gluBeginPolygon ( - int tobj + long tobj ) ; /** @@ -687,7 +660,7 @@ * */ public void gluNextContour ( - int tobj, + long tobj, int type ) ; @@ -698,7 +671,7 @@ * */ public void gluEndPolygon ( - int tobj + long tobj ) ; -/* C2J Parser Version 1.4 Beta: Java program parsed successfully. */ +/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */ diff --git a/C2J/manual/glu-manualCodedImplJNI.c b/C2J/manual/glu-manualCodedImplJNI.c index fcb4d00..5f3c925 100644 --- a/C2J/manual/glu-manualCodedImplJNI.c +++ b/C2J/manual/glu-manualCodedImplJNI.c @@ -42,7 +42,7 @@ Java_gl4java_GLUFuncJauJNI_getNativeVersion ( JNIEnv *env, jobject obj ) } static void _AddCallbackNode(JNIEnv *env, - jint qnt_obj, jint which, + jlong qnt_obj, jint which, jobject methodClassInstance, jstring methodName, jstring signature, @@ -61,7 +61,7 @@ static void _AddCallbackNode(JNIEnv *env, AddCallbackNode(env, methodClassInstance, strMethodName, strSignature, arrayLen1, arrayLen2, arrayLen3, arrayLen4, arrayLen5, - (void *)qnt_obj, which, glx); + (void *)((PointerHolder)qnt_obj), which, glx); free(strMethodName); free(strSignature); } @@ -69,7 +69,7 @@ static void _AddCallbackNode(JNIEnv *env, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluQuadricCallback( JNIEnv *env, jobject obj, - jint qobj, jint which, + jlong qobj, jint which, jobject methodClassInstance, jstring methodName, jstring signature) @@ -77,8 +77,8 @@ Java_gl4java_GLUFuncJauJNI_gluQuadricCallback( JNIEnv *env, jobject obj, switch(which) { case GLU_ERROR: - gluQuadricCallback((void *)qobj, which, - cbf_GLU_ERROR ); + gluQuadricCallback((void *)((PointerHolder)qobj), + which, cbf_GLU_ERROR ); break; default: jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !"); @@ -93,7 +93,7 @@ Java_gl4java_GLUFuncJauJNI_gluQuadricCallback( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluNurbsCallback( JNIEnv *env, jobject obj, - jint nobj, jint which, + jlong nobj, jint which, jobject methodClassInstance, jstring methodName, jstring signature) @@ -101,7 +101,7 @@ Java_gl4java_GLUFuncJauJNI_gluNurbsCallback( JNIEnv *env, jobject obj, switch(which) { case GLU_ERROR: - gluNurbsCallback((void *)nobj, which, + gluNurbsCallback((void *)((PointerHolder)nobj), which, cbf_GLU_ERROR ); break; default: @@ -116,7 +116,7 @@ Java_gl4java_GLUFuncJauJNI_gluNurbsCallback( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj, - jint tobj, jint which, + jlong tobj, jint which, jobject methodClassInstance, jstring methodName, jstring signature, @@ -129,51 +129,63 @@ Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj, switch(which) { case GLU_TESS_BEGIN: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_BEGIN ); break; case GLU_TESS_BEGIN_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_BEGIN_DATA ); break; case GLU_TESS_EDGE_FLAG: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_EDGE_FLAG ); break; case GLU_TESS_EDGE_FLAG_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_EDGE_FLAG_DATA ); break; case GLU_TESS_VERTEX: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_VERTEX ); break; case GLU_TESS_VERTEX_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_VERTEX_DATA ); break; case GLU_TESS_END: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_END ); break; case GLU_TESS_END_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_END_DATA ); break; case GLU_TESS_ERROR: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_ERROR ); break; case GLU_TESS_ERROR_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_ERROR_DATA ); break; case GLU_TESS_COMBINE: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_COMBINE ); break; case GLU_TESS_COMBINE_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_COMBINE_DATA ); break; default: @@ -189,25 +201,43 @@ Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluDeleteQuadric( JNIEnv *env, jobject obj, - jint qobj ) + jlong qobj ) { - gluDeleteQuadric((void *)qobj); - RemoveCallbackNodes((void *)qobj); + gluDeleteQuadric((void *)((PointerHolder)qobj)); + RemoveCallbackNodes((void *)((PointerHolder)qobj)); } JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluDeleteNurbsRenderer( JNIEnv *env, jobject obj, - jint nobj ) + jlong nobj ) { - gluDeleteNurbsRenderer((void *)nobj); - RemoveCallbackNodes((void *)nobj); + gluDeleteNurbsRenderer((void *)((PointerHolder)nobj)); + RemoveCallbackNodes((void *)((PointerHolder)nobj)); } JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, - jint tobj ) + jlong tobj ) { - gluDeleteTess((GLUtesselator *)tobj); - RemoveCallbackNodes((void *)tobj); + gluDeleteTess((GLUtesselator *)((PointerHolder)tobj)); + RemoveCallbackNodes((void *)((PointerHolder)tobj)); +} + +JNIEXPORT jlong JNICALL +Java_gl4java_GLUFuncJauJNI_gluNewQuadric( JNIEnv *env, jobject obj) +{ + return (jlong)((PointerHolder)gluNewQuadric()); +} + +JNIEXPORT jlong JNICALL +Java_gl4java_GLUFuncJauJNI_gluNewNurbsRenderer( JNIEnv *env, jobject obj) +{ + return (jlong)((PointerHolder)gluNewNurbsRenderer()); +} + +JNIEXPORT jlong JNICALL +Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj) +{ + return (jlong)((PointerHolder)gluNewTess()); } diff --git a/C2J/manual/glu-manualCodedImplJNI2.java b/C2J/manual/glu-manualCodedImplJNI2.java index 7559354..0beb75f 100644 --- a/C2J/manual/glu-manualCodedImplJNI2.java +++ b/C2J/manual/glu-manualCodedImplJNI2.java @@ -27,7 +27,7 @@ public final String getClassVersion ( ) * @see GLUFunc#gluNewQuadric */ public final native void gluQuadricCallback( - int qobj, int which, + long qobj, int which, Object methodClassInstance, String methodName, String signature @@ -48,7 +48,7 @@ public final native void gluQuadricCallback( * @see GLUFunc#gluNewNurbsRenderer */ public final native void gluNurbsCallback( - int nobj, int which, + long nobj, int which, Object methodClassInstance, String methodName, String signature @@ -80,7 +80,7 @@ public final native void gluNurbsCallback( * @see GLUFunc#gluNewTess */ public final native void gluTessCallback( - int tobj, int which, + long tobj, int which, Object methodClassInstance, String methodName, String signature, @@ -97,7 +97,7 @@ public final native void gluTessCallback( * @param qobj the quadratic id, for which all callback-methods * should be de-registered */ -public final native void gluDeleteQuadric( int qobj ); +public final native void gluDeleteQuadric( long qobj ); /** * The Callback de-registry function. @@ -105,7 +105,7 @@ public final native void gluDeleteQuadric( int qobj ); * @param nobj the nurbs id, for which all callback-methods * should be de-registered */ -public final native void gluDeleteNurbsRenderer( int nobj ); +public final native void gluDeleteNurbsRenderer( long nobj ); /** * The Callback de-registry function. @@ -113,5 +113,9 @@ public final native void gluDeleteNurbsRenderer( int nobj ); * @param tobj the tesselation id, for which all callback-methods * should be de-registered */ -public final native void gluDeleteTess( int tobj ); +public final native void gluDeleteTess( long tobj ); + +public final native long gluNewQuadric( ); +public final native long gluNewNurbsRenderer( ); +public final native long gluNewTess( ); diff --git a/C2J/manual/glu-manualCodedVirt.java b/C2J/manual/glu-manualCodedVirt.java index 2f77551..e8c3fe2 100644 --- a/C2J/manual/glu-manualCodedVirt.java +++ b/C2J/manual/glu-manualCodedVirt.java @@ -25,15 +25,19 @@ public String getNativeVersion ( ) ; public String getClassVendor ( ) ; public String getClassVersion ( ) ; +public long gluNewQuadric( ); +public long gluNewNurbsRenderer( ); +public long gluNewTess( ); + public void gluQuadricCallback( - int qobj, int which, + long qobj, int which, Object methodClassInstance, String methodName, String signature ); public void gluNurbsCallback( - int nobj, int which, + long nobj, int which, Object methodClassInstance, String methodName, String signature @@ -41,7 +45,7 @@ public void gluNurbsCallback( public void gluTessCallback( - int tobj, int which, + long tobj, int which, Object methodClassInstance, String methodName, String signature, @@ -52,9 +56,9 @@ public void gluTessCallback( int voidArrayLen5 ); -public void gluDeleteQuadric( int qobj ); +public void gluDeleteQuadric( long qobj ); -public void gluDeleteNurbsRenderer( int nobj ); +public void gluDeleteNurbsRenderer( long nobj ); -public void gluDeleteTess( int tobj ); +public void gluDeleteTess( long tobj ); diff --git a/CHANGES.txt b/CHANGES.txt index eebd85b..16c82f8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,6 @@ \begin{verbatim} -Last Changes: 18th November 2000 (Version 2.5.0 - Release 0 beta 1 ) +Last Changes: 12th February 2001 (Version 2.5.2 - Release 0 ) Started: July 1997 (Version 0) ----------------- @@ -8,6 +8,52 @@ TOP = NEW DOWN = OLD ----------------- +12th February 2001 (Version 2.5.2 - Release 0 ) + o Implements JDK >= 1.3.X 's JAWT + The mechanism of fetching the native window handle (etc.), + is - since JDK 1.3.0 - now an official standard ! + JAWT'S native lock's are also used. + + This feature is used within the "GL4JavaJauGljJNI13" + native library, which is used dynamically if JVM >= 1.3 ! + Many thanxs to Kenneth B. Russel for + motivations: + JDK 1.4 will no more support the old + illegal style of fetching the native window handle ! + + The MacOs's implementation of JAWT is currently + missing ... + + o Improved the mutlithreading behavior ! + Now - you MUST encapsulate all your rendering + within gljMakeCurrent/gljFree ! + E.g. the implementation of GLCanvas's display method ! + + This style was recommended all the time ! + + o Prepared for 64bit platforms ! + If you set the #define USE_64BIT_POINTER + within the symbols.mak, the "long" type is used for + Pointer conversion (cast) ! + + Depending on the #define USE_64BIT_POINTER, + the typedef PointerHolder is set. + PointerHolder is used for type casting, which + eliminates not just compiler warning, but also + bad generated assembler type conversion code ! + + All pointer holder's within the java classes are jlong ! + + From now on, you MUST use the java "long" type to + hold any pointers - also for the GLU stuff, e.g. + + WARNING - INCOMPATIBILITY + ========================= + If you use any gluNew* function, + you MUST change the l-value type to "long" + and recompile your java sources ! + + 8th February 2001 (Version 2.5.1 - Release 0 ) o Bugfixed the JNI Tool Module Functions, which had a bug within the Callback Helper Functions diff --git a/CNativeCode/OpenGLU_JauJNI12_funcs.c b/CNativeCode/OpenGLU_JauJNI12_funcs.c index 32fb88d..5ad9e76 100644 --- a/CNativeCode/OpenGLU_JauJNI12_funcs.c +++ b/CNativeCode/OpenGLU_JauJNI12_funcs.c @@ -16,40 +16,14 @@ * September 1997 */ -/* - * need to include the JAVA internal header files for macros and function - * prototypes required to maipulated JAVA data structures and functions - * - * StubPreamble.h includes the structure and macro definitions neede to - * convert JAVA data structures into C data structures. - * - */ - -#ifdef _WIN32_ - #include "winstuff.h" -#endif - -#include -#include - -#include - -/* - * the next thing to include are special headers that were created by - * JAVAH. They include the C structure definitions for the JAVA classes - */ -#include "gl4java_GLUFuncJauJNI.h" /*-------------------------------------------------------------------------- * here on in is just regular apple pie C */ -/* - * next put any specific header files that are necessary to implement - * this native code - */ -#include -#include +#include "OpenGL_misc.h" + +#include "gl4java_GLUFuncJauJNI.h" #include "GLCallbackHelperJNI.h" #include "GLUCallbackJNI.h" @@ -103,7 +77,7 @@ Java_gl4java_GLUFuncJauJNI_getNativeVersion ( JNIEnv *env, jobject obj ) } static void _AddCallbackNode(JNIEnv *env, - jint qnt_obj, jint which, + jlong qnt_obj, jint which, jobject methodClassInstance, jstring methodName, jstring signature, @@ -122,7 +96,7 @@ static void _AddCallbackNode(JNIEnv *env, AddCallbackNode(env, methodClassInstance, strMethodName, strSignature, arrayLen1, arrayLen2, arrayLen3, arrayLen4, arrayLen5, - (void *)qnt_obj, which, glx); + (void *)((PointerHolder)qnt_obj), which, glx); free(strMethodName); free(strSignature); } @@ -130,7 +104,7 @@ static void _AddCallbackNode(JNIEnv *env, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluQuadricCallback( JNIEnv *env, jobject obj, - jint qobj, jint which, + jlong qobj, jint which, jobject methodClassInstance, jstring methodName, jstring signature) @@ -138,8 +112,8 @@ Java_gl4java_GLUFuncJauJNI_gluQuadricCallback( JNIEnv *env, jobject obj, switch(which) { case GLU_ERROR: - gluQuadricCallback((void *)qobj, which, - cbf_GLU_ERROR ); + gluQuadricCallback((void *)((PointerHolder)qobj), + which, cbf_GLU_ERROR ); break; default: jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !"); @@ -154,7 +128,7 @@ Java_gl4java_GLUFuncJauJNI_gluQuadricCallback( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluNurbsCallback( JNIEnv *env, jobject obj, - jint nobj, jint which, + jlong nobj, jint which, jobject methodClassInstance, jstring methodName, jstring signature) @@ -162,7 +136,7 @@ Java_gl4java_GLUFuncJauJNI_gluNurbsCallback( JNIEnv *env, jobject obj, switch(which) { case GLU_ERROR: - gluNurbsCallback((void *)nobj, which, + gluNurbsCallback((void *)((PointerHolder)nobj), which, cbf_GLU_ERROR ); break; default: @@ -177,7 +151,7 @@ Java_gl4java_GLUFuncJauJNI_gluNurbsCallback( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj, - jint tobj, jint which, + jlong tobj, jint which, jobject methodClassInstance, jstring methodName, jstring signature, @@ -190,51 +164,63 @@ Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj, switch(which) { case GLU_TESS_BEGIN: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_BEGIN ); break; case GLU_TESS_BEGIN_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_BEGIN_DATA ); break; case GLU_TESS_EDGE_FLAG: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_EDGE_FLAG ); break; case GLU_TESS_EDGE_FLAG_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_EDGE_FLAG_DATA ); break; case GLU_TESS_VERTEX: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_VERTEX ); break; case GLU_TESS_VERTEX_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_VERTEX_DATA ); break; case GLU_TESS_END: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_END ); break; case GLU_TESS_END_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_END_DATA ); break; case GLU_TESS_ERROR: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_ERROR ); break; case GLU_TESS_ERROR_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_ERROR_DATA ); break; case GLU_TESS_COMBINE: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_COMBINE ); break; case GLU_TESS_COMBINE_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_COMBINE_DATA ); break; default: @@ -250,30 +236,48 @@ Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluDeleteQuadric( JNIEnv *env, jobject obj, - jint qobj ) + jlong qobj ) { - gluDeleteQuadric((void *)qobj); - RemoveCallbackNodes((void *)qobj); + gluDeleteQuadric((void *)((PointerHolder)qobj)); + RemoveCallbackNodes((void *)((PointerHolder)qobj)); } JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluDeleteNurbsRenderer( JNIEnv *env, jobject obj, - jint nobj ) + jlong nobj ) { - gluDeleteNurbsRenderer((void *)nobj); - RemoveCallbackNodes((void *)nobj); + gluDeleteNurbsRenderer((void *)((PointerHolder)nobj)); + RemoveCallbackNodes((void *)((PointerHolder)nobj)); } JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, - jint tobj ) + jlong tobj ) +{ + gluDeleteTess((GLUtesselator *)((PointerHolder)tobj)); + RemoveCallbackNodes((void *)((PointerHolder)tobj)); +} + +JNIEXPORT jlong JNICALL +Java_gl4java_GLUFuncJauJNI_gluNewQuadric( JNIEnv *env, jobject obj) +{ + return (jlong)((PointerHolder)gluNewQuadric()); +} + +JNIEXPORT jlong JNICALL +Java_gl4java_GLUFuncJauJNI_gluNewNurbsRenderer( JNIEnv *env, jobject obj) +{ + return (jlong)((PointerHolder)gluNewNurbsRenderer()); +} + +JNIEXPORT jlong JNICALL +Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj) { - gluDeleteTess((GLUtesselator *)tobj); - RemoveCallbackNodes((void *)tobj); + return (jlong)((PointerHolder)gluNewTess()); } /** - * C2J Parser Version 1.4 Beta + * C2J Parser Version 1.5 Beta * Jausoft - Sven Goethel Software Development * Reading from file: glu-proto-auto.orig.h . . . * Destination-Class: gl4java_GLUFuncJauJNI ! @@ -1131,25 +1135,6 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, return ret; } -/** - * Original Function-Prototype : - *
 
-   extern GLUquadricObj * gluNewQuadric ( void ) ;
- * 
- */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNI_gluNewQuadric ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewQuadric ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -1159,12 +1144,12 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricDrawStyle (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint drawStyle)
 	{
 
 		gluQuadricDrawStyle (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) drawStyle
 		);
 
@@ -1179,12 +1164,12 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricOrientation (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint orientation)
 	{
 
 		gluQuadricOrientation (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) orientation
 		);
 
@@ -1199,12 +1184,12 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricNormals (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint normals)
 	{
 
 		gluQuadricNormals (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) normals
 		);
 
@@ -1219,12 +1204,12 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricTexture (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jboolean textureCoords)
 	{
 
 		gluQuadricTexture (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLboolean) textureCoords
 		);
 
@@ -1239,7 +1224,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluCylinder (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble baseRadius,
 		jdouble topRadius,
 		jdouble height,
@@ -1248,7 +1233,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	{
 
 		gluCylinder (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) baseRadius,
 			(GLdouble) topRadius,
 			(GLdouble) height,
@@ -1267,14 +1252,14 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluSphere (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble radius,
 		jint slices,
 		jint stacks)
 	{
 
 		gluSphere (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) radius,
 			(GLint) slices,
 			(GLint) stacks
@@ -1291,7 +1276,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluDisk (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble innerRadius,
 		jdouble outerRadius,
 		jint slices,
@@ -1299,7 +1284,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	{
 
 		gluDisk (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) innerRadius,
 			(GLdouble) outerRadius,
 			(GLint) slices,
@@ -1317,7 +1302,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluPartialDisk (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble innerRadius,
 		jdouble outerRadius,
 		jint slices,
@@ -1327,7 +1312,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	{
 
 		gluPartialDisk (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) innerRadius,
 			(GLdouble) outerRadius,
 			(GLint) slices,
@@ -1338,25 +1323,6 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 
 	}
 
-/**
- * Original Function-Prototype :
- * 
 
-   extern GLUnurbsObj * gluNewNurbsRenderer ( void ) ;
- * 
- */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNI_gluNewNurbsRenderer ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewNurbsRenderer ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -1366,7 +1332,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluLoadSamplingMatrices (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jfloatArray modelMatrix,
 		jfloatArray projMatrix,
 		jintArray viewport)
@@ -1388,7 +1354,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 			ptr3 = (jint *) (*env)->GetPrimitiveArrayCritical(env, viewport, 0);
 		}
 		gluLoadSamplingMatrices (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(const GLfloat *) ptr1,
 			(const GLfloat *) ptr2,
 			(const GLint *) ptr3
@@ -1417,13 +1383,13 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluNurbsProperty (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint property,
 		jfloat value)
 	{
 
 		gluNurbsProperty (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLenum) property,
 			(GLfloat) value
 		);
@@ -1439,7 +1405,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluGetNurbsProperty (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint property,
 		jfloatArray value)
 	{
@@ -1451,7 +1417,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 			ptr2 = (jfloat *) (*env)->GetPrimitiveArrayCritical(env, value, &isCopiedArray2);
 		}
 		gluGetNurbsProperty (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLenum) property,
 			(GLfloat *) ptr2
 		);
@@ -1471,11 +1437,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluBeginCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginCurve (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1489,11 +1455,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluEndCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndCurve (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1507,7 +1473,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluNurbsCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint nknots,
 		jfloatArray knot,
 		jint stride,
@@ -1529,7 +1495,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 			ptr4 = (jfloat *) (*env)->GetPrimitiveArrayCritical(env, ctlarray, &isCopiedArray4);
 		}
 		gluNurbsCurve (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) nknots,
 			(GLfloat *) ptr2,
 			(GLint) stride,
@@ -1557,11 +1523,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluBeginSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginSurface (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1575,11 +1541,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluEndSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndSurface (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1593,7 +1559,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluNurbsSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint sknot_count,
 		jfloatArray sknot,
 		jint tknot_count,
@@ -1625,7 +1591,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 			ptr7 = (jfloat *) (*env)->GetPrimitiveArrayCritical(env, ctlarray, &isCopiedArray7);
 		}
 		gluNurbsSurface (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) sknot_count,
 			(GLfloat *) ptr2,
 			(GLint) tknot_count,
@@ -1661,11 +1627,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluBeginTrim (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginTrim (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1679,11 +1645,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluEndTrim (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndTrim (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1697,7 +1663,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluPwlCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint count,
 		jfloatArray array,
 		jint stride,
@@ -1711,7 +1677,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 			ptr2 = (jfloat *) (*env)->GetPrimitiveArrayCritical(env, array, &isCopiedArray2);
 		}
 		gluPwlCurve (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) count,
 			(GLfloat *) ptr2,
 			(GLint) stride,
@@ -1724,25 +1690,6 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 		}
 	}
 
-/**
- * Original Function-Prototype :
- * 
 
-   extern GLUtesselator * gluNewTess ( void ) ;
- * 
- */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNI_gluNewTess ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewTess ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -1750,9 +1697,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
  * 
*/ JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3B ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3B ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jbyteArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1763,7 +1710,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr1 = (jbyte *) (*env)->GetPrimitiveArrayCritical(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1773,9 +1720,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3S ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3S ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jshortArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1786,7 +1733,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr1 = (jshort *) (*env)->GetPrimitiveArrayCritical(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1796,9 +1743,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3I ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3I ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jintArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1809,7 +1756,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr1 = (jint *) (*env)->GetPrimitiveArrayCritical(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1819,9 +1766,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3F ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3F ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jfloatArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1832,7 +1779,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr1 = (jfloat *) (*env)->GetPrimitiveArrayCritical(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1842,9 +1789,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3D ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3D ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1855,7 +1802,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr1 = (jdouble *) (*env)->GetPrimitiveArrayCritical(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1865,9 +1812,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3Z ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3Z ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jbooleanArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1878,7 +1825,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr1 = (jboolean *) (*env)->GetPrimitiveArrayCritical(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1888,9 +1835,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3J ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3J ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jlongArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1901,7 +1848,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr1 = (jlong *) (*env)->GetPrimitiveArrayCritical(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1920,11 +1867,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessBeginContour ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessBeginContour ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -1936,9 +1883,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, *
*/ JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3B ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3B ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jbyteArray vertex_data) { @@ -1956,7 +1903,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr2 = (jbyte *) (*env)->GetPrimitiveArrayCritical(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -1971,9 +1918,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3S ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3S ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jshortArray vertex_data) { @@ -1991,7 +1938,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr2 = (jshort *) (*env)->GetPrimitiveArrayCritical(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2006,9 +1953,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3I ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3I ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jintArray vertex_data) { @@ -2026,7 +1973,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr2 = (jint *) (*env)->GetPrimitiveArrayCritical(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2041,9 +1988,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3F ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3F ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jfloatArray vertex_data) { @@ -2061,7 +2008,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr2 = (jfloat *) (*env)->GetPrimitiveArrayCritical(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2076,9 +2023,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3D ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3D ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jdoubleArray vertex_data) { @@ -2096,7 +2043,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr2 = (jdouble *) (*env)->GetPrimitiveArrayCritical(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2111,9 +2058,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3Z ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3Z ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jbooleanArray vertex_data) { @@ -2131,7 +2078,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr2 = (jboolean *) (*env)->GetPrimitiveArrayCritical(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2146,9 +2093,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3J ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3J ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jlongArray vertex_data) { @@ -2166,7 +2113,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr2 = (jlong *) (*env)->GetPrimitiveArrayCritical(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2190,11 +2137,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessEndContour ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessEndContour ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -2208,11 +2155,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessEndPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessEndPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -2226,13 +2173,13 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessProperty ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint which, jdouble value) { gluTessProperty ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) which, (GLdouble) value ); @@ -2248,14 +2195,14 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessNormal ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdouble x, jdouble y, jdouble z) { gluTessNormal ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble) x, (GLdouble) y, (GLdouble) z @@ -2272,7 +2219,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluGetTessProperty ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint which, jdoubleArray value) { @@ -2284,7 +2231,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr2 = (jdouble *) (*env)->GetPrimitiveArrayCritical(env, value, &isCopiedArray2); } gluGetTessProperty ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) which, (GLdouble *) ptr2 ); @@ -2304,11 +2251,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluBeginPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluBeginPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -2322,12 +2269,12 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluNextContour ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint type) { gluNextContour ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) type ); @@ -2342,13 +2289,13 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluEndPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluEndPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } -/* C2J Parser Version 1.4 Beta: Java program parsed successfully. */ +/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */ diff --git a/CNativeCode/OpenGLU_JauJNI12tst_funcs.c b/CNativeCode/OpenGLU_JauJNI12tst_funcs.c index 9b78767..1fc3b2c 100644 --- a/CNativeCode/OpenGLU_JauJNI12tst_funcs.c +++ b/CNativeCode/OpenGLU_JauJNI12tst_funcs.c @@ -16,40 +16,14 @@ * September 1997 */ -/* - * need to include the JAVA internal header files for macros and function - * prototypes required to maipulated JAVA data structures and functions - * - * StubPreamble.h includes the structure and macro definitions neede to - * convert JAVA data structures into C data structures. - * - */ - -#ifdef _WIN32_ - #include "winstuff.h" -#endif - -#include -#include - -#include - -/* - * the next thing to include are special headers that were created by - * JAVAH. They include the C structure definitions for the JAVA classes - */ -#include "gl4java_GLUFuncJauJNI.h" /*-------------------------------------------------------------------------- * here on in is just regular apple pie C */ -/* - * next put any specific header files that are necessary to implement - * this native code - */ -#include -#include +#include "OpenGL_misc.h" + +#include "gl4java_GLUFuncJauJNI.h" #include "GLCallbackHelperJNI.h" #include "GLUCallbackJNI.h" @@ -103,7 +77,7 @@ Java_gl4java_GLUFuncJauJNI_getNativeVersion ( JNIEnv *env, jobject obj ) } static void _AddCallbackNode(JNIEnv *env, - jint qnt_obj, jint which, + jlong qnt_obj, jint which, jobject methodClassInstance, jstring methodName, jstring signature, @@ -122,7 +96,7 @@ static void _AddCallbackNode(JNIEnv *env, AddCallbackNode(env, methodClassInstance, strMethodName, strSignature, arrayLen1, arrayLen2, arrayLen3, arrayLen4, arrayLen5, - (void *)qnt_obj, which, glx); + (void *)((PointerHolder)qnt_obj), which, glx); free(strMethodName); free(strSignature); } @@ -130,7 +104,7 @@ static void _AddCallbackNode(JNIEnv *env, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluQuadricCallback( JNIEnv *env, jobject obj, - jint qobj, jint which, + jlong qobj, jint which, jobject methodClassInstance, jstring methodName, jstring signature) @@ -138,8 +112,8 @@ Java_gl4java_GLUFuncJauJNI_gluQuadricCallback( JNIEnv *env, jobject obj, switch(which) { case GLU_ERROR: - gluQuadricCallback((void *)qobj, which, - cbf_GLU_ERROR ); + gluQuadricCallback((void *)((PointerHolder)qobj), + which, cbf_GLU_ERROR ); break; default: jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !"); @@ -154,7 +128,7 @@ Java_gl4java_GLUFuncJauJNI_gluQuadricCallback( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluNurbsCallback( JNIEnv *env, jobject obj, - jint nobj, jint which, + jlong nobj, jint which, jobject methodClassInstance, jstring methodName, jstring signature) @@ -162,7 +136,7 @@ Java_gl4java_GLUFuncJauJNI_gluNurbsCallback( JNIEnv *env, jobject obj, switch(which) { case GLU_ERROR: - gluNurbsCallback((void *)nobj, which, + gluNurbsCallback((void *)((PointerHolder)nobj), which, cbf_GLU_ERROR ); break; default: @@ -177,7 +151,7 @@ Java_gl4java_GLUFuncJauJNI_gluNurbsCallback( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj, - jint tobj, jint which, + jlong tobj, jint which, jobject methodClassInstance, jstring methodName, jstring signature, @@ -190,51 +164,63 @@ Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj, switch(which) { case GLU_TESS_BEGIN: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_BEGIN ); break; case GLU_TESS_BEGIN_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_BEGIN_DATA ); break; case GLU_TESS_EDGE_FLAG: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_EDGE_FLAG ); break; case GLU_TESS_EDGE_FLAG_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_EDGE_FLAG_DATA ); break; case GLU_TESS_VERTEX: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_VERTEX ); break; case GLU_TESS_VERTEX_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_VERTEX_DATA ); break; case GLU_TESS_END: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_END ); break; case GLU_TESS_END_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_END_DATA ); break; case GLU_TESS_ERROR: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_ERROR ); break; case GLU_TESS_ERROR_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_ERROR_DATA ); break; case GLU_TESS_COMBINE: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_COMBINE ); break; case GLU_TESS_COMBINE_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_COMBINE_DATA ); break; default: @@ -250,30 +236,48 @@ Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluDeleteQuadric( JNIEnv *env, jobject obj, - jint qobj ) + jlong qobj ) { - gluDeleteQuadric((void *)qobj); - RemoveCallbackNodes((void *)qobj); + gluDeleteQuadric((void *)((PointerHolder)qobj)); + RemoveCallbackNodes((void *)((PointerHolder)qobj)); } JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluDeleteNurbsRenderer( JNIEnv *env, jobject obj, - jint nobj ) + jlong nobj ) { - gluDeleteNurbsRenderer((void *)nobj); - RemoveCallbackNodes((void *)nobj); + gluDeleteNurbsRenderer((void *)((PointerHolder)nobj)); + RemoveCallbackNodes((void *)((PointerHolder)nobj)); } JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, - jint tobj ) + jlong tobj ) +{ + gluDeleteTess((GLUtesselator *)((PointerHolder)tobj)); + RemoveCallbackNodes((void *)((PointerHolder)tobj)); +} + +JNIEXPORT jlong JNICALL +Java_gl4java_GLUFuncJauJNI_gluNewQuadric( JNIEnv *env, jobject obj) +{ + return (jlong)((PointerHolder)gluNewQuadric()); +} + +JNIEXPORT jlong JNICALL +Java_gl4java_GLUFuncJauJNI_gluNewNurbsRenderer( JNIEnv *env, jobject obj) +{ + return (jlong)((PointerHolder)gluNewNurbsRenderer()); +} + +JNIEXPORT jlong JNICALL +Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj) { - gluDeleteTess((GLUtesselator *)tobj); - RemoveCallbackNodes((void *)tobj); + return (jlong)((PointerHolder)gluNewTess()); } /** - * C2J Parser Version 1.4 Beta + * C2J Parser Version 1.5 Beta * Jausoft - Sven Goethel Software Development * Reading from file: glu-proto-auto.orig.h . . . * Destination-Class: gl4java_GLUFuncJauJNI ! @@ -1297,25 +1301,6 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, return ret; } -/** - * Original Function-Prototype : - *
 
-   extern GLUquadricObj * gluNewQuadric ( void ) ;
- * 
- */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNI_gluNewQuadric ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewQuadric ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -1325,12 +1310,12 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricDrawStyle (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint drawStyle)
 	{
 
 		gluQuadricDrawStyle (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) drawStyle
 		);
 
@@ -1345,12 +1330,12 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricOrientation (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint orientation)
 	{
 
 		gluQuadricOrientation (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) orientation
 		);
 
@@ -1365,12 +1350,12 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricNormals (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint normals)
 	{
 
 		gluQuadricNormals (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) normals
 		);
 
@@ -1385,12 +1370,12 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricTexture (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jboolean textureCoords)
 	{
 
 		gluQuadricTexture (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLboolean) textureCoords
 		);
 
@@ -1405,7 +1390,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluCylinder (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble baseRadius,
 		jdouble topRadius,
 		jdouble height,
@@ -1414,7 +1399,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	{
 
 		gluCylinder (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) baseRadius,
 			(GLdouble) topRadius,
 			(GLdouble) height,
@@ -1433,14 +1418,14 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluSphere (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble radius,
 		jint slices,
 		jint stacks)
 	{
 
 		gluSphere (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) radius,
 			(GLint) slices,
 			(GLint) stacks
@@ -1457,7 +1442,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluDisk (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble innerRadius,
 		jdouble outerRadius,
 		jint slices,
@@ -1465,7 +1450,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	{
 
 		gluDisk (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) innerRadius,
 			(GLdouble) outerRadius,
 			(GLint) slices,
@@ -1483,7 +1468,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluPartialDisk (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble innerRadius,
 		jdouble outerRadius,
 		jint slices,
@@ -1493,7 +1478,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	{
 
 		gluPartialDisk (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) innerRadius,
 			(GLdouble) outerRadius,
 			(GLint) slices,
@@ -1504,25 +1489,6 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 
 	}
 
-/**
- * Original Function-Prototype :
- * 
 
-   extern GLUnurbsObj * gluNewNurbsRenderer ( void ) ;
- * 
- */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNI_gluNewNurbsRenderer ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewNurbsRenderer ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -1532,7 +1498,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluLoadSamplingMatrices (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jfloatArray modelMatrix,
 		jfloatArray projMatrix,
 		jintArray viewport)
@@ -1572,7 +1538,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 			}
 		}
 		gluLoadSamplingMatrices (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(const GLfloat *) ptr1,
 			(const GLfloat *) ptr2,
 			(const GLint *) ptr3
@@ -1601,13 +1567,13 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluNurbsProperty (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint property,
 		jfloat value)
 	{
 
 		gluNurbsProperty (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLenum) property,
 			(GLfloat) value
 		);
@@ -1623,7 +1589,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluGetNurbsProperty (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint property,
 		jfloatArray value)
 	{
@@ -1640,7 +1606,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 			}
 		}
 		gluGetNurbsProperty (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLenum) property,
 			(GLfloat *) ptr2
 		);
@@ -1660,11 +1626,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluBeginCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginCurve (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1678,11 +1644,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluEndCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndCurve (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1696,7 +1662,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluNurbsCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint nknots,
 		jfloatArray knot,
 		jint stride,
@@ -1728,7 +1694,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 			}
 		}
 		gluNurbsCurve (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) nknots,
 			(GLfloat *) ptr2,
 			(GLint) stride,
@@ -1756,11 +1722,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluBeginSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginSurface (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1774,11 +1740,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluEndSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndSurface (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1792,7 +1758,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluNurbsSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint sknot_count,
 		jfloatArray sknot,
 		jint tknot_count,
@@ -1839,7 +1805,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 			}
 		}
 		gluNurbsSurface (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) sknot_count,
 			(GLfloat *) ptr2,
 			(GLint) tknot_count,
@@ -1875,11 +1841,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluBeginTrim (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginTrim (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1893,11 +1859,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluEndTrim (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndTrim (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1911,7 +1877,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluPwlCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint count,
 		jfloatArray array,
 		jint stride,
@@ -1930,7 +1896,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 			}
 		}
 		gluPwlCurve (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) count,
 			(GLfloat *) ptr2,
 			(GLint) stride,
@@ -1943,25 +1909,6 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 		}
 	}
 
-/**
- * Original Function-Prototype :
- * 
 
-   extern GLUtesselator * gluNewTess ( void ) ;
- * 
- */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNI_gluNewTess ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewTess ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -1969,9 +1916,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
  * 
*/ JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3B ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3B ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jbyteArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1987,7 +1934,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1997,9 +1944,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3S ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3S ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jshortArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -2015,7 +1962,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -2025,9 +1972,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3I ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3I ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jintArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -2043,7 +1990,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -2053,9 +2000,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3F ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3F ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jfloatArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -2071,7 +2018,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -2081,9 +2028,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3D ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3D ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -2099,7 +2046,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -2109,9 +2056,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3Z ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3Z ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jbooleanArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -2127,7 +2074,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -2137,9 +2084,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3J ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3J ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jlongArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -2155,7 +2102,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -2174,11 +2121,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessBeginContour ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessBeginContour ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -2190,9 +2137,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, *
*/ JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3B ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3B ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jbyteArray vertex_data) { @@ -2220,7 +2167,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2235,9 +2182,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3S ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3S ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jshortArray vertex_data) { @@ -2265,7 +2212,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2280,9 +2227,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3I ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3I ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jintArray vertex_data) { @@ -2310,7 +2257,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2325,9 +2272,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3F ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3F ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jfloatArray vertex_data) { @@ -2355,7 +2302,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2370,9 +2317,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3D ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3D ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jdoubleArray vertex_data) { @@ -2400,7 +2347,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2415,9 +2362,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3Z ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3Z ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jbooleanArray vertex_data) { @@ -2445,7 +2392,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2460,9 +2407,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3J ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3J ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jlongArray vertex_data) { @@ -2490,7 +2437,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2514,11 +2461,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessEndContour ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessEndContour ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -2532,11 +2479,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessEndPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessEndPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -2550,13 +2497,13 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessProperty ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint which, jdouble value) { gluTessProperty ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) which, (GLdouble) value ); @@ -2572,14 +2519,14 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessNormal ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdouble x, jdouble y, jdouble z) { gluTessNormal ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble) x, (GLdouble) y, (GLdouble) z @@ -2596,7 +2543,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluGetTessProperty ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint which, jdoubleArray value) { @@ -2613,7 +2560,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluGetTessProperty ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) which, (GLdouble *) ptr2 ); @@ -2633,11 +2580,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluBeginPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluBeginPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -2651,12 +2598,12 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluNextContour ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint type) { gluNextContour ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) type ); @@ -2671,13 +2618,13 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluEndPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluEndPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } -/* C2J Parser Version 1.4 Beta: Java program parsed successfully. */ +/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */ diff --git a/CNativeCode/OpenGLU_JauJNI_funcs.c b/CNativeCode/OpenGLU_JauJNI_funcs.c index 55b3351..1fda2a3 100644 --- a/CNativeCode/OpenGLU_JauJNI_funcs.c +++ b/CNativeCode/OpenGLU_JauJNI_funcs.c @@ -16,40 +16,14 @@ * September 1997 */ -/* - * need to include the JAVA internal header files for macros and function - * prototypes required to maipulated JAVA data structures and functions - * - * StubPreamble.h includes the structure and macro definitions neede to - * convert JAVA data structures into C data structures. - * - */ - -#ifdef _WIN32_ - #include "winstuff.h" -#endif - -#include -#include - -#include - -/* - * the next thing to include are special headers that were created by - * JAVAH. They include the C structure definitions for the JAVA classes - */ -#include "gl4java_GLUFuncJauJNI.h" /*-------------------------------------------------------------------------- * here on in is just regular apple pie C */ -/* - * next put any specific header files that are necessary to implement - * this native code - */ -#include -#include +#include "OpenGL_misc.h" + +#include "gl4java_GLUFuncJauJNI.h" #include "GLCallbackHelperJNI.h" #include "GLUCallbackJNI.h" @@ -103,7 +77,7 @@ Java_gl4java_GLUFuncJauJNI_getNativeVersion ( JNIEnv *env, jobject obj ) } static void _AddCallbackNode(JNIEnv *env, - jint qnt_obj, jint which, + jlong qnt_obj, jint which, jobject methodClassInstance, jstring methodName, jstring signature, @@ -122,7 +96,7 @@ static void _AddCallbackNode(JNIEnv *env, AddCallbackNode(env, methodClassInstance, strMethodName, strSignature, arrayLen1, arrayLen2, arrayLen3, arrayLen4, arrayLen5, - (void *)qnt_obj, which, glx); + (void *)((PointerHolder)qnt_obj), which, glx); free(strMethodName); free(strSignature); } @@ -130,7 +104,7 @@ static void _AddCallbackNode(JNIEnv *env, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluQuadricCallback( JNIEnv *env, jobject obj, - jint qobj, jint which, + jlong qobj, jint which, jobject methodClassInstance, jstring methodName, jstring signature) @@ -138,8 +112,8 @@ Java_gl4java_GLUFuncJauJNI_gluQuadricCallback( JNIEnv *env, jobject obj, switch(which) { case GLU_ERROR: - gluQuadricCallback((void *)qobj, which, - cbf_GLU_ERROR ); + gluQuadricCallback((void *)((PointerHolder)qobj), + which, cbf_GLU_ERROR ); break; default: jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !"); @@ -154,7 +128,7 @@ Java_gl4java_GLUFuncJauJNI_gluQuadricCallback( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluNurbsCallback( JNIEnv *env, jobject obj, - jint nobj, jint which, + jlong nobj, jint which, jobject methodClassInstance, jstring methodName, jstring signature) @@ -162,7 +136,7 @@ Java_gl4java_GLUFuncJauJNI_gluNurbsCallback( JNIEnv *env, jobject obj, switch(which) { case GLU_ERROR: - gluNurbsCallback((void *)nobj, which, + gluNurbsCallback((void *)((PointerHolder)nobj), which, cbf_GLU_ERROR ); break; default: @@ -177,7 +151,7 @@ Java_gl4java_GLUFuncJauJNI_gluNurbsCallback( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj, - jint tobj, jint which, + jlong tobj, jint which, jobject methodClassInstance, jstring methodName, jstring signature, @@ -190,51 +164,63 @@ Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj, switch(which) { case GLU_TESS_BEGIN: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_BEGIN ); break; case GLU_TESS_BEGIN_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_BEGIN_DATA ); break; case GLU_TESS_EDGE_FLAG: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_EDGE_FLAG ); break; case GLU_TESS_EDGE_FLAG_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_EDGE_FLAG_DATA ); break; case GLU_TESS_VERTEX: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_VERTEX ); break; case GLU_TESS_VERTEX_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_VERTEX_DATA ); break; case GLU_TESS_END: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_END ); break; case GLU_TESS_END_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_END_DATA ); break; case GLU_TESS_ERROR: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_ERROR ); break; case GLU_TESS_ERROR_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_ERROR_DATA ); break; case GLU_TESS_COMBINE: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_COMBINE ); break; case GLU_TESS_COMBINE_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_COMBINE_DATA ); break; default: @@ -250,30 +236,48 @@ Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluDeleteQuadric( JNIEnv *env, jobject obj, - jint qobj ) + jlong qobj ) { - gluDeleteQuadric((void *)qobj); - RemoveCallbackNodes((void *)qobj); + gluDeleteQuadric((void *)((PointerHolder)qobj)); + RemoveCallbackNodes((void *)((PointerHolder)qobj)); } JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluDeleteNurbsRenderer( JNIEnv *env, jobject obj, - jint nobj ) + jlong nobj ) { - gluDeleteNurbsRenderer((void *)nobj); - RemoveCallbackNodes((void *)nobj); + gluDeleteNurbsRenderer((void *)((PointerHolder)nobj)); + RemoveCallbackNodes((void *)((PointerHolder)nobj)); } JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, - jint tobj ) + jlong tobj ) +{ + gluDeleteTess((GLUtesselator *)((PointerHolder)tobj)); + RemoveCallbackNodes((void *)((PointerHolder)tobj)); +} + +JNIEXPORT jlong JNICALL +Java_gl4java_GLUFuncJauJNI_gluNewQuadric( JNIEnv *env, jobject obj) +{ + return (jlong)((PointerHolder)gluNewQuadric()); +} + +JNIEXPORT jlong JNICALL +Java_gl4java_GLUFuncJauJNI_gluNewNurbsRenderer( JNIEnv *env, jobject obj) +{ + return (jlong)((PointerHolder)gluNewNurbsRenderer()); +} + +JNIEXPORT jlong JNICALL +Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj) { - gluDeleteTess((GLUtesselator *)tobj); - RemoveCallbackNodes((void *)tobj); + return (jlong)((PointerHolder)gluNewTess()); } /** - * C2J Parser Version 1.4 Beta + * C2J Parser Version 1.5 Beta * Jausoft - Sven Goethel Software Development * Reading from file: glu-proto-auto.orig.h . . . * Destination-Class: gl4java_GLUFuncJauJNI ! @@ -1131,25 +1135,6 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, return ret; } -/** - * Original Function-Prototype : - *
 
-   extern GLUquadricObj * gluNewQuadric ( void ) ;
- * 
- */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNI_gluNewQuadric ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewQuadric ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -1159,12 +1144,12 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricDrawStyle (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint drawStyle)
 	{
 
 		gluQuadricDrawStyle (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) drawStyle
 		);
 
@@ -1179,12 +1164,12 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricOrientation (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint orientation)
 	{
 
 		gluQuadricOrientation (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) orientation
 		);
 
@@ -1199,12 +1184,12 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricNormals (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint normals)
 	{
 
 		gluQuadricNormals (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) normals
 		);
 
@@ -1219,12 +1204,12 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricTexture (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jboolean textureCoords)
 	{
 
 		gluQuadricTexture (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLboolean) textureCoords
 		);
 
@@ -1239,7 +1224,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluCylinder (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble baseRadius,
 		jdouble topRadius,
 		jdouble height,
@@ -1248,7 +1233,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	{
 
 		gluCylinder (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) baseRadius,
 			(GLdouble) topRadius,
 			(GLdouble) height,
@@ -1267,14 +1252,14 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluSphere (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble radius,
 		jint slices,
 		jint stacks)
 	{
 
 		gluSphere (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) radius,
 			(GLint) slices,
 			(GLint) stacks
@@ -1291,7 +1276,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluDisk (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble innerRadius,
 		jdouble outerRadius,
 		jint slices,
@@ -1299,7 +1284,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	{
 
 		gluDisk (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) innerRadius,
 			(GLdouble) outerRadius,
 			(GLint) slices,
@@ -1317,7 +1302,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluPartialDisk (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble innerRadius,
 		jdouble outerRadius,
 		jint slices,
@@ -1327,7 +1312,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	{
 
 		gluPartialDisk (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) innerRadius,
 			(GLdouble) outerRadius,
 			(GLint) slices,
@@ -1338,25 +1323,6 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 
 	}
 
-/**
- * Original Function-Prototype :
- * 
 
-   extern GLUnurbsObj * gluNewNurbsRenderer ( void ) ;
- * 
- */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNI_gluNewNurbsRenderer ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewNurbsRenderer ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -1366,7 +1332,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluLoadSamplingMatrices (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jfloatArray modelMatrix,
 		jfloatArray projMatrix,
 		jintArray viewport)
@@ -1388,7 +1354,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 			ptr3 = (*env)->GetIntArrayElements(env, viewport, 0);
 		}
 		gluLoadSamplingMatrices (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(const GLfloat *) ptr1,
 			(const GLfloat *) ptr2,
 			(const GLint *) ptr3
@@ -1417,13 +1383,13 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluNurbsProperty (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint property,
 		jfloat value)
 	{
 
 		gluNurbsProperty (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLenum) property,
 			(GLfloat) value
 		);
@@ -1439,7 +1405,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluGetNurbsProperty (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint property,
 		jfloatArray value)
 	{
@@ -1451,7 +1417,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 			ptr2 = (*env)->GetFloatArrayElements(env, value, &isCopiedArray2);
 		}
 		gluGetNurbsProperty (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLenum) property,
 			(GLfloat *) ptr2
 		);
@@ -1471,11 +1437,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluBeginCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginCurve (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1489,11 +1455,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluEndCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndCurve (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1507,7 +1473,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluNurbsCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint nknots,
 		jfloatArray knot,
 		jint stride,
@@ -1529,7 +1495,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 			ptr4 = (*env)->GetFloatArrayElements(env, ctlarray, &isCopiedArray4);
 		}
 		gluNurbsCurve (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) nknots,
 			(GLfloat *) ptr2,
 			(GLint) stride,
@@ -1557,11 +1523,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluBeginSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginSurface (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1575,11 +1541,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluEndSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndSurface (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1593,7 +1559,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluNurbsSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint sknot_count,
 		jfloatArray sknot,
 		jint tknot_count,
@@ -1625,7 +1591,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 			ptr7 = (*env)->GetFloatArrayElements(env, ctlarray, &isCopiedArray7);
 		}
 		gluNurbsSurface (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) sknot_count,
 			(GLfloat *) ptr2,
 			(GLint) tknot_count,
@@ -1661,11 +1627,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluBeginTrim (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginTrim (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1679,11 +1645,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluEndTrim (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndTrim (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1697,7 +1663,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluPwlCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint count,
 		jfloatArray array,
 		jint stride,
@@ -1711,7 +1677,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 			ptr2 = (*env)->GetFloatArrayElements(env, array, &isCopiedArray2);
 		}
 		gluPwlCurve (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) count,
 			(GLfloat *) ptr2,
 			(GLint) stride,
@@ -1724,25 +1690,6 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 		}
 	}
 
-/**
- * Original Function-Prototype :
- * 
 
-   extern GLUtesselator * gluNewTess ( void ) ;
- * 
- */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNI_gluNewTess ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewTess ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -1750,9 +1697,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
  * 
*/ JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3B ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3B ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jbyteArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1763,7 +1710,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr1 = (*env)->GetByteArrayElements(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1773,9 +1720,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3S ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3S ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jshortArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1786,7 +1733,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr1 = (*env)->GetShortArrayElements(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1796,9 +1743,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3I ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3I ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jintArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1809,7 +1756,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr1 = (*env)->GetIntArrayElements(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1819,9 +1766,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3F ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3F ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jfloatArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1832,7 +1779,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr1 = (*env)->GetFloatArrayElements(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1842,9 +1789,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3D ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3D ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1855,7 +1802,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr1 = (*env)->GetDoubleArrayElements(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1865,9 +1812,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3Z ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3Z ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jbooleanArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1878,7 +1825,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr1 = (*env)->GetBooleanArrayElements(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1888,9 +1835,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3J ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3J ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jlongArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1901,7 +1848,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr1 = (*env)->GetLongArrayElements(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1920,11 +1867,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessBeginContour ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessBeginContour ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -1936,9 +1883,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, *
*/ JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3B ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3B ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jbyteArray vertex_data) { @@ -1956,7 +1903,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr2 = (*env)->GetByteArrayElements(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -1971,9 +1918,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3S ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3S ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jshortArray vertex_data) { @@ -1991,7 +1938,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr2 = (*env)->GetShortArrayElements(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2006,9 +1953,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3I ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3I ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jintArray vertex_data) { @@ -2026,7 +1973,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr2 = (*env)->GetIntArrayElements(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2041,9 +1988,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3F ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3F ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jfloatArray vertex_data) { @@ -2061,7 +2008,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr2 = (*env)->GetFloatArrayElements(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2076,9 +2023,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3D ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3D ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jdoubleArray vertex_data) { @@ -2096,7 +2043,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr2 = (*env)->GetDoubleArrayElements(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2111,9 +2058,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3Z ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3Z ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jbooleanArray vertex_data) { @@ -2131,7 +2078,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr2 = (*env)->GetBooleanArrayElements(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2146,9 +2093,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3J ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3J ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jlongArray vertex_data) { @@ -2166,7 +2113,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr2 = (*env)->GetLongArrayElements(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2190,11 +2137,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessEndContour ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessEndContour ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -2208,11 +2155,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessEndPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessEndPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -2226,13 +2173,13 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessProperty ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint which, jdouble value) { gluTessProperty ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) which, (GLdouble) value ); @@ -2248,14 +2195,14 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessNormal ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdouble x, jdouble y, jdouble z) { gluTessNormal ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble) x, (GLdouble) y, (GLdouble) z @@ -2272,7 +2219,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluGetTessProperty ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint which, jdoubleArray value) { @@ -2284,7 +2231,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, ptr2 = (*env)->GetDoubleArrayElements(env, value, &isCopiedArray2); } gluGetTessProperty ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) which, (GLdouble *) ptr2 ); @@ -2304,11 +2251,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluBeginPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluBeginPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -2322,12 +2269,12 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluNextContour ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint type) { gluNextContour ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) type ); @@ -2342,13 +2289,13 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluEndPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluEndPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } -/* C2J Parser Version 1.4 Beta: Java program parsed successfully. */ +/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */ diff --git a/CNativeCode/OpenGLU_JauJNInf_funcs.c b/CNativeCode/OpenGLU_JauJNInf_funcs.c index 25ac6eb..9860fad 100644 --- a/CNativeCode/OpenGLU_JauJNInf_funcs.c +++ b/CNativeCode/OpenGLU_JauJNInf_funcs.c @@ -16,40 +16,14 @@ * September 1997 */ -/* - * need to include the JAVA internal header files for macros and function - * prototypes required to maipulated JAVA data structures and functions - * - * StubPreamble.h includes the structure and macro definitions neede to - * convert JAVA data structures into C data structures. - * - */ - -#ifdef _WIN32_ - #include "winstuff.h" -#endif - -#include -#include - -#include - -/* - * the next thing to include are special headers that were created by - * JAVAH. They include the C structure definitions for the JAVA classes - */ -#include "gl4java_GLUFuncJauJNInf.h" /*-------------------------------------------------------------------------- * here on in is just regular apple pie C */ -/* - * next put any specific header files that are necessary to implement - * this native code - */ -#include -#include +#include "OpenGL_misc.h" + +#include "gl4java_GLUFuncJauJNInf.h" #include "GLCallbackHelperJNI.h" #include "GLUCallbackJNI.h" @@ -103,7 +77,7 @@ Java_gl4java_GLUFuncJauJNInf_getNativeVersion ( JNIEnv *env, jobject obj ) } static void _AddCallbackNode(JNIEnv *env, - jint qnt_obj, jint which, + jlong qnt_obj, jint which, jobject methodClassInstance, jstring methodName, jstring signature, @@ -122,7 +96,7 @@ static void _AddCallbackNode(JNIEnv *env, AddCallbackNode(env, methodClassInstance, strMethodName, strSignature, arrayLen1, arrayLen2, arrayLen3, arrayLen4, arrayLen5, - (void *)qnt_obj, which, glx); + (void *)((PointerHolder)qnt_obj), which, glx); free(strMethodName); free(strSignature); } @@ -130,7 +104,7 @@ static void _AddCallbackNode(JNIEnv *env, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNInf_gluQuadricCallback( JNIEnv *env, jobject obj, - jint qobj, jint which, + jlong qobj, jint which, jobject methodClassInstance, jstring methodName, jstring signature) @@ -138,8 +112,8 @@ Java_gl4java_GLUFuncJauJNInf_gluQuadricCallback( JNIEnv *env, jobject obj, switch(which) { case GLU_ERROR: - gluQuadricCallback((void *)qobj, which, - cbf_GLU_ERROR ); + gluQuadricCallback((void *)((PointerHolder)qobj), + which, cbf_GLU_ERROR ); break; default: jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !"); @@ -154,7 +128,7 @@ Java_gl4java_GLUFuncJauJNInf_gluQuadricCallback( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNInf_gluNurbsCallback( JNIEnv *env, jobject obj, - jint nobj, jint which, + jlong nobj, jint which, jobject methodClassInstance, jstring methodName, jstring signature) @@ -162,7 +136,7 @@ Java_gl4java_GLUFuncJauJNInf_gluNurbsCallback( JNIEnv *env, jobject obj, switch(which) { case GLU_ERROR: - gluNurbsCallback((void *)nobj, which, + gluNurbsCallback((void *)((PointerHolder)nobj), which, cbf_GLU_ERROR ); break; default: @@ -177,7 +151,7 @@ Java_gl4java_GLUFuncJauJNInf_gluNurbsCallback( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNInf_gluTessCallback( JNIEnv *env, jobject obj, - jint tobj, jint which, + jlong tobj, jint which, jobject methodClassInstance, jstring methodName, jstring signature, @@ -190,51 +164,63 @@ Java_gl4java_GLUFuncJauJNInf_gluTessCallback( JNIEnv *env, jobject obj, switch(which) { case GLU_TESS_BEGIN: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_BEGIN ); break; case GLU_TESS_BEGIN_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_BEGIN_DATA ); break; case GLU_TESS_EDGE_FLAG: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_EDGE_FLAG ); break; case GLU_TESS_EDGE_FLAG_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_EDGE_FLAG_DATA ); break; case GLU_TESS_VERTEX: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_VERTEX ); break; case GLU_TESS_VERTEX_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_VERTEX_DATA ); break; case GLU_TESS_END: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_END ); break; case GLU_TESS_END_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_END_DATA ); break; case GLU_TESS_ERROR: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_ERROR ); break; case GLU_TESS_ERROR_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_ERROR_DATA ); break; case GLU_TESS_COMBINE: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_COMBINE ); break; case GLU_TESS_COMBINE_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_COMBINE_DATA ); break; default: @@ -250,30 +236,48 @@ Java_gl4java_GLUFuncJauJNInf_gluTessCallback( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNInf_gluDeleteQuadric( JNIEnv *env, jobject obj, - jint qobj ) + jlong qobj ) { - gluDeleteQuadric((void *)qobj); - RemoveCallbackNodes((void *)qobj); + gluDeleteQuadric((void *)((PointerHolder)qobj)); + RemoveCallbackNodes((void *)((PointerHolder)qobj)); } JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNInf_gluDeleteNurbsRenderer( JNIEnv *env, jobject obj, - jint nobj ) + jlong nobj ) { - gluDeleteNurbsRenderer((void *)nobj); - RemoveCallbackNodes((void *)nobj); + gluDeleteNurbsRenderer((void *)((PointerHolder)nobj)); + RemoveCallbackNodes((void *)((PointerHolder)nobj)); } JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, - jint tobj ) + jlong tobj ) +{ + gluDeleteTess((GLUtesselator *)((PointerHolder)tobj)); + RemoveCallbackNodes((void *)((PointerHolder)tobj)); +} + +JNIEXPORT jlong JNICALL +Java_gl4java_GLUFuncJauJNInf_gluNewQuadric( JNIEnv *env, jobject obj) +{ + return (jlong)((PointerHolder)gluNewQuadric()); +} + +JNIEXPORT jlong JNICALL +Java_gl4java_GLUFuncJauJNInf_gluNewNurbsRenderer( JNIEnv *env, jobject obj) +{ + return (jlong)((PointerHolder)gluNewNurbsRenderer()); +} + +JNIEXPORT jlong JNICALL +Java_gl4java_GLUFuncJauJNInf_gluNewTess( JNIEnv *env, jobject obj) { - gluDeleteTess((GLUtesselator *)tobj); - RemoveCallbackNodes((void *)tobj); + return (jlong)((PointerHolder)gluNewTess()); } /** - * C2J Parser Version 1.4 Beta + * C2J Parser Version 1.5 Beta * Jausoft - Sven Goethel Software Development * Reading from file: glu-proto-auto.orig.h . . . * Destination-Class: gl4java_GLUFuncJauJNInf ! @@ -1131,25 +1135,6 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, return ret; } -/** - * Original Function-Prototype : - *
 
-   extern GLUquadricObj * gluNewQuadric ( void ) ;
- * 
- */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNInf_gluNewQuadric ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewQuadric ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -1159,12 +1144,12 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNInf_gluQuadricDrawStyle (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint drawStyle)
 	{
 
 		gluQuadricDrawStyle (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) drawStyle
 		);
 
@@ -1179,12 +1164,12 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNInf_gluQuadricOrientation (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint orientation)
 	{
 
 		gluQuadricOrientation (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) orientation
 		);
 
@@ -1199,12 +1184,12 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNInf_gluQuadricNormals (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint normals)
 	{
 
 		gluQuadricNormals (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) normals
 		);
 
@@ -1219,12 +1204,12 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNInf_gluQuadricTexture (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jboolean textureCoords)
 	{
 
 		gluQuadricTexture (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLboolean) textureCoords
 		);
 
@@ -1239,7 +1224,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNInf_gluCylinder (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble baseRadius,
 		jdouble topRadius,
 		jdouble height,
@@ -1248,7 +1233,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 	{
 
 		gluCylinder (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) baseRadius,
 			(GLdouble) topRadius,
 			(GLdouble) height,
@@ -1267,14 +1252,14 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNInf_gluSphere (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble radius,
 		jint slices,
 		jint stacks)
 	{
 
 		gluSphere (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) radius,
 			(GLint) slices,
 			(GLint) stacks
@@ -1291,7 +1276,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNInf_gluDisk (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble innerRadius,
 		jdouble outerRadius,
 		jint slices,
@@ -1299,7 +1284,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 	{
 
 		gluDisk (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) innerRadius,
 			(GLdouble) outerRadius,
 			(GLint) slices,
@@ -1317,7 +1302,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNInf_gluPartialDisk (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble innerRadius,
 		jdouble outerRadius,
 		jint slices,
@@ -1327,7 +1312,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 	{
 
 		gluPartialDisk (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) innerRadius,
 			(GLdouble) outerRadius,
 			(GLint) slices,
@@ -1338,25 +1323,6 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 
 	}
 
-/**
- * Original Function-Prototype :
- * 
 
-   extern GLUnurbsObj * gluNewNurbsRenderer ( void ) ;
- * 
- */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNInf_gluNewNurbsRenderer ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewNurbsRenderer ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -1366,7 +1332,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNInf_gluLoadSamplingMatrices (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jfloatArray modelMatrix,
 		jfloatArray projMatrix,
 		jintArray viewport)
@@ -1388,7 +1354,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 			ptr3 = (*env)->GetIntArrayElements(env, viewport, 0);
 		}
 		gluLoadSamplingMatrices (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(const GLfloat *) ptr1,
 			(const GLfloat *) ptr2,
 			(const GLint *) ptr3
@@ -1417,13 +1383,13 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNInf_gluNurbsProperty (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint property,
 		jfloat value)
 	{
 
 		gluNurbsProperty (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLenum) property,
 			(GLfloat) value
 		);
@@ -1439,7 +1405,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNInf_gluGetNurbsProperty (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint property,
 		jfloatArray value)
 	{
@@ -1451,7 +1417,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 			ptr2 = (*env)->GetFloatArrayElements(env, value, &isCopiedArray2);
 		}
 		gluGetNurbsProperty (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLenum) property,
 			(GLfloat *) ptr2
 		);
@@ -1471,11 +1437,11 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNInf_gluBeginCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginCurve (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1489,11 +1455,11 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNInf_gluEndCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndCurve (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1507,7 +1473,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNInf_gluNurbsCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint nknots,
 		jfloatArray knot,
 		jint stride,
@@ -1529,7 +1495,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 			ptr4 = (*env)->GetFloatArrayElements(env, ctlarray, &isCopiedArray4);
 		}
 		gluNurbsCurve (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) nknots,
 			(GLfloat *) ptr2,
 			(GLint) stride,
@@ -1557,11 +1523,11 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNInf_gluBeginSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginSurface (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1575,11 +1541,11 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNInf_gluEndSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndSurface (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1593,7 +1559,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNInf_gluNurbsSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint sknot_count,
 		jfloatArray sknot,
 		jint tknot_count,
@@ -1625,7 +1591,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 			ptr7 = (*env)->GetFloatArrayElements(env, ctlarray, &isCopiedArray7);
 		}
 		gluNurbsSurface (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) sknot_count,
 			(GLfloat *) ptr2,
 			(GLint) tknot_count,
@@ -1661,11 +1627,11 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNInf_gluBeginTrim (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginTrim (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1679,11 +1645,11 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNInf_gluEndTrim (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndTrim (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1697,7 +1663,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNInf_gluPwlCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint count,
 		jfloatArray array,
 		jint stride,
@@ -1711,7 +1677,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 			ptr2 = (*env)->GetFloatArrayElements(env, array, &isCopiedArray2);
 		}
 		gluPwlCurve (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) count,
 			(GLfloat *) ptr2,
 			(GLint) stride,
@@ -1724,25 +1690,6 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
 		}
 	}
 
-/**
- * Original Function-Prototype :
- * 
 
-   extern GLUtesselator * gluNewTess ( void ) ;
- * 
- */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNInf_gluNewTess ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewTess ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -1750,9 +1697,9 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj,
  * 
*/ JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNInf_gluTessBeginPolygon__I_3B ( + Java_gl4java_GLUFuncJauJNInf_gluTessBeginPolygon__J_3B ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jbyteArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1763,7 +1710,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, ptr1 = (*env)->GetByteArrayElements(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1773,9 +1720,9 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNInf_gluTessBeginPolygon__I_3S ( + Java_gl4java_GLUFuncJauJNInf_gluTessBeginPolygon__J_3S ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jshortArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1786,7 +1733,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, ptr1 = (*env)->GetShortArrayElements(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1796,9 +1743,9 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNInf_gluTessBeginPolygon__I_3I ( + Java_gl4java_GLUFuncJauJNInf_gluTessBeginPolygon__J_3I ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jintArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1809,7 +1756,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, ptr1 = (*env)->GetIntArrayElements(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1819,9 +1766,9 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNInf_gluTessBeginPolygon__I_3F ( + Java_gl4java_GLUFuncJauJNInf_gluTessBeginPolygon__J_3F ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jfloatArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1832,7 +1779,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, ptr1 = (*env)->GetFloatArrayElements(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1842,9 +1789,9 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNInf_gluTessBeginPolygon__I_3D ( + Java_gl4java_GLUFuncJauJNInf_gluTessBeginPolygon__J_3D ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1855,7 +1802,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, ptr1 = (*env)->GetDoubleArrayElements(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1865,9 +1812,9 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNInf_gluTessBeginPolygon__I_3Z ( + Java_gl4java_GLUFuncJauJNInf_gluTessBeginPolygon__J_3Z ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jbooleanArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1878,7 +1825,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, ptr1 = (*env)->GetBooleanArrayElements(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1888,9 +1835,9 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNInf_gluTessBeginPolygon__I_3J ( + Java_gl4java_GLUFuncJauJNInf_gluTessBeginPolygon__J_3J ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jlongArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1901,7 +1848,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, ptr1 = (*env)->GetLongArrayElements(env, polygon_data, &isCopiedArray1); } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1920,11 +1867,11 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNInf_gluTessBeginContour ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessBeginContour ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -1936,9 +1883,9 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, *
*/ JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNInf_gluTessVertex__I_3D_3B ( + Java_gl4java_GLUFuncJauJNInf_gluTessVertex__J_3D_3B ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jbyteArray vertex_data) { @@ -1956,7 +1903,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, ptr2 = (*env)->GetByteArrayElements(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -1971,9 +1918,9 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNInf_gluTessVertex__I_3D_3S ( + Java_gl4java_GLUFuncJauJNInf_gluTessVertex__J_3D_3S ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jshortArray vertex_data) { @@ -1991,7 +1938,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, ptr2 = (*env)->GetShortArrayElements(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2006,9 +1953,9 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNInf_gluTessVertex__I_3D_3I ( + Java_gl4java_GLUFuncJauJNInf_gluTessVertex__J_3D_3I ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jintArray vertex_data) { @@ -2026,7 +1973,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, ptr2 = (*env)->GetIntArrayElements(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2041,9 +1988,9 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNInf_gluTessVertex__I_3D_3F ( + Java_gl4java_GLUFuncJauJNInf_gluTessVertex__J_3D_3F ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jfloatArray vertex_data) { @@ -2061,7 +2008,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, ptr2 = (*env)->GetFloatArrayElements(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2076,9 +2023,9 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNInf_gluTessVertex__I_3D_3D ( + Java_gl4java_GLUFuncJauJNInf_gluTessVertex__J_3D_3D ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jdoubleArray vertex_data) { @@ -2096,7 +2043,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, ptr2 = (*env)->GetDoubleArrayElements(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2111,9 +2058,9 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNInf_gluTessVertex__I_3D_3Z ( + Java_gl4java_GLUFuncJauJNInf_gluTessVertex__J_3D_3Z ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jbooleanArray vertex_data) { @@ -2131,7 +2078,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, ptr2 = (*env)->GetBooleanArrayElements(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2146,9 +2093,9 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNInf_gluTessVertex__I_3D_3J ( + Java_gl4java_GLUFuncJauJNInf_gluTessVertex__J_3D_3J ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jlongArray vertex_data) { @@ -2166,7 +2113,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, ptr2 = (*env)->GetLongArrayElements(env, vertex_data, &isCopiedArray2); } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2190,11 +2137,11 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNInf_gluTessEndContour ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessEndContour ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -2208,11 +2155,11 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNInf_gluTessEndPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessEndPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -2226,13 +2173,13 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNInf_gluTessProperty ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint which, jdouble value) { gluTessProperty ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) which, (GLdouble) value ); @@ -2248,14 +2195,14 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNInf_gluTessNormal ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdouble x, jdouble y, jdouble z) { gluTessNormal ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble) x, (GLdouble) y, (GLdouble) z @@ -2272,7 +2219,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNInf_gluGetTessProperty ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint which, jdoubleArray value) { @@ -2284,7 +2231,7 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, ptr2 = (*env)->GetDoubleArrayElements(env, value, &isCopiedArray2); } gluGetTessProperty ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) which, (GLdouble *) ptr2 ); @@ -2304,11 +2251,11 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNInf_gluBeginPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluBeginPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -2322,12 +2269,12 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNInf_gluNextContour ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint type) { gluNextContour ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) type ); @@ -2342,13 +2289,13 @@ Java_gl4java_GLUFuncJauJNInf_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNInf_gluEndPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluEndPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } -/* C2J Parser Version 1.4 Beta: Java program parsed successfully. */ +/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */ diff --git a/CNativeCode/OpenGLU_JauJNItst_funcs.c b/CNativeCode/OpenGLU_JauJNItst_funcs.c index 9b78767..1fc3b2c 100644 --- a/CNativeCode/OpenGLU_JauJNItst_funcs.c +++ b/CNativeCode/OpenGLU_JauJNItst_funcs.c @@ -16,40 +16,14 @@ * September 1997 */ -/* - * need to include the JAVA internal header files for macros and function - * prototypes required to maipulated JAVA data structures and functions - * - * StubPreamble.h includes the structure and macro definitions neede to - * convert JAVA data structures into C data structures. - * - */ - -#ifdef _WIN32_ - #include "winstuff.h" -#endif - -#include -#include - -#include - -/* - * the next thing to include are special headers that were created by - * JAVAH. They include the C structure definitions for the JAVA classes - */ -#include "gl4java_GLUFuncJauJNI.h" /*-------------------------------------------------------------------------- * here on in is just regular apple pie C */ -/* - * next put any specific header files that are necessary to implement - * this native code - */ -#include -#include +#include "OpenGL_misc.h" + +#include "gl4java_GLUFuncJauJNI.h" #include "GLCallbackHelperJNI.h" #include "GLUCallbackJNI.h" @@ -103,7 +77,7 @@ Java_gl4java_GLUFuncJauJNI_getNativeVersion ( JNIEnv *env, jobject obj ) } static void _AddCallbackNode(JNIEnv *env, - jint qnt_obj, jint which, + jlong qnt_obj, jint which, jobject methodClassInstance, jstring methodName, jstring signature, @@ -122,7 +96,7 @@ static void _AddCallbackNode(JNIEnv *env, AddCallbackNode(env, methodClassInstance, strMethodName, strSignature, arrayLen1, arrayLen2, arrayLen3, arrayLen4, arrayLen5, - (void *)qnt_obj, which, glx); + (void *)((PointerHolder)qnt_obj), which, glx); free(strMethodName); free(strSignature); } @@ -130,7 +104,7 @@ static void _AddCallbackNode(JNIEnv *env, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluQuadricCallback( JNIEnv *env, jobject obj, - jint qobj, jint which, + jlong qobj, jint which, jobject methodClassInstance, jstring methodName, jstring signature) @@ -138,8 +112,8 @@ Java_gl4java_GLUFuncJauJNI_gluQuadricCallback( JNIEnv *env, jobject obj, switch(which) { case GLU_ERROR: - gluQuadricCallback((void *)qobj, which, - cbf_GLU_ERROR ); + gluQuadricCallback((void *)((PointerHolder)qobj), + which, cbf_GLU_ERROR ); break; default: jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !"); @@ -154,7 +128,7 @@ Java_gl4java_GLUFuncJauJNI_gluQuadricCallback( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluNurbsCallback( JNIEnv *env, jobject obj, - jint nobj, jint which, + jlong nobj, jint which, jobject methodClassInstance, jstring methodName, jstring signature) @@ -162,7 +136,7 @@ Java_gl4java_GLUFuncJauJNI_gluNurbsCallback( JNIEnv *env, jobject obj, switch(which) { case GLU_ERROR: - gluNurbsCallback((void *)nobj, which, + gluNurbsCallback((void *)((PointerHolder)nobj), which, cbf_GLU_ERROR ); break; default: @@ -177,7 +151,7 @@ Java_gl4java_GLUFuncJauJNI_gluNurbsCallback( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj, - jint tobj, jint which, + jlong tobj, jint which, jobject methodClassInstance, jstring methodName, jstring signature, @@ -190,51 +164,63 @@ Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj, switch(which) { case GLU_TESS_BEGIN: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_BEGIN ); break; case GLU_TESS_BEGIN_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_BEGIN_DATA ); break; case GLU_TESS_EDGE_FLAG: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_EDGE_FLAG ); break; case GLU_TESS_EDGE_FLAG_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_EDGE_FLAG_DATA ); break; case GLU_TESS_VERTEX: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_VERTEX ); break; case GLU_TESS_VERTEX_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_VERTEX_DATA ); break; case GLU_TESS_END: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_END ); break; case GLU_TESS_END_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_END_DATA ); break; case GLU_TESS_ERROR: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_ERROR ); break; case GLU_TESS_ERROR_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_ERROR_DATA ); break; case GLU_TESS_COMBINE: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_COMBINE ); break; case GLU_TESS_COMBINE_DATA: - gluTessCallback((GLUtesselator *)tobj, which, + gluTessCallback((GLUtesselator *)((PointerHolder)tobj), + which, cbf_GLU_TESS_COMBINE_DATA ); break; default: @@ -250,30 +236,48 @@ Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluDeleteQuadric( JNIEnv *env, jobject obj, - jint qobj ) + jlong qobj ) { - gluDeleteQuadric((void *)qobj); - RemoveCallbackNodes((void *)qobj); + gluDeleteQuadric((void *)((PointerHolder)qobj)); + RemoveCallbackNodes((void *)((PointerHolder)qobj)); } JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluDeleteNurbsRenderer( JNIEnv *env, jobject obj, - jint nobj ) + jlong nobj ) { - gluDeleteNurbsRenderer((void *)nobj); - RemoveCallbackNodes((void *)nobj); + gluDeleteNurbsRenderer((void *)((PointerHolder)nobj)); + RemoveCallbackNodes((void *)((PointerHolder)nobj)); } JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, - jint tobj ) + jlong tobj ) +{ + gluDeleteTess((GLUtesselator *)((PointerHolder)tobj)); + RemoveCallbackNodes((void *)((PointerHolder)tobj)); +} + +JNIEXPORT jlong JNICALL +Java_gl4java_GLUFuncJauJNI_gluNewQuadric( JNIEnv *env, jobject obj) +{ + return (jlong)((PointerHolder)gluNewQuadric()); +} + +JNIEXPORT jlong JNICALL +Java_gl4java_GLUFuncJauJNI_gluNewNurbsRenderer( JNIEnv *env, jobject obj) +{ + return (jlong)((PointerHolder)gluNewNurbsRenderer()); +} + +JNIEXPORT jlong JNICALL +Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj) { - gluDeleteTess((GLUtesselator *)tobj); - RemoveCallbackNodes((void *)tobj); + return (jlong)((PointerHolder)gluNewTess()); } /** - * C2J Parser Version 1.4 Beta + * C2J Parser Version 1.5 Beta * Jausoft - Sven Goethel Software Development * Reading from file: glu-proto-auto.orig.h . . . * Destination-Class: gl4java_GLUFuncJauJNI ! @@ -1297,25 +1301,6 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, return ret; } -/** - * Original Function-Prototype : - *
 
-   extern GLUquadricObj * gluNewQuadric ( void ) ;
- * 
- */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNI_gluNewQuadric ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewQuadric ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -1325,12 +1310,12 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricDrawStyle (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint drawStyle)
 	{
 
 		gluQuadricDrawStyle (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) drawStyle
 		);
 
@@ -1345,12 +1330,12 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricOrientation (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint orientation)
 	{
 
 		gluQuadricOrientation (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) orientation
 		);
 
@@ -1365,12 +1350,12 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricNormals (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jint normals)
 	{
 
 		gluQuadricNormals (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLenum) normals
 		);
 
@@ -1385,12 +1370,12 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluQuadricTexture (
 		JNIEnv *env, jobject obj,
-		jint quadObject,
+		jlong quadObject,
 		jboolean textureCoords)
 	{
 
 		gluQuadricTexture (
-			(GLUquadricObj *) quadObject,
+			(GLUquadricObj *) (PointerHolder) quadObject,
 			(GLboolean) textureCoords
 		);
 
@@ -1405,7 +1390,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluCylinder (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble baseRadius,
 		jdouble topRadius,
 		jdouble height,
@@ -1414,7 +1399,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	{
 
 		gluCylinder (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) baseRadius,
 			(GLdouble) topRadius,
 			(GLdouble) height,
@@ -1433,14 +1418,14 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluSphere (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble radius,
 		jint slices,
 		jint stacks)
 	{
 
 		gluSphere (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) radius,
 			(GLint) slices,
 			(GLint) stacks
@@ -1457,7 +1442,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluDisk (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble innerRadius,
 		jdouble outerRadius,
 		jint slices,
@@ -1465,7 +1450,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	{
 
 		gluDisk (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) innerRadius,
 			(GLdouble) outerRadius,
 			(GLint) slices,
@@ -1483,7 +1468,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluPartialDisk (
 		JNIEnv *env, jobject obj,
-		jint qobj,
+		jlong qobj,
 		jdouble innerRadius,
 		jdouble outerRadius,
 		jint slices,
@@ -1493,7 +1478,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	{
 
 		gluPartialDisk (
-			(GLUquadricObj *) qobj,
+			(GLUquadricObj *) (PointerHolder) qobj,
 			(GLdouble) innerRadius,
 			(GLdouble) outerRadius,
 			(GLint) slices,
@@ -1504,25 +1489,6 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 
 	}
 
-/**
- * Original Function-Prototype :
- * 
 
-   extern GLUnurbsObj * gluNewNurbsRenderer ( void ) ;
- * 
- */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNI_gluNewNurbsRenderer ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewNurbsRenderer ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -1532,7 +1498,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluLoadSamplingMatrices (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jfloatArray modelMatrix,
 		jfloatArray projMatrix,
 		jintArray viewport)
@@ -1572,7 +1538,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 			}
 		}
 		gluLoadSamplingMatrices (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(const GLfloat *) ptr1,
 			(const GLfloat *) ptr2,
 			(const GLint *) ptr3
@@ -1601,13 +1567,13 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluNurbsProperty (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint property,
 		jfloat value)
 	{
 
 		gluNurbsProperty (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLenum) property,
 			(GLfloat) value
 		);
@@ -1623,7 +1589,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluGetNurbsProperty (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint property,
 		jfloatArray value)
 	{
@@ -1640,7 +1606,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 			}
 		}
 		gluGetNurbsProperty (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLenum) property,
 			(GLfloat *) ptr2
 		);
@@ -1660,11 +1626,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluBeginCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginCurve (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1678,11 +1644,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluEndCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndCurve (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1696,7 +1662,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluNurbsCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint nknots,
 		jfloatArray knot,
 		jint stride,
@@ -1728,7 +1694,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 			}
 		}
 		gluNurbsCurve (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) nknots,
 			(GLfloat *) ptr2,
 			(GLint) stride,
@@ -1756,11 +1722,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluBeginSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginSurface (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1774,11 +1740,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluEndSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndSurface (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1792,7 +1758,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluNurbsSurface (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint sknot_count,
 		jfloatArray sknot,
 		jint tknot_count,
@@ -1839,7 +1805,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 			}
 		}
 		gluNurbsSurface (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) sknot_count,
 			(GLfloat *) ptr2,
 			(GLint) tknot_count,
@@ -1875,11 +1841,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluBeginTrim (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluBeginTrim (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1893,11 +1859,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluEndTrim (
 		JNIEnv *env, jobject obj,
-		jint nobj)
+		jlong nobj)
 	{
 
 		gluEndTrim (
-			(GLUnurbsObj *) nobj
+			(GLUnurbsObj *) (PointerHolder) nobj
 		);
 
 	}
@@ -1911,7 +1877,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 	JNIEXPORT void JNICALL
 	Java_gl4java_GLUFuncJauJNI_gluPwlCurve (
 		JNIEnv *env, jobject obj,
-		jint nobj,
+		jlong nobj,
 		jint count,
 		jfloatArray array,
 		jint stride,
@@ -1930,7 +1896,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 			}
 		}
 		gluPwlCurve (
-			(GLUnurbsObj *) nobj,
+			(GLUnurbsObj *) (PointerHolder) nobj,
 			(GLint) count,
 			(GLfloat *) ptr2,
 			(GLint) stride,
@@ -1943,25 +1909,6 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
 		}
 	}
 
-/**
- * Original Function-Prototype :
- * 
 
-   extern GLUtesselator * gluNewTess ( void ) ;
- * 
- */ - JNIEXPORT jint JNICALL - Java_gl4java_GLUFuncJauJNI_gluNewTess ( - JNIEnv *env, jobject obj) - { - jint ret; - - - ret = (jint) gluNewTess ( - ); - - return ret; - } - /** * Original Function-Prototype : *
 
@@ -1969,9 +1916,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
  * 
*/ JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3B ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3B ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jbyteArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -1987,7 +1934,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -1997,9 +1944,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3S ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3S ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jshortArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -2015,7 +1962,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -2025,9 +1972,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3I ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3I ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jintArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -2043,7 +1990,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -2053,9 +2000,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3F ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3F ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jfloatArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -2071,7 +2018,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -2081,9 +2028,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3D ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3D ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -2099,7 +2046,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -2109,9 +2056,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3Z ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3Z ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jbooleanArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -2127,7 +2074,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -2137,9 +2084,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__I_3J ( + Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3J ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jlongArray polygon_data) { jboolean isCopiedArray1 = JNI_FALSE; @@ -2155,7 +2102,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessBeginPolygon ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (void *) ptr1 ); @@ -2174,11 +2121,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessBeginContour ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessBeginContour ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -2190,9 +2137,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, *
*/ JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3B ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3B ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jbyteArray vertex_data) { @@ -2220,7 +2167,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2235,9 +2182,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3S ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3S ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jshortArray vertex_data) { @@ -2265,7 +2212,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2280,9 +2227,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3I ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3I ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jintArray vertex_data) { @@ -2310,7 +2257,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2325,9 +2272,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3F ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3F ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jfloatArray vertex_data) { @@ -2355,7 +2302,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2370,9 +2317,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3D ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3D ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jdoubleArray vertex_data) { @@ -2400,7 +2347,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2415,9 +2362,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3Z ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3Z ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jbooleanArray vertex_data) { @@ -2445,7 +2392,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2460,9 +2407,9 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } JNIEXPORT void JNICALL - Java_gl4java_GLUFuncJauJNI_gluTessVertex__I_3D_3J ( + Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3J ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdoubleArray coords, jlongArray vertex_data) { @@ -2490,7 +2437,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluTessVertex ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble *) ptr1, (void *) ptr2 ); @@ -2514,11 +2461,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessEndContour ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessEndContour ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -2532,11 +2479,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessEndPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluTessEndPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -2550,13 +2497,13 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessProperty ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint which, jdouble value) { gluTessProperty ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) which, (GLdouble) value ); @@ -2572,14 +2519,14 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluTessNormal ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jdouble x, jdouble y, jdouble z) { gluTessNormal ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLdouble) x, (GLdouble) y, (GLdouble) z @@ -2596,7 +2543,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluGetTessProperty ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint which, jdoubleArray value) { @@ -2613,7 +2560,7 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, } } gluGetTessProperty ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) which, (GLdouble *) ptr2 ); @@ -2633,11 +2580,11 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluBeginPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluBeginPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } @@ -2651,12 +2598,12 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluNextContour ( JNIEnv *env, jobject obj, - jint tobj, + jlong tobj, jint type) { gluNextContour ( - (GLUtesselator *) tobj, + (GLUtesselator *) (PointerHolder) tobj, (GLenum) type ); @@ -2671,13 +2618,13 @@ Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj, JNIEXPORT void JNICALL Java_gl4java_GLUFuncJauJNI_gluEndPolygon ( JNIEnv *env, jobject obj, - jint tobj) + jlong tobj) { gluEndPolygon ( - (GLUtesselator *) tobj + (GLUtesselator *) (PointerHolder) tobj ); } -/* C2J Parser Version 1.4 Beta: Java program parsed successfully. */ +/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */ diff --git a/CNativeCode/OpenGLU_funcs.c.skel b/CNativeCode/OpenGLU_funcs.c.skel index 81cfda7..bac8027 100644 --- a/CNativeCode/OpenGLU_funcs.c.skel +++ b/CNativeCode/OpenGLU_funcs.c.skel @@ -10,40 +10,14 @@ * September 1997 */ -/* - * need to include the JAVA internal header files for macros and function - * prototypes required to maipulated JAVA data structures and functions - * - * StubPreamble.h includes the structure and macro definitions neede to - * convert JAVA data structures into C data structures. - * - */ - -#ifdef _WIN32_ - #include "winstuff.h" -#endif - -#include -#include - -#include - -/* - * the next thing to include are special headers that were created by - * JAVAH. They include the C structure definitions for the JAVA classes - */ -#include "gl4java_GLUFuncJauJNI.h" /*-------------------------------------------------------------------------- * here on in is just regular apple pie C */ -/* - * next put any specific header files that are necessary to implement - * this native code - */ -#include -#include +#include "OpenGL_misc.h" + +#include "gl4java_GLUFuncJauJNI.h" #include "GLCallbackHelperJNI.h" #include "GLUCallbackJNI.h" diff --git a/CNativeCode/OpenGL_JauJNI12_dynfuncs.c b/CNativeCode/OpenGL_JauJNI12_dynfuncs.c index 41fd742..27dae89 100644 --- a/CNativeCode/OpenGL_JauJNI12_dynfuncs.c +++ b/CNativeCode/OpenGL_JauJNI12_dynfuncs.c @@ -83,7 +83,7 @@ Java_gl4java_GLFuncJauJNI_getNativeVersion ( JNIEnv *env, jobject obj ) } /** - * C2J Parser Version 1.4 Beta + * C2J Parser Version 1.5 Beta * Jausoft - Sven Goethel Software Development * Reading from file: gl-proto-auto.orig.h . . . * Destination-Class: gl4java_GLFuncJauJNI ! @@ -23655,4 +23655,4 @@ Java_gl4java_GLFuncJauJNI_getNativeVersion ( JNIEnv *env, jobject obj ) } } -/* C2J Parser Version 1.4 Beta: Java program parsed successfully. */ +/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */ diff --git a/CNativeCode/OpenGL_JauJNI12tst_dynfuncs.c b/CNativeCode/OpenGL_JauJNI12tst_dynfuncs.c index 129181f..3c57d01 100644 --- a/CNativeCode/OpenGL_JauJNI12tst_dynfuncs.c +++ b/CNativeCode/OpenGL_JauJNI12tst_dynfuncs.c @@ -83,7 +83,7 @@ Java_gl4java_GLFuncJauJNI_getNativeVersion ( JNIEnv *env, jobject obj ) } /** - * C2J Parser Version 1.4 Beta + * C2J Parser Version 1.5 Beta * Jausoft - Sven Goethel Software Development * Reading from file: gl-proto-auto.orig.h . . . * Destination-Class: gl4java_GLFuncJauJNI ! @@ -26452,4 +26452,4 @@ Java_gl4java_GLFuncJauJNI_getNativeVersion ( JNIEnv *env, jobject obj ) } } -/* C2J Parser Version 1.4 Beta: Java program parsed successfully. */ +/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */ diff --git a/CNativeCode/OpenGL_JauJNI_dynfuncs.c b/CNativeCode/OpenGL_JauJNI_dynfuncs.c index c3d42db..89fd50a 100644 --- a/CNativeCode/OpenGL_JauJNI_dynfuncs.c +++ b/CNativeCode/OpenGL_JauJNI_dynfuncs.c @@ -83,7 +83,7 @@ Java_gl4java_GLFuncJauJNI_getNativeVersion ( JNIEnv *env, jobject obj ) } /** - * C2J Parser Version 1.4 Beta + * C2J Parser Version 1.5 Beta * Jausoft - Sven Goethel Software Development * Reading from file: gl-proto-auto.orig.h . . . * Destination-Class: gl4java_GLFuncJauJNI ! @@ -23655,4 +23655,4 @@ Java_gl4java_GLFuncJauJNI_getNativeVersion ( JNIEnv *env, jobject obj ) } } -/* C2J Parser Version 1.4 Beta: Java program parsed successfully. */ +/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */ diff --git a/CNativeCode/OpenGL_JauJNInf_dynfuncs.c b/CNativeCode/OpenGL_JauJNInf_dynfuncs.c index 455d7df..b29145a 100644 --- a/CNativeCode/OpenGL_JauJNInf_dynfuncs.c +++ b/CNativeCode/OpenGL_JauJNInf_dynfuncs.c @@ -83,7 +83,7 @@ Java_gl4java_GLFuncJauJNInf_getNativeVersion ( JNIEnv *env, jobject obj ) } /** - * C2J Parser Version 1.4 Beta + * C2J Parser Version 1.5 Beta * Jausoft - Sven Goethel Software Development * Reading from file: gl-proto-auto.orig.h . . . * Destination-Class: gl4java_GLFuncJauJNInf ! @@ -23655,4 +23655,4 @@ Java_gl4java_GLFuncJauJNInf_getNativeVersion ( JNIEnv *env, jobject obj ) } } -/* C2J Parser Version 1.4 Beta: Java program parsed successfully. */ +/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */ diff --git a/CNativeCode/OpenGL_JauJNItst_dynfuncs.c b/CNativeCode/OpenGL_JauJNItst_dynfuncs.c index dfd5950..e81039a 100644 --- a/CNativeCode/OpenGL_JauJNItst_dynfuncs.c +++ b/CNativeCode/OpenGL_JauJNItst_dynfuncs.c @@ -83,7 +83,7 @@ Java_gl4java_GLFuncJauJNI_getNativeVersion ( JNIEnv *env, jobject obj ) } /** - * C2J Parser Version 1.4 Beta + * C2J Parser Version 1.5 Beta * Jausoft - Sven Goethel Software Development * Reading from file: gl-proto-auto.orig.h . . . * Destination-Class: gl4java_GLFuncJauJNI ! @@ -26452,4 +26452,4 @@ Java_gl4java_GLFuncJauJNI_getNativeVersion ( JNIEnv *env, jobject obj ) } } -/* C2J Parser Version 1.4 Beta: Java program parsed successfully. */ +/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */ diff --git a/CNativeCode/OpenGL_Win32.c b/CNativeCode/OpenGL_Win32.c index a667ce0..a25b01b 100755 --- a/CNativeCode/OpenGL_Win32.c +++ b/CNativeCode/OpenGL_Win32.c @@ -13,62 +13,51 @@ * September 12, 1997 - Adam King * - Added support for rendering directly into a Canvas ( BIG rewrite ) */ -#ifdef _WIN32_ - #include "winstuff.h" -#endif -#include -#include +/** + * Pointer Semantics of GLContext: + * ============================== + + "displayHandle" := not used + + "pData" := (HDC) + This is original Java-Native Window Handle ! + It is transfered -> "windowHandle" in the beginning, + so if no own created window will be used, "pData" == "windowHandle" ! + + "windowHandle" := (HDC) + note: createOwnWindow is not recognized while creation process .. + + "pixmapHandle" := (HBITMAP) + if("offScreenRenderer" == TRUE) + "pixmapHandle" contains the new BITMAP (by CreateDIBSection)! + "windowHandle" contains the new created OffScreenWindow + (by CreateCompatibleDC)! + else + "pixmapHandle" is unused ! -/* -void gl4java_bind_ext(int verbose); -*/ + "sharedGLContextNative" := (HGLRC) + This is the optional shared GLContext ! -/*-------------------------------------------------------------------------- - * here on in is just regular apple pie C + "glContext" := (HGLRC) + This is THE used GLContext ! */ -#include -#include -#include +#include "OpenGL_Win32_common.h" static jboolean verbose = JNI_FALSE; -// Color Palette handle -static HPALETTE hPalette = NULL; -static HGLRC tempRC; - -// Set Pixel Format function - forward declaration -static void SetDCPixelFormat(HDC hDC, jboolean doubleBuffer, jboolean stereo, jint stencilBits, jboolean offScreenRenderer); -static HPALETTE GetOpenGLPalette(HDC hDC); -static HGLRC get_GC( HDC *hDC, jboolean doubleBuffer, jboolean stereo, jint stencilBits, HGLRC shareWith, jboolean offScreenRenderer, - int width, int height, HBITMAP *pix); - -static int PixelFormatDescriptorFromDc( HDC Dc, PIXELFORMATDESCRIPTOR *Pfd ); -static const char * GetTextualPixelFormatByHDC(HDC hdc); -static const char * GetTextualPixelFormatByPFD(PIXELFORMATDESCRIPTOR *ppfd, int format); - -/* testJavaGLTypes does important implementation plattformspecific checks: - * - * o do fit X11-Vars in jint (because GLContext stores 'em like that) - * o do fit the JNI <-> GL Variables-Type Mapping - * o IF ERROR OR VERBOSE -> DUMP JNI,GL Type-Length - */ -jboolean testJavaGLTypes(jboolean verbose); - -/* testX11Java does important implementation plattformspecific checks: - * - * o do fit X11-Vars in jint (because GLContext stores 'em like that) - */ -jboolean testWin32Java(void); - -static void setupDIB(HDC hDCOrig, HDC hDC, HBITMAP * hBitmap, int width, int height); -static void resizeDIB(HDC hDC, HBITMAP *hOldBitmap, HBITMAP *hBitmap); -static void setupPalette(HDC hDC); - +JNIEXPORT jboolean JNICALL +Java_gl4java_GLContext_useJAWT( JNIEnv *env, jobject obj ) +{ + (void)env; + (void)obj; + return JNI_FALSE; +} JNIEXPORT jboolean JNICALL -Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj ) +Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj, + jobject canvas) { jboolean ret = JNI_TRUE; @@ -90,13 +79,15 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj ) jint jaccumSize=0; HDC thisWin; HGLRC gc; - jint pData=0; + HDC pData=0; HGLRC shareWith=NULL; jint jcreatewinw = 0, jcreatewinh = 0; HBITMAP pix; PIXELFORMATDESCRIPTOR pfd; + (void) canvas; + cls = (*env)->GetObjectClass(env, obj); if(cls==0) { @@ -120,20 +111,21 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj ) if(JNI_TRUE==verbose) { - fprintf(stderr, "sizes:\n jint=%d\n HGLRC=%d\n HDC=%d\n", - sizeof(jint), sizeof(HGLRC), sizeof(HDC) ); + fprintf(stderr, "sizes:\n jlong=%d\n HGLRC=%d\n HDC=%d\n", + sizeof(jlong), sizeof(HGLRC), sizeof(HDC) ); fflush(stderr); } - /* FIRST OF ALL CHECK IF A NATIVE POINTER OR WIN-TYPE FITS IN ´jint´ */ + /* FIRST OF ALL CHECK IF A NATIVE POINTER OR WIN-TYPE FITS IN ´jlong´ */ ret = testWin32Java(); ret = testJavaGLTypes(verbose); if(ret==JNI_TRUE) { - fpData = (*env)->GetFieldID(env, cls, "pData", "I"); + fpData = (*env)->GetFieldID(env, cls, "pData", "J"); if (fpData == 0) ret= JNI_FALSE; - else pData =(*env)->GetIntField(env, obj, fpData); + else pData = (HDC) + ( (PointerHolder)(*env)->GetLongField(env, obj, fpData)); } if(JNI_TRUE==verbose) { @@ -141,12 +133,12 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj ) } if(ret==JNI_TRUE) { - fwindowHandle = (*env)->GetFieldID(env, cls, "windowHandle", "I"); + fwindowHandle = (*env)->GetFieldID(env, cls, "windowHandle", "J"); if (fwindowHandle == 0) ret= JNI_FALSE; } if(ret==JNI_TRUE) { - fglContext=(*env)->GetFieldID(env, cls, "glContext", "I"); + fglContext=(*env)->GetFieldID(env, cls, "glContext", "J"); if (fglContext == 0) ret= JNI_FALSE; } @@ -194,13 +186,14 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj ) } if(ret==JNI_TRUE) { - fshareWith = (*env)->GetFieldID(env, cls, "sharedGLContextNative", "I"); + fshareWith = (*env)->GetFieldID(env, cls, "sharedGLContextNative", "J"); if (fshareWith == 0) ret= JNI_FALSE; - else shareWith = (HGLRC) (*env)->GetIntField(env, obj, fshareWith); + else shareWith = (HGLRC) + ( (PointerHolder)(*env)->GetLongField(env, obj, fshareWith)); } if(ret==JNI_TRUE) { - fpixmapHandle = (*env)->GetFieldID(env, cls, "pixmapHandle", "I"); + fpixmapHandle = (*env)->GetFieldID(env, cls, "pixmapHandle", "J"); if (fpixmapHandle == 0) ret= JNI_FALSE; } @@ -234,7 +227,7 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj ) /* get the graphics context for this widget */ if( (gc = get_GC( &thisWin, jdoubleBuffer, jstereoView, jstencilBits, shareWith, - joffScreenRenderer, jcreatewinw, jcreatewinh, &pix)) == 0 ) + joffScreenRenderer, jcreatewinw, jcreatewinh, &pix, verbose)) == 0 ) { printf( "getGC error" ); return JNI_FALSE; @@ -262,21 +255,22 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj ) } if(ret==JNI_TRUE && fwindowHandle!=0) { - (*env)->SetIntField(env, obj, fwindowHandle, (jint)thisWin); + (*env)->SetLongField(env, obj, fwindowHandle, + (jlong)((PointerHolder)thisWin)); if(JNI_TRUE==verbose) fprintf(stderr, "go and set windowHandle thisWin : %d; 0x%X\n", (int)thisWin, (int)thisWin); } if(ret==JNI_TRUE && fpixmapHandle!=0) { - (*env)->SetIntField(env, obj, fpixmapHandle, (jint)pix); + (*env)->SetLongField(env, obj, fpixmapHandle, (jlong)((PointerHolder)pix)); if(JNI_TRUE==verbose) fprintf(stderr, "go and set pixmapHandle pix: %d; 0x%X\n", (int)pix, (int)pix); } if(ret==JNI_TRUE && fglContext !=0 ) { - (*env)->SetIntField(env, obj, fglContext, (jint)gc); + (*env)->SetLongField(env, obj, fglContext, (jlong)((PointerHolder)gc)); if(JNI_TRUE==verbose) fprintf(stderr, "go and set gc : %d, 0x%X\n", (int)gc, (int)gc); @@ -291,12 +285,15 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj ) JNIEXPORT jboolean JNICALL Java_gl4java_GLContext_gljMakeCurrentNative( JNIEnv *env, jobject obj, - jint disp, - jint thisWin, - jint glContext) + jobject canvas, + jlong disp, + jlong thisWin, + jlong glContext) { jboolean ret = JNI_TRUE; + (void)canvas; + if( !thisWin ) { return JNI_FALSE; @@ -307,7 +304,8 @@ Java_gl4java_GLContext_gljMakeCurrentNative( JNIEnv *env, jobject obj, return JNI_FALSE; } - if ( ret==JNI_TRUE && !wglMakeCurrent((HDC)thisWin, (HGLRC)glContext) ) + if ( ret==JNI_TRUE && !wglMakeCurrent((HDC)((PointerHolder)thisWin), + (HGLRC)((PointerHolder)glContext)) ) { return JNI_FALSE; } @@ -316,14 +314,16 @@ Java_gl4java_GLContext_gljMakeCurrentNative( JNIEnv *env, jobject obj, JNIEXPORT jboolean JNICALL Java_gl4java_GLContext_gljFreeNative( JNIEnv *env, jobject obj, - jint disp, - jint thisWin, - jint glContext + jobject canvas, + jlong disp, + jlong thisWin, + jlong glContext ) { (void)thisWin; (void)glContext; (void)disp; + (void)canvas; if ( ! wglMakeCurrent( NULL, NULL ) ) { @@ -335,7 +335,8 @@ Java_gl4java_GLContext_gljFreeNative( JNIEnv *env, jobject obj, } JNIEXPORT jboolean JNICALL -Java_gl4java_GLContext_gljDestroyNative( JNIEnv *env, jobject obj ) +Java_gl4java_GLContext_gljDestroyNative( JNIEnv *env, jobject obj, + jobject canvas) { jboolean ret = JNI_TRUE; @@ -343,12 +344,16 @@ Java_gl4java_GLContext_gljDestroyNative( JNIEnv *env, jobject obj ) jfieldID fwindowHandle=0, fpixmapHandle; jfieldID fglContext=0; jfieldID foffScreenRenderer; + jfieldID fownwind=0; + jboolean jownwind = JNI_FALSE ; jboolean joffScreenRenderer=JNI_FALSE; HBITMAP pix; HDC thisWin; HGLRC gc; + (void)canvas; + cls = (*env)->GetObjectClass(env, obj); if(cls==0) { @@ -356,22 +361,25 @@ Java_gl4java_GLContext_gljDestroyNative( JNIEnv *env, jobject obj ) } if(ret==JNI_TRUE) { - fwindowHandle = (*env)->GetFieldID(env, cls, "windowHandle", "I"); + fwindowHandle = (*env)->GetFieldID(env, cls, "windowHandle", "J"); if (fwindowHandle == 0) ret= JNI_FALSE; - else thisWin =(HDC) (*env)->GetIntField(env, obj, fwindowHandle); + else thisWin =(HDC) + ((PointerHolder)(*env)->GetLongField(env, obj, fwindowHandle)); } if(ret==JNI_TRUE) { - fglContext=(*env)->GetFieldID(env, cls, "glContext", "I"); + fglContext=(*env)->GetFieldID(env, cls, "glContext", "J"); if (fglContext == 0) ret= JNI_FALSE; - else gc =(HGLRC)(*env)->GetIntField(env, obj, fglContext); + else gc =(HGLRC) + ((PointerHolder)(*env)->GetLongField(env, obj, fglContext)); } if(ret==JNI_TRUE) { - fpixmapHandle = (*env)->GetFieldID(env, cls, "pixmapHandle", "I"); + fpixmapHandle = (*env)->GetFieldID(env, cls, "pixmapHandle", "J"); if (fpixmapHandle == 0) ret= JNI_FALSE; - else pix =(HBITMAP)(*env)->GetIntField(env, obj, fpixmapHandle); + else pix =(HBITMAP) + ((PointerHolder)(*env)->GetLongField(env, obj, fpixmapHandle)); } if(ret==JNI_TRUE) { @@ -381,6 +389,12 @@ Java_gl4java_GLContext_gljDestroyNative( JNIEnv *env, jobject obj ) else joffScreenRenderer =(*env)->GetBooleanField(env, obj, foffScreenRenderer); } + if(ret==JNI_TRUE) { + fownwind = (*env)->GetFieldID(env, cls, "createOwnWindow", "Z"); + if (fownwind == 0) ret= JNI_FALSE; + else jownwind =(*env)->GetBooleanField(env, obj, fownwind); + } + if(ret==JNI_TRUE) { @@ -405,12 +419,13 @@ Java_gl4java_GLContext_gljDestroyNative( JNIEnv *env, jobject obj ) if(joffScreenRenderer==JNI_TRUE) { - if(pix!=0) + if(pix!=0 && joffScreenRenderer==JNI_TRUE) { DeleteObject(pix); pix=0; } - if(thisWin!=0) + if(thisWin!=0 && + (joffScreenRenderer || jownwind) ) { DeleteDC(thisWin); thisWin=0; @@ -425,16 +440,20 @@ Java_gl4java_GLContext_gljDestroyNative( JNIEnv *env, jobject obj ) } if(ret==JNI_TRUE && fwindowHandle!=0) { - (*env)->SetIntField(env, obj, fwindowHandle, (jint)thisWin); + (*env)->SetLongField(env, obj, fwindowHandle, (jlong)((PointerHolder)thisWin)); } if(ret==JNI_TRUE && fglContext) { - (*env)->SetIntField(env, obj, fglContext, (jint)gc); + (*env)->SetLongField(env, obj, fglContext, (jlong)((PointerHolder)gc)); } if(ret==JNI_TRUE && fpixmapHandle!=0) { - (*env)->SetIntField(env, obj, fpixmapHandle, (jint)pix); + (*env)->SetLongField(env, obj, fpixmapHandle, (jlong)((PointerHolder)pix)); + } + + if(ret==JNI_TRUE && fownwind) { + (*env)->SetBooleanField(env, obj, fownwind, jownwind); } return ret; @@ -442,9 +461,9 @@ Java_gl4java_GLContext_gljDestroyNative( JNIEnv *env, jobject obj ) JNIEXPORT jboolean JNICALL Java_gl4java_GLContext_gljSwapNative( JNIEnv *env, jobject obj, - jint disp, - jint thisWin, - jint glContext, + jlong disp, + jlong thisWin, + jlong glContext, jboolean doubleBuffer ) { @@ -461,7 +480,7 @@ Java_gl4java_GLContext_gljSwapNative( JNIEnv *env, jobject obj, if( doubleBuffer==JNI_TRUE ) { - if( SwapBuffers( (HDC)thisWin ) == FALSE ) + if( SwapBuffers( (HDC)((PointerHolder)thisWin) ) == FALSE ) { /* Error in Win2000 implementation :o) * printf( "Error in swap buffer!\n" ); @@ -474,637 +493,11 @@ Java_gl4java_GLContext_gljSwapNative( JNIEnv *env, jobject obj, return ret; } -static HGLRC get_GC( HDC * hDC, jboolean doubleBuffer, jboolean stereo, jint stencilBits, HGLRC shareWith, jboolean offScreenRenderer, - int width, int height, HBITMAP *pix) - -{ - const char * text=0; - HDC hDCOrig = 0; - - - if( *hDC == 0 ) - printf( "get_GC: Error, HDC is zero\n"); - - // Select the pixel format - if(offScreenRenderer) - { - hDCOrig = *hDC; - *hDC = CreateCompatibleDC(hDCOrig); - // setupDIB(*hDC, pix, width, height); - setupDIB(hDCOrig, *hDC, pix, width, height); - /* SetDCPixelFormat(hDCOffScr, doubleBuffer, stereo, stencilBits, offScreenRenderer); */ - /* setupPalette(hDC); USE MY PROC */ - } - - SetDCPixelFormat(*hDC, doubleBuffer, stereo, stencilBits, offScreenRenderer); - - // Create palette if needed - hPalette = GetOpenGLPalette(*hDC); - - tempRC = wglCreateContext( *hDC ); - - if(verbose==JNI_TRUE) - { - fprintf(stderr,"\n\nPIXELFORMAT OF GL-Context SETTINGS:\n"); - text=GetTextualPixelFormatByHDC(*hDC); - fprintf(stderr,text); - } - - /* check if the context could be created */ - if( tempRC == NULL ) { - fprintf(stderr, "getGC context could NOT be created \n"); - return( 0 ); - } - - /* associated the context with the X window */ - if( wglMakeCurrent( *hDC, tempRC ) == FALSE) { - fprintf(stderr,"wglMakeCurrent(%d,%d) failed on new context!!!\n",(int)*hDC,(int)tempRC); - fprintf(stderr,"Error code = %d\n",(int)GetLastError()); - wglMakeCurrent(NULL, NULL); - wglDeleteContext( tempRC ); - return( 0 ); - } - - if(shareWith!=NULL && wglShareLists(shareWith, tempRC)==FALSE) - { - fprintf(stderr,"\nERROR: Could not share lists between the new and the given GLContext (Win32Native)!\n"); - fprintf(stderr,"Error code = %d\n",(int)GetLastError()); - wglMakeCurrent(NULL, NULL); - wglDeleteContext( tempRC ); - return( 0 ); - } - - if(JNI_TRUE==verbose) - printf( "HGLRC (glContext) created: %d\n", tempRC ); - - return tempRC; -} - -// Select the pixel format for a given device context -static void SetDCPixelFormat(HDC hDC, jboolean doubleBuffer, jboolean stereo, jint stencilBits, jboolean offScreenRenderer) -{ - int nPixelFormat=0; - const char * text=0; - - static PIXELFORMATDESCRIPTOR pfd = { - sizeof(PIXELFORMATDESCRIPTOR), // Size of this structure - 1, // Version of this structure - 0, // will be defined later !!!! - PFD_TYPE_RGBA, // RGBA Color mode - 24, // Want 24bit color - 0,0,0,0,0,0, // Not used to select mode - 0,0, // Not used to select mode - 0,0,0,0,0, // Not used to select mode - 32, // Size of depth buffer - 0, // Not used to select mode - 0, // Not used to select mode - PFD_MAIN_PLANE, // Draw in main plane - 0, // Not used to select mode - 0,0,0 }; // Not used to select mode - - - // customize dw_flags - DWORD dw_flags = PFD_SUPPORT_OPENGL | PFD_GENERIC_ACCELERATED; // Support accelerated OpenGL calls in window - - if(offScreenRenderer) - dw_flags |= PFD_DRAW_TO_BITMAP; // Draw to Bitmap - else - dw_flags |= PFD_DRAW_TO_WINDOW; // Draw to Window (not to bitmap) - - - if(doubleBuffer==JNI_TRUE) - dw_flags |= PFD_DOUBLEBUFFER ; // Double buffered is optional - - if(stereo==JNI_TRUE) - dw_flags |= PFD_STEREO ; // Stereo is optional - - pfd.dwFlags = dw_flags; - - pfd.cColorBits = GetDeviceCaps(hDC, BITSPIXEL); - - if(stencilBits>0) - pfd.cStencilBits = (BYTE) stencilBits; - - if(verbose==JNI_TRUE) - { - fprintf(stderr,"\n\nUSER CHOOSED PIXELFORMAT (TRYING):\n"); - text=GetTextualPixelFormatByPFD(&pfd, 0); - fprintf(stderr,text); - } - - // Choose a pixel format that best matches that described in pfd - if( hDC == 0 ) - printf( "SetDCPixelFormat: Error, no HDC-Contex is given\n"); - else - nPixelFormat = ChoosePixelFormat(hDC, &pfd); - - if( nPixelFormat == 0 ) - printf( "SetDCPixelFormat: Error with PixelFormat\n" ); - - // Set the pixel format for the device context - if( SetPixelFormat(hDC, nPixelFormat, &pfd) == FALSE) - printf( "setpixel failed\n" ); -} - - -// If necessary, creates a 3-3-2 palette for the device context listed. -static HPALETTE GetOpenGLPalette(HDC hDC) -{ - HPALETTE hRetPal = NULL; // Handle to palette to be created - PIXELFORMATDESCRIPTOR pfd; // Pixel Format Descriptor - LOGPALETTE *pPal; // Pointer to memory for logical palette - int nPixelFormat; // Pixel format index - int nColors; // Number of entries in palette - int i; // Counting variable - BYTE RedRange,GreenRange,BlueRange; - // Range for each color entry (7,7,and 3) - - - // Get the pixel format index and retrieve the pixel format description - nPixelFormat = GetPixelFormat(hDC); - DescribePixelFormat(hDC, nPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd); - - // Does this pixel format require a palette? If not, do not create a - // palette and just return NULL - if(!(pfd.dwFlags & PFD_NEED_PALETTE)) - return NULL; - - // Number of entries in palette. 8 bits yeilds 256 entries - nColors = 1 << pfd.cColorBits; - - // Allocate space for a logical palette structure plus all the palette entries - pPal = (LOGPALETTE*)malloc(sizeof(LOGPALETTE) + nColors*sizeof(PALETTEENTRY)); - - // Fill in palette header - pPal->palVersion = 0x300; // Windows 3.0 - pPal->palNumEntries = nColors; // table size - - // Build mask of all 1's. This creates a number represented by having - // the low order x bits set, where x = pfd.cRedBits, pfd.cGreenBits, and - // pfd.cBlueBits. - RedRange = (1 << pfd.cRedBits) -1; - GreenRange = (1 << pfd.cGreenBits) - 1; - BlueRange = (1 << pfd.cBlueBits) -1; - - // Loop through all the palette entries - for(i = 0; i < nColors; i++) - { - // Fill in the 8-bit equivalents for each component - pPal->palPalEntry[i].peRed = (i >> pfd.cRedShift) & RedRange; - pPal->palPalEntry[i].peRed = (unsigned char)( - (double) pPal->palPalEntry[i].peRed * 255.0 / RedRange); - - pPal->palPalEntry[i].peGreen = (i >> pfd.cGreenShift) & GreenRange; - pPal->palPalEntry[i].peGreen = (unsigned char)( - (double)pPal->palPalEntry[i].peGreen * 255.0 / GreenRange); - - pPal->palPalEntry[i].peBlue = (i >> pfd.cBlueShift) & BlueRange; - pPal->palPalEntry[i].peBlue = (unsigned char)( - (double)pPal->palPalEntry[i].peBlue * 255.0 / BlueRange); - - pPal->palPalEntry[i].peFlags = (unsigned char) NULL; - } - - - // Create the palette - hRetPal = CreatePalette(pPal); - - // Go ahead and select and realize the palette for this device context - SelectPalette(hDC,hRetPal,FALSE); - RealizePalette(hDC); - - // Free the memory used for the logical palette structure - free(pPal); - - // Return the handle to the new palette - return hRetPal; -} - - JNIEXPORT void JNICALL Java_gl4java_GLContext_gljResizeNative( JNIEnv *env, jobject obj, jboolean isOwnWindow, - jint disp, jint thisWin, - jint width, jint height) + jlong disp, jlong thisWin, + jlong width, jlong height) { } -static jboolean testWin32Java() -{ - jboolean ret=JNI_TRUE; - - /* NON DEPENDENCE CHECKS */ - - /* FIRST OF ALL CHECK IF A NATIVE POINTER OR WIN32-TYPE FITS IN ´jint´ */ - - if( sizeof(jint) < sizeof(int *) ) - { - fprintf(stderr,"(int *) fits not in jint\n"); - ret = JNI_FALSE; - } - - if( sizeof(jint) < sizeof(HDC) ) - { - fprintf(stderr,"HDC fits not in jint\n"); - ret = JNI_FALSE; - } - - if( sizeof(jint) < sizeof(HGLRC) ) - { - fprintf(stderr,"HGLRC fits not in jint\n"); - ret = JNI_FALSE; - } - - if(ret==JNI_FALSE) - { - fflush(stderr); - } - - return ret; -} - - -static void -PrintMessage( const char *Format, ... ) -{ - va_list ArgList; - char Buffer[256]; - - va_start(ArgList, Format); - vsprintf(Buffer, Format, ArgList); - va_end(ArgList); - - fprintf(stderr, Buffer); -} - - -static int -PixelFormatDescriptorFromDc( HDC Dc, PIXELFORMATDESCRIPTOR *Pfd ) -{ - int PfdIndex; - - if ( 0 < (PfdIndex = GetPixelFormat( Dc )) ) - { - if ( 0 < DescribePixelFormat( Dc, PfdIndex, sizeof(*Pfd), Pfd ) ) - { - return(PfdIndex); - } - else - { - PrintMessage("Could not get a description of pixel format %d\n", - PfdIndex ); - } - } - else - { - PrintMessage("Could not get pixel format for Dc 0x%08lX\n", Dc ); - } - return( 0 ); -} - - -static const char * GetTextualPixelFormatByPFD(PIXELFORMATDESCRIPTOR *ppfd, int format) -{ - static char buffer[2000]; - char line[200]; - - sprintf(buffer,"Pixel format %d\n", format); - sprintf(line," dwFlags - 0x%x\n", ppfd->dwFlags); - if (ppfd->dwFlags & PFD_DOUBLEBUFFER) { strcat(buffer, line); sprintf(line,"\tPFD_DOUBLEBUFFER\n "); } - if (ppfd->dwFlags & PFD_STEREO) { strcat(buffer, line); sprintf(line,"\tPFD_STEREO\n "); } - if (ppfd->dwFlags & PFD_DRAW_TO_WINDOW) { strcat(buffer, line); sprintf(line,"\tPFD_DRAW_TO_WINDOW\n "); } - if (ppfd->dwFlags & PFD_DRAW_TO_BITMAP) { strcat(buffer, line); sprintf(line,"\tPFD_DRAW_TO_BITMAP\n "); } - if (ppfd->dwFlags & PFD_SUPPORT_GDI) { strcat(buffer, line); sprintf(line,"\tPFD_SUPPORT_GDI\n "); } - if (ppfd->dwFlags & PFD_SUPPORT_OPENGL) { strcat(buffer, line); sprintf(line,"\tPFD_SUPPORT_OPENGL\n "); } - if (ppfd->dwFlags & PFD_GENERIC_ACCELERATED) { strcat(buffer, line); sprintf(line,"\tPFD_GENERIC_ACCELERATED\n "); } - if (ppfd->dwFlags & PFD_GENERIC_FORMAT) { strcat(buffer, line); sprintf(line,"\tPFD_GENERIC_FORMAT\n "); } - if (ppfd->dwFlags & PFD_NEED_PALETTE) { strcat(buffer, line); sprintf(line,"\tPFD_NEED_PALETTE\n "); } - if (ppfd->dwFlags & PFD_NEED_SYSTEM_PALETTE) { strcat(buffer, line); sprintf(line,"\tPFD_NEED_SYSTEM_PALETTE\n "); } - strcat(buffer, line); sprintf(line,"\n"); - strcat(buffer, line); sprintf(line," iPixelType - %d\n", ppfd->iPixelType); - if (ppfd->iPixelType == PFD_TYPE_RGBA) { strcat(buffer, line); sprintf(line,"\tPGD_TYPE_RGBA\n"); } - if (ppfd->iPixelType == PFD_TYPE_COLORINDEX) { strcat(buffer, line); sprintf(line,"\tPGD_TYPE_COLORINDEX\n"); } - strcat(buffer, line); sprintf(line," cColorBits - %d\n", ppfd->cColorBits); - strcat(buffer, line); sprintf(line," cRedBits - %d\n", ppfd->cRedBits); - strcat(buffer, line); sprintf(line," cRedShift - %d\n", ppfd->cRedShift); - strcat(buffer, line); sprintf(line," cGreenBits - %d\n", ppfd->cGreenBits); - strcat(buffer, line); sprintf(line," cGreenShift - %d\n", ppfd->cGreenShift); - strcat(buffer, line); sprintf(line," cBlueBits - %d\n", ppfd->cBlueBits); - strcat(buffer, line); sprintf(line," cBlueShift - %d\n", ppfd->cBlueShift); - strcat(buffer, line); sprintf(line," cAlphaBits - %d\n", ppfd->cAlphaBits); - strcat(buffer, line); sprintf(line," cAlphaShift - 0x%x\n", ppfd->cAlphaShift); - strcat(buffer, line); sprintf(line," cAccumBits - %d\n", ppfd->cAccumBits); - strcat(buffer, line); sprintf(line," cAccumRedBits - %d\n", ppfd->cAccumRedBits); - strcat(buffer, line); sprintf(line," cAccumGreenBits - %d\n", ppfd->cAccumGreenBits); - strcat(buffer, line); sprintf(line," cAccumBlueBits - %d\n", ppfd->cAccumBlueBits); - strcat(buffer, line); sprintf(line," cAccumAlphaBits - %d\n", ppfd->cAccumAlphaBits); - strcat(buffer, line); sprintf(line," cDepthBits - %d\n", ppfd->cDepthBits); - strcat(buffer, line); sprintf(line," cStencilBits - %d\n", ppfd->cStencilBits); - strcat(buffer, line); sprintf(line," cAuxBuffers - %d\n", ppfd->cAuxBuffers); - strcat(buffer, line); sprintf(line," iLayerType - %d\n", ppfd->iLayerType); - strcat(buffer, line); sprintf(line," bReserved - %d\n", ppfd->bReserved); - strcat(buffer, line); sprintf(line," dwLayerMask - 0x%x\n", ppfd->dwLayerMask); - strcat(buffer, line); sprintf(line," dwVisibleMask - 0x%x\n", ppfd->dwVisibleMask); - strcat(buffer, line); sprintf(line," dwDamageMask - 0x%x\n", ppfd->dwDamageMask); - strcat(buffer, line); - return buffer; -} - -static const char * GetTextualPixelFormatByHDC(HDC hdc) -{ - PIXELFORMATDESCRIPTOR pfd, *ppfd; - int format; - - ppfd = &pfd; - format = PixelFormatDescriptorFromDc( hdc, ppfd ); - - return GetTextualPixelFormatByPFD(ppfd, format); -} - -/*****************************************************************/ - -/* Struct used to manage color ramps */ -struct colorIndexState { - GLfloat amb[3]; /* ambient color / bottom of ramp */ - GLfloat diff[3]; /* diffuse color / middle of ramp */ - GLfloat spec[3]; /* specular color / top of ramp */ - GLfloat ratio; /* ratio of diffuse to specular in ramp */ - GLint indexes[3]; /* where ramp was placed in palette */ -}; -#define NUM_COLORS (sizeof(colors) / sizeof(colors[0])) -struct colorIndexState colors[] = { - { - { 0.0F, 0.0F, 0.0F }, - { 0.1F, 0.6F, 0.3F }, - { 1.0F, 1.0F, 1.0F }, - 0.75F, { 0, 0, 0 }, - }, - { - { 0.0F, 0.0F, 0.0F }, - { 0.0F, 0.2F, 0.5F }, - { 1.0F, 1.0F, 1.0F }, - 0.75F, { 0, 0, 0 }, - }, - { - { 0.0F, 0.05F, 0.05F }, - { 0.6F, 0.0F, 0.8F }, - { 1.0F, 1.0F, 1.0F }, - 0.75F, { 0, 0, 0 }, - }, -}; - - -static void -setupDIB(HDC hDCOrig, HDC hDC, HBITMAP * hBitmap, int width, int height) -{ - BITMAPINFO *bmInfo; - BITMAPINFOHEADER *bmHeader; - UINT usage; - VOID *base; - int bmiSize; - int bitsPerPixel; - HBITMAP hOldBitmap=0; - - bmiSize = sizeof(*bmInfo); - bitsPerPixel = GetDeviceCaps(hDC, BITSPIXEL); - - switch (bitsPerPixel) { - case 8: - // bmiColors is 256 WORD palette indices - bmiSize += (256 * sizeof(WORD)) - sizeof(RGBQUAD); - break; - case 16: - // bmiColors is 3 WORD component masks - bmiSize += (3 * sizeof(DWORD)) - sizeof(RGBQUAD); - break; - case 24: - case 32: - default: - // bmiColors not used - break; - } - - bmInfo = (BITMAPINFO *) calloc(1, bmiSize); - bmHeader = &bmInfo->bmiHeader; - - bmHeader->biSize = sizeof(*bmHeader); - bmHeader->biWidth = width; - bmHeader->biHeight = height; - bmHeader->biPlanes = 1; // must be 1 - bmHeader->biBitCount = bitsPerPixel; - bmHeader->biXPelsPerMeter = 0; - bmHeader->biYPelsPerMeter = 0; - bmHeader->biClrUsed = 0; // all are used - bmHeader->biClrImportant = 0; // all are important - - switch (bitsPerPixel) { - case 8: - bmHeader->biCompression = BI_RGB; - bmHeader->biSizeImage = 0; - usage = DIB_PAL_COLORS; - // bmiColors is 256 WORD palette indices - { - WORD *palIndex = (WORD *) &bmInfo->bmiColors[0]; - int i; - - for (i=0; i<256; i++) { - palIndex[i] = i; - } - } - break; - case 16: - bmHeader->biCompression = BI_RGB; - bmHeader->biSizeImage = 0; - usage = DIB_RGB_COLORS; - // bmiColors is 3 WORD component masks - { - DWORD *compMask = (DWORD *) &bmInfo->bmiColors[0]; - - compMask[0] = 0xF800; - compMask[1] = 0x07E0; - compMask[2] = 0x001F; - } - break; - case 24: - case 32: - default: - bmHeader->biCompression = BI_RGB; - bmHeader->biSizeImage = 0; - usage = DIB_RGB_COLORS; - // bmiColors not used - break; - } - - *hBitmap = CreateDIBSection(hDC, bmInfo, usage, &base, NULL, 0); - if (*hBitmap == NULL) { - (void) MessageBox(WindowFromDC(hDC), - "Failed to create DIBSection.", - "OpenGL application error", - MB_ICONERROR | MB_OK); - exit(1); - } - - hOldBitmap = SelectObject(hDC, *hBitmap); - if(hOldBitmap!=0) - DeleteObject(hOldBitmap); - - free(bmInfo); -} - - -/* -static void -setupDIB(HDC hDCOrig, HDC hDC, HBITMAP * hBitmap, int width, int height) -{ - HBITMAP hOldBitmap=0; - - *hBitmap = CreateCompatibleBitmap( hDCOrig, width, height ); - if (*hBitmap == NULL) { - fprintf(stderr,"Failed to create CreateCompatibleBitmap! \n"); - fflush(stderr); - return; - } - - hOldBitmap = SelectObject(hDC, *hBitmap); - if(hOldBitmap!=0) - DeleteObject(hOldBitmap); -} -*/ - - -static void resizeDIB(HDC hDC, HBITMAP *hOldBitmap, HBITMAP *hBitmap) -{ - /* - SelectObject(hDC, *hOldBitmap); - DeleteObject(*hBitmap); - setupDIB(hDC, hBitmap); - */ -} - -static void setupPalette(HDC hDC) -{ - PIXELFORMATDESCRIPTOR pfd; - LOGPALETTE* pPal; - int pixelFormat = GetPixelFormat(hDC); - int paletteSize; - - DescribePixelFormat(hDC, pixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd); - - /* - ** Determine if a palette is needed and if so what size. - */ - if (pfd.dwFlags & PFD_NEED_PALETTE) { - paletteSize = 1 << pfd.cColorBits; - } else if (pfd.iPixelType == PFD_TYPE_COLORINDEX) { - paletteSize = 4096; - } else { - return; - } - - pPal = (LOGPALETTE*) - malloc(sizeof(LOGPALETTE) + paletteSize * sizeof(PALETTEENTRY)); - pPal->palVersion = 0x300; - pPal->palNumEntries = paletteSize; - - if (pfd.iPixelType == PFD_TYPE_RGBA) { - /* - ** Fill the logical paletee with RGB color ramps - */ - int redMask = (1 << pfd.cRedBits) - 1; - int greenMask = (1 << pfd.cGreenBits) - 1; - int blueMask = (1 << pfd.cBlueBits) - 1; - int i; - - for (i=0; ipalPalEntry[i].peRed = - (((i >> pfd.cRedShift) & redMask) * 255) / redMask; - pPal->palPalEntry[i].peGreen = - (((i >> pfd.cGreenShift) & greenMask) * 255) / greenMask; - pPal->palPalEntry[i].peBlue = - (((i >> pfd.cBlueShift) & blueMask) * 255) / blueMask; - pPal->palPalEntry[i].peFlags = 0; - } - } else { - /* - ** Fill the logical palette with color ramps. - ** - ** Set up the logical palette so that it can be realized - ** into the system palette as an identity palette. - ** - ** 1) The default static entries should be present and at the right - ** location. The easiest way to do this is to grab them from - ** the current system palette. - ** - ** 2) All non-static entries should be initialized to unique values. - ** The easiest way to do this is to ensure that all of the non-static - ** entries have the PC_NOCOLLAPSE flag bit set. - */ - int numRamps = NUM_COLORS; - int rampSize = (paletteSize - 20) / numRamps; - int extra = (paletteSize - 20) - (numRamps * rampSize); - int i, r; - - /* - ** Initialize static entries by copying them from the - ** current system palette. - */ - GetSystemPaletteEntries(hDC, 0, paletteSize, &pPal->palPalEntry[0]); - - /* - ** Fill in non-static entries with desired colors. - */ - for (r=0; rpalPalEntry[rampBase]; - int diffSize = (int) (rampSize * colors[r].ratio); - int specSize = rampSize - diffSize; - - for (i=0; ipalPalEntry[index]; - - pe->peRed = (BYTE) 0; - pe->peGreen = (BYTE) 0; - pe->peBlue = (BYTE) 0; - pe->peFlags = PC_NOCOLLAPSE; - } - } - - hPalette = CreatePalette(pPal); - free(pPal); - - if (hPalette) { - SelectPalette(hDC, hPalette, FALSE); - RealizePalette(hDC); - } -} - - diff --git a/CNativeCode/OpenGL_Win32_JDirect.c b/CNativeCode/OpenGL_Win32_JDirect.c index 6b46874..a97b7c5 100755 --- a/CNativeCode/OpenGL_Win32_JDirect.c +++ b/CNativeCode/OpenGL_Win32_JDirect.c @@ -22,21 +22,7 @@ * The other procs are implemented with JNI ! */ -#ifdef _WIN32_ - #include "winstuff.h" -#endif - -#include "GL/gl.h" - -#include - -/*-------------------------------------------------------------------------- - * here on in is just regular apple pie C - */ - -#include -#include -#include +#include "OpenGL_misc.h" #define CLASS_NAME "GL4JavaOglRenderingWindowClass" #define WINDOW_NAME "GL4JavaOglRenderingWindow" @@ -107,10 +93,10 @@ __declspec(dllexport) void OGLWindowMsgPumpJDirect(void) } } /* OGLWindowMsgPumpJDirect() */ -__declspec(dllexport) void moveOGLWindowNativeJDirect(int _hdc, int x, int y, int width, int height) +__declspec(dllexport) void moveOGLWindowNativeJDirect(long _hdc, int x, int y, int width, int height) { HWND hwnd, hwndParent; - HDC hdc = (HDC)_hdc; + HDC hdc = (HDC)((PointerHolder)_hdc); RECT rect; int parentx = 0, parenty = 0; int insetsleft = 0, insetstop = 0; @@ -137,7 +123,7 @@ __declspec(dllexport) void moveOGLWindowNativeJDirect(int _hdc, int x, int y, in } } /* moveOGLWindowNativeJDirect() */ -__declspec(dllexport) int createOGLWindowNativeJDirect(int hwndParent, int x, int y, int width, int height) +__declspec(dllexport) long createOGLWindowNativeJDirect(long hwndParent, int x, int y, int width, int height) { HWND hwnd; HDC hdc; @@ -150,7 +136,7 @@ __declspec(dllexport) int createOGLWindowNativeJDirect(int hwndParent, int x, in y, width, height, - (HWND)hwndParent, + (HWND)((PointerHolder)hwndParent), NULL, NULL, NULL)) == NULL) @@ -160,14 +146,14 @@ __declspec(dllexport) int createOGLWindowNativeJDirect(int hwndParent, int x, in return(0); } hdc = GetDC(hwnd); - moveOGLWindowNativeJDirect((int)hdc, x, y, width, height); - return (int)hdc; + moveOGLWindowNativeJDirect((long)((PointerHolder)hdc), x, y, width, height); + return (long)((PointerHolder)hdc); } /* createOGLWindowNativeJDirect() */ -__declspec(dllexport) void destroyOGLWindowNativeJDirect(int _hdc) +__declspec(dllexport) void destroyOGLWindowNativeJDirect(long _hdc) { HWND hwnd; - HDC hdc = (HDC)_hdc; + HDC hdc = (HDC)((PointerHolder)_hdc); if (hdc != NULL) { diff --git a/CNativeCode/OpenGL_X11.c b/CNativeCode/OpenGL_X11.c index a1f3a33..b764bd3 100644 --- a/CNativeCode/OpenGL_X11.c +++ b/CNativeCode/OpenGL_X11.c @@ -22,13 +22,36 @@ * some X stuff is also modified/debugged to run on aix ... */ -/* - * need to include the JAVA internal header files for macros and function - * prototypes required to maipulated JAVA data structures and functions - * - * StubPreamble.h includes the structure and macro definitions neede to - * convert JAVA data structures into C data structures. - * +/** + * Pointer Semantics of GLContext: + * ============================== + + "displayHandle" := (Display *) + + "windowHandle" := (Window) + if("offScreenRenderer" == FALSE && "createOwnWindow" == TRUE ) + "windowHandle" contains the new created Window + (by XCreateWindow)! + else + "windowHandle" contains the new Java-Native Window + + "pixmapHandle" := (Pixmap) + if("offScreenRenderer" == TRUE) + "pixmapHandle" contains the new Pixmap (by XCreatePixmap)! + "windowHandle" contains the new created OffScreenWindow + (by glXCreateGLXPixmap)! + else + "pixmapHandle" is unused ! + + "sharedGLContextNative" := (GLXContext) + This is the optional shared GLContext ! + + "glContext" := (GLXContext) + This is THE used GLContext ! + + "pData " := (jlong) + This is used as the "not initialized" flag ! + It is reset to zero while Destroy Method */ #include @@ -53,555 +76,29 @@ #include +#include "OpenGL_X11_common.h" /* * STATIC FLAGS FOR gl4java behavior ... */ static jboolean verbose = JNI_FALSE; -/* - * prototypes for functions local to this file scope - */ -static int get_GC( Display *display, Window win, XVisualInfo *visual, - GLXContext *gc, GLXContext gc_share); - -typedef struct { - XVisualInfo * visual; - GLXContext gc; - int success; /* 1: OK, 0: ERROR */ -} VisualGC; - -static VisualGC findVisualGlX( Display *display, - Window rootWin, - Window * pWin, - int width, int height, - jboolean doubleBuffer, - jboolean stereoView, - jboolean rgba, - jint stencilBits, - jint accumSize, - jboolean * pOwnWin, - GLXContext shareWith, - jboolean offscreen, - Pixmap *pix - ); - -static void printVisualInfo ( Display *display, XVisualInfo * vi); -static void printAllVisualInfo ( Display *disp, Window win); - -static int testVisualInfo ( Display *display, XVisualInfo * vi, - int dblBuffer, int stereoView, int rgbaMode, - int stencilSize, int accumSize); - -static XVisualInfo * findVisualIdByFeature( XVisualInfo ** visualList, - Display *disp, Window win, - int dblBuffer, int stereoView, int rgbaMode, - int stencilSize, int accumSize); - -/* testJavaGLTypes does important implementation plattformspecific checks: - * - * o do fit the JNI <-> GL Variables-Type Mapping - * o IF ERROR OR VERBOSE -> DUMP JNI,GL Type-Length - */ -jboolean testJavaGLTypes(jboolean verbose); - -/* testX11Java does important implementation plattformspecific checks: - * - * o do fit X11-Vars in jint (because GLFrame stores 'em like that) - */ -static jboolean testX11Java(); - -static int x11gl_myErrorHandler(Display *pDisp, XErrorEvent *p_error) -{ - char err_msg[80]; - - XGetErrorText(pDisp, p_error->error_code, err_msg, 80); - fprintf(stderr, "X11 Error detected.\n %s\n", err_msg); - fprintf(stderr, " Protocol request: %d\n", p_error->request_code); - fprintf(stderr, " Resource ID : 0x%x\n", (int)p_error->resourceid); - fprintf(stderr, " \ntrying to continue ... \n"); - fflush(stderr); - return 0; -} - -static int x11gl_myIOErrorHandler(Display *pDisp) -{ - fprintf(stderr, "X11 I/O Error detected.\n"); - fprintf(stderr, " \ndo not know what to do ... \n"); - fflush(stderr); - return 0; -} - -static Window createOwnOverlayWin(Display *display, Window rootwini, Window parentWin, - XVisualInfo *visual, int width, int height) -{ - /* - //------------------------------------------------------------------------// - // Some Systems (SGI) wont give up the window and so we have to create a // - // window that fits on top of the Java Canvas. // - //------------------------------------------------------------------------// - */ - Window window=0; - XSetWindowAttributes attribs ; - - /* - //----------------------------------------------------------------------// - // now we have the visual with the best depth so lets make a color map // - // for it. we use allocnone because this is a true colour visual and // - // the color map is read only anyway. This must be done because we // - // cannot call XCreateSimpleWindow. // - //----------------------------------------------------------------------// - */ - int cmap = XCreateColormap ( display - , rootwini - , visual->visual - , AllocNone - ); - - /* - //----------------------------------------------------------------------// - // Set up the window attributes. // - //----------------------------------------------------------------------// - */ - attribs.event_mask = ExposureMask ; - attribs.border_pixel = BlackPixel(display, DefaultScreen(display)) ; - attribs.colormap = cmap ; - attribs.bit_gravity = SouthWestGravity ; ; - attribs.background_pixel = 0xFF00FFFF ; - - /* - //----------------------------------------------------------------------// - // Create a window. // - //----------------------------------------------------------------------// - */ - window = XCreateWindow( display - , parentWin - , 0 - , 0 - , width - , height - , 0 - , visual->depth - , InputOutput - , visual->visual - , CWBitGravity | CWColormap - | CWBorderPixel | CWBackPixel - , &attribs); - - return window; -} - - -static void printVisualInfo ( Display *display, XVisualInfo * vi) -{ - int dblBuffer, stereoView, rgbaMode, stencilSize; - int accumRedSize, accumGreenSize, accumBlueSize, accumAlphaSize; - - fprintf(stderr, "\nvi(ID:%d(0x%X)): \n screen %d, depth %d, class %d,\n clrmapsz %d, bitsPerRGB %d\n", - (int) vi->visualid, - (int) vi->visualid, - (int) vi->screen, - (int) vi->depth, - (int) vi->class, - (int) vi->colormap_size, - (int) vi->bits_per_rgb ); - - glXGetConfig( display, vi, GLX_DOUBLEBUFFER, &dblBuffer); - glXGetConfig( display, vi, GLX_STEREO, &stereoView); - glXGetConfig( display, vi, GLX_RGBA, &rgbaMode); - glXGetConfig( display, vi, GLX_STENCIL_SIZE, &stencilSize); - glXGetConfig( display, vi, GLX_ACCUM_RED_SIZE, &accumRedSize); - glXGetConfig( display, vi, GLX_ACCUM_GREEN_SIZE, &accumGreenSize); - glXGetConfig( display, vi, GLX_ACCUM_BLUE_SIZE, &accumBlueSize); - glXGetConfig( display, vi, GLX_ACCUM_ALPHA_SIZE, &accumAlphaSize); - - fprintf(stderr, "\t doubleBuff: %d, ", dblBuffer); - fprintf(stderr, " stereo: %d, ", stereoView); - fprintf(stderr, " rgba: %d, ", rgbaMode); - fprintf(stderr, " stencilSize: %d !\n", stencilSize); - fprintf(stderr, "\t red accum: %d, ", accumRedSize); - fprintf(stderr, " green accum: %d, ", accumGreenSize); - fprintf(stderr, " blue accum: %d, ", accumBlueSize); - fprintf(stderr, " alpha accum: %d !\n", accumAlphaSize); - - fflush(stderr); -} - -static void printAllVisualInfo ( Display *disp, Window win) -{ - XVisualInfo * visualInfo=0; - XVisualInfo * vi=0; - XVisualInfo viTemplate; - int i, numReturns; - XWindowAttributes xwa; - - if(XGetWindowAttributes(disp, win, &xwa) == 0) - { - fprintf(stderr, "\nERROR while fetching XWindowAttributes\n"); - fflush(stderr); - return; - } - - viTemplate.screen = DefaultScreen( disp ); - viTemplate.class = (xwa.visual)->class ; - viTemplate.depth = xwa.depth; - - visualInfo = XGetVisualInfo( disp, VisualScreenMask, - &viTemplate, &numReturns ); - - if(JNI_TRUE==verbose) - { - fprintf(stderr, "\nNum of Visuals : %d\n", numReturns ); - - for(i=0; i0) { - glXGetConfig(display, vi, GLX_ACCUM_ALPHA_SIZE, &glxCfg); - if(glxCfgclass ; - viTemplate.depth = xwa.depth; - - *visualList = XGetVisualInfo( disp, VisualScreenMask, - &viTemplate, &numReturns ); - - for(i=0; done==0 && i=numReturns ) - fprintf(stderr, "findVisualIdByFeature: No matching visual found ...\n" ); - fflush(stderr); - } - - XFree(*visualList); - *visualList=NULL; - return NULL; + (void)env; + (void)obj; + return JNI_FALSE; } -/** - * Description for pWin: - * if ownwin: - * input: the parent window - * output: the newly created window - * else if ! ownwin: - * i/o: the window itself - */ -static VisualGC findVisualGlX( Display *display, - Window rootWin, - Window * pWin, - int width, int height, - jboolean doubleBuffer, - jboolean stereoView, - jboolean rgba, - jint stencilBits, - jint accumSize, - jboolean * pOwnWin, - GLXContext shareWith, - jboolean offscreen, - Pixmap *pix - ) +JNIEXPORT jboolean JNICALL +Java_gl4java_GLContext_hasJAWTSurfaceChanged( JNIEnv *env, jobject obj, + jlong thisWin ) { - Window newWin = 0; - int visualAttribList[32]; - int i=0; - int j=0; - int done=0; - VisualGC vgc = { NULL, 0, 0 }; - jboolean tryChooseVisual = JNI_TRUE; - int gc_ret = 0; - - /** - * The Visual seeked by Function: findVisualIdByFeature ! - */ - XVisualInfo * visualList=NULL; /* the visual list, to be XFree-ed */ - - /* backup variables ... */ - jboolean _rgba=rgba; - jint _stencilBits=stencilBits; - jint _accumSize=accumSize; - jboolean _stereoView=stereoView; - jboolean _doubleBuffer=doubleBuffer; - - do { - if(JNI_TRUE==verbose) - { - fprintf(stderr, "GL4Java: seeking visual loop# %d\n", j); - } - - i=0; - visualAttribList[i++] = GLX_RED_SIZE; - visualAttribList[i++] = 1; - visualAttribList[i++] = GLX_GREEN_SIZE; - visualAttribList[i++] = 1; - visualAttribList[i++] = GLX_BLUE_SIZE; - visualAttribList[i++] = 1; - visualAttribList[i++] = GLX_DEPTH_SIZE; - visualAttribList[i++] = 1; - visualAttribList[i++] = GLX_ACCUM_RED_SIZE; - visualAttribList[i++] = accumSize; - visualAttribList[i++] = GLX_ACCUM_GREEN_SIZE; - visualAttribList[i++] = accumSize; - visualAttribList[i++] = GLX_ACCUM_BLUE_SIZE; - visualAttribList[i++] = accumSize; - - if(JNI_TRUE==rgba) - { - visualAttribList[i++] = GLX_RGBA; - visualAttribList[i++] = GLX_ACCUM_ALPHA_SIZE; - visualAttribList[i++] = accumSize; - } - if(JNI_TRUE==doubleBuffer) - visualAttribList[i++] = GLX_DOUBLEBUFFER; - if(JNI_TRUE==stereoView) - visualAttribList[i++] = GLX_STEREO; - visualAttribList[i++] = GLX_STENCIL_SIZE; - visualAttribList[i++] = (int)stencilBits; - visualAttribList[i] = None; - - if(tryChooseVisual==JNI_TRUE && vgc.visual==NULL) - { - vgc.visual = glXChooseVisual( display, - DefaultScreen( display ), - visualAttribList ); - if(JNI_TRUE==verbose) - { - if(vgc.visual!=NULL) - { - fprintf(stderr, "glXChooseVisual: test visual(ID:%d(0x%X)):\n", - (int) vgc.visual->visualid, - (int) vgc.visual->visualid); - printVisualInfo ( display, vgc.visual); - } else - fprintf(stderr, "glXChooseVisual: no visual\n"); - fflush(stderr); - } - } - - if(vgc.visual==NULL) - { - vgc.visual = findVisualIdByFeature( &visualList, - display, *pWin, - doubleBuffer, stereoView, - rgba, - stencilBits, - accumSize); - } - - if(vgc.visual==NULL) - { - vgc.visual = findVisualIdByFeature( &visualList, - display, *pWin, - doubleBuffer, stereoView, - rgba, - stencilBits>0, - accumSize>0); - } - - if( *pOwnWin == JNI_TRUE && vgc.visual!=NULL) - { - newWin = createOwnOverlayWin(display, - rootWin, - *pWin /* the parent */, - vgc.visual, width, height); - } - - if( offscreen==JNI_TRUE && vgc.visual!=NULL) - { - if(*pix!=0) - { - XFreePixmap(display, *pix); - } - if(vgc.visual !=NULL) - *pix = XCreatePixmap( display, rootWin, width, height, - vgc.visual->depth); - if(*pix!=0) - { - *pWin = glXCreateGLXPixmap( display, vgc.visual, *pix ); - if(*pWin==0) - { - XFreePixmap(display, *pix); - *pix=0; - fprintf(stderr, "GL4Java(%d): glXCreateGLXPixmap failed\n", j); - fflush(stderr); - } - } else { - fprintf(stderr, "GL4Java(%d): XCreatePixmap failed\n", j); - fflush(stderr); - *pWin = 0; - } - if(JNI_TRUE==verbose) - { - if(*pWin!=0) - { - fprintf(stderr, "GL4Java(%d): pixmap ok\n", j); - fflush(stderr); - } - } - } - - gc_ret = -100; - - if( *pOwnWin == JNI_TRUE && newWin!=0 && - (gc_ret=get_GC( display, newWin, - vgc.visual, &(vgc.gc), shareWith)) == 0 - ) - { - vgc.success=1; - *pWin = newWin ; - } - else if( vgc.visual!=NULL && *pOwnWin == JNI_FALSE && *pWin!=0 && - (gc_ret=get_GC( display, *pWin, - vgc.visual, &(vgc.gc), shareWith)) == 0 - ) - { - vgc.success=1; - } else - { - j++; /* trial counter */ - if(JNI_TRUE==verbose) - { - fprintf(stderr, "GL4Java(%d): Visual fetching failed (gc_get=%d)\n", j, gc_ret); - fflush(stderr); - } - - if(*pix!=0) - { - XFreePixmap(display, *pix); - *pix=0; - } - - if(visualList!=NULL) - { - XFree(visualList); - visualList=NULL; - vgc.visual=NULL; - } else if(vgc.visual!=NULL) - { - XFree(vgc.visual); - vgc.visual=NULL; - } - - /* Fall-Back ... */ - if(*pOwnWin==JNI_FALSE && offscreen==JNI_FALSE) { - rgba=_rgba; - stencilBits=_stencilBits; - accumSize=_accumSize; - stereoView=_stereoView; - doubleBuffer=_doubleBuffer; - *pOwnWin=JNI_TRUE; - } else if(accumSize>0 && offscreen==JNI_TRUE) { - accumSize=0; - } else if(doubleBuffer==JNI_FALSE && offscreen==JNI_TRUE) { - doubleBuffer=JNI_TRUE; - } else if(stencilBits>0) { - stencilBits=0; - } else if(stereoView==JNI_TRUE) { - stereoView=JNI_FALSE; - } else if(rgba==JNI_TRUE) { - rgba=JNI_FALSE; - } else if(doubleBuffer==JNI_TRUE) { - doubleBuffer=JNI_FALSE; - } else if(tryChooseVisual==JNI_TRUE) { - rgba=_rgba; - stencilBits=_stencilBits; - accumSize=_accumSize; - stereoView=_stereoView; - doubleBuffer=_doubleBuffer; - *pOwnWin=JNI_FALSE; - tryChooseVisual=JNI_FALSE; - } else done=1; - } - } while (vgc.success==0 && done==0) ; - - if(vgc.success==1 && JNI_TRUE==verbose) - { - fprintf(stderr, "\nfindVisualGlX vi(ID:%d): \n screen %d, depth %d, class %d,\n clrmapsz %d, bitsPerRGB %d, shared with %d\n", - (int)vgc.visual->visualid, - (int)vgc.visual->screen, - (int)vgc.visual->depth, - (int)vgc.visual->class, - (int)vgc.visual->colormap_size, - (int)vgc.visual->bits_per_rgb, - (int)shareWith); - printVisualInfo ( display, vgc.visual); - } - - return vgc; + (void)env; + (void)obj; + (void)thisWin; + return JNI_FALSE; } /* @@ -615,7 +112,8 @@ static VisualGC findVisualGlX( Display *display, * followed by the method table for the class. */ JNIEXPORT jboolean JNICALL -Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj ) +Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj, + jobject canvas) { int screen = 0; @@ -642,7 +140,7 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj ) jint jaccumSize=0; jboolean jownwind = JNI_FALSE ; jint jcreatewinw = 0, jcreatewinh = 0; - jint jshareWith = 0; + GLXContext jshareWith = 0; /* these variables will be mapped in the java-object ! */ Window thisWin=0; @@ -652,6 +150,8 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj ) int iValue, iValue1, iValue2, iValue3; + (void)canvas; + cls = (*env)->GetObjectClass(env, obj); if(cls==0) { @@ -679,7 +179,7 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj ) fflush(stderr); } - /* FIRST OF ALL CHECK IF A NATIVE POINTER OR X11-TYPE FITS IN ´jint´ */ + /* FIRST OF ALL CHECK IF A NATIVE POINTER OR X11-TYPE FITS IN ´jlong´ */ ret = testX11Java(); ret = testJavaGLTypes(verbose); @@ -739,20 +239,23 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj ) } if(ret==JNI_TRUE) { - fshareWith = (*env)->GetFieldID(env, cls, "sharedGLContextNative", "I"); + fshareWith = (*env)->GetFieldID(env, cls, "sharedGLContextNative", "J"); if (fshareWith == 0) ret= JNI_FALSE; - else jshareWith =(*env)->GetIntField(env, obj, fshareWith); + else jshareWith = (GLXContext) + ( (PointerHolder) (*env)->GetLongField(env, obj, fshareWith) ); } if(ret==JNI_TRUE) { - fwindowHandle = (*env)->GetFieldID(env, cls, "windowHandle", "I"); + fwindowHandle = (*env)->GetFieldID(env, cls, "windowHandle", "J"); if (fwindowHandle == 0) ret= JNI_FALSE; - else thisWin =(Window) (*env)->GetIntField(env, obj, fwindowHandle); + else + thisWin =(Window) + ( (PointerHolder) (*env)->GetLongField(env, obj, fwindowHandle) ); } if(ret==JNI_TRUE) { - fpixmapHandle = (*env)->GetFieldID(env, cls, "pixmapHandle", "I"); + fpixmapHandle = (*env)->GetFieldID(env, cls, "pixmapHandle", "J"); if (fpixmapHandle == 0) ret= JNI_FALSE; } @@ -771,8 +274,8 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj ) if(JNI_TRUE==verbose) { - fprintf(stderr,"\nGL4Java: (JAVA FOUND WINDOW HANDLE %d == 0x%x)\n", - (int)thisWin, (int)thisWin); + fprintf(stderr,"\nGL4Java: (JAVA FOUND WINDOW HANDLE 0x%p)\n", + (void *)((PointerHolder)thisWin)); if(joffScreenRenderer==JNI_TRUE) { fprintf(stderr,"\nGL4Java: (USING OFFSCREEN GLPIXMAP BUFFER,\n\t forced: !ownWindow, window=NULL)\n"); @@ -789,12 +292,12 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj ) } if(ret==JNI_TRUE) { - fdisplayHandle = (*env)->GetFieldID(env, cls, "displayHandle", "I"); + fdisplayHandle = (*env)->GetFieldID(env, cls, "displayHandle", "J"); if (fdisplayHandle == 0) ret= JNI_FALSE; } if(ret==JNI_TRUE) { - fglContext=(*env)->GetFieldID(env, cls, "glContext", "I"); + fglContext=(*env)->GetFieldID(env, cls, "glContext", "J"); if (fglContext == 0) ret= JNI_FALSE; } @@ -845,8 +348,8 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj ) (int)jcreatewinw, (int)jcreatewinh, jdoubleBuffer, jstereoView, jrgba, jstencilBits, jaccumSize, - &jownwind, (GLXContext) jshareWith, - joffScreenRenderer, &pix); + &jownwind, jshareWith, + joffScreenRenderer, &pix, verbose); if(vgc.success == 0 && jrgba==JNI_TRUE) { @@ -855,8 +358,8 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj ) (int)jcreatewinw, (int)jcreatewinh, jdoubleBuffer, jstereoView, jrgba, jstencilBits, jaccumSize, - &jownwind, (GLXContext) jshareWith, - joffScreenRenderer, &pix); + &jownwind, jshareWith, + joffScreenRenderer, &pix, verbose); } if(vgc.success == 0) @@ -982,19 +485,19 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj ) } if(ret==JNI_TRUE && fwindowHandle!=0) { - (*env)->SetIntField(env, obj, fwindowHandle, (jint)thisWin); + (*env)->SetLongField(env, obj, fwindowHandle, (jlong)((PointerHolder)thisWin)); } if(ret==JNI_TRUE && fpixmapHandle!=0) { - (*env)->SetIntField(env, obj, fpixmapHandle, (jint)pix); + (*env)->SetLongField(env, obj, fpixmapHandle, (jlong)((PointerHolder)pix)); } if(ret==JNI_TRUE && fdisplayHandle) { - (*env)->SetIntField(env, obj, fdisplayHandle, (jint)display); + (*env)->SetLongField(env, obj, fdisplayHandle, (jlong)((PointerHolder)display)); } if(ret==JNI_TRUE && fglContext) { - (*env)->SetIntField(env, obj, fglContext, (jint)vgc.gc); + (*env)->SetLongField(env, obj, fglContext, (jlong)((PointerHolder)vgc.gc)); } if(ret==JNI_TRUE && fownwind) { @@ -1007,7 +510,7 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj ) JNIEXPORT void JNICALL Java_gl4java_GLContext_gljResizeNative( JNIEnv *env, jobject obj, jboolean isOwnWindow, - jint disp, jint thisWin, + jlong disp, jlong thisWin, jint width, jint height) { /* perform a X11 synchronise, because rendering could be done @@ -1018,7 +521,8 @@ Java_gl4java_GLContext_gljResizeNative( JNIEnv *env, jobject obj, if(isOwnWindow) { - XResizeWindow((Display *)disp, (Window)thisWin, width, height); + XResizeWindow((Display *)((PointerHolder)disp), + (Window)((PointerHolder)thisWin), width, height); /* if(JNI_TRUE==verbose) { fprintf(stderr, "XResizeWindow -> %d x %d\n", @@ -1032,14 +536,17 @@ Java_gl4java_GLContext_gljResizeNative( JNIEnv *env, jobject obj, JNIEXPORT jboolean JNICALL Java_gl4java_GLContext_gljMakeCurrentNative( JNIEnv *env, jobject obj, - jint disp, - jint thisWin, - jint glContext + jobject canvas, + jlong disp, + jlong thisWin, + jlong glContext ) { jboolean ret = JNI_TRUE; GLXContext ctx = NULL; + (void)canvas; + if(glContext==0) { fprintf(stderr, "GL4Java ERROR: gljUse NO actual GC was created ...\n"); @@ -1049,14 +556,16 @@ Java_gl4java_GLContext_gljMakeCurrentNative( JNIEnv *env, jobject obj, ctx = glXGetCurrentContext(); - if(ctx==(GLXContext)glContext) + if(ctx==(GLXContext)((PointerHolder)glContext)) return JNI_TRUE; if(ret==JNI_TRUE) { - if( !glXMakeCurrent( (Display *)disp, (Window)thisWin, - (GLXContext)glContext ) ) + if( !glXMakeCurrent( (Display *)((PointerHolder)disp), + (Window)((PointerHolder)thisWin), + (GLXContext)((PointerHolder)glContext) ) ) { + extern GLenum glGetError ( void ) ; fprintf(stderr, "GL4Java: gljMakeCurrent failed with GC\n Another thread may be use it now ...\n"); fflush(stderr); ret = JNI_FALSE; @@ -1068,19 +577,21 @@ Java_gl4java_GLContext_gljMakeCurrentNative( JNIEnv *env, jobject obj, JNIEXPORT jboolean JNICALL Java_gl4java_GLContext_gljFreeNative( JNIEnv *env, jobject obj, - jint disp, - jint thisWin, - jint glContext + jobject canvas, + jlong disp, + jlong thisWin, + jlong glContext ) { jboolean ret = JNI_TRUE; (void)thisWin; (void)glContext; + (void)canvas; if(ret==JNI_TRUE) { - if( !glXMakeCurrent( (Display *)disp, None, NULL ) ) + if( !glXMakeCurrent( (Display *)((PointerHolder)disp), None, NULL)) { fprintf(stderr, "GL4Java: gljFree failed\n"); fflush(stderr); @@ -1092,12 +603,12 @@ Java_gl4java_GLContext_gljFreeNative( JNIEnv *env, jobject obj, JNIEXPORT jboolean JNICALL Java_gl4java_GLContext_gljIsContextCurrentNative( JNIEnv *env, jobject obj, - jint glContext + jlong glContext ) { GLXContext ctx = glXGetCurrentContext(); - if(ctx==(GLXContext)glContext) + if(ctx==(GLXContext)((PointerHolder)glContext)) return JNI_TRUE; return JNI_FALSE; @@ -1105,52 +616,67 @@ Java_gl4java_GLContext_gljIsContextCurrentNative( JNIEnv *env, jobject obj, JNIEXPORT jboolean JNICALL -Java_gl4java_GLContext_gljDestroyNative( JNIEnv *env, jobject obj ) +Java_gl4java_GLContext_gljDestroyNative( JNIEnv *env, jobject obj, + jobject canvas ) { jclass cls = 0; jfieldID fdisplayHandle=0, fwindowHandle=0, fglContext=0; jfieldID fpixmapHandle=0; jfieldID fpData=0; + jfieldID fownwind=0; + jboolean jownwind = JNI_FALSE ; Display *disp=0; GLXContext gc=0; Window win=0; - jint pData=0; + jlong pData=0; Pixmap pix=0; jboolean ret = JNI_TRUE; + (void) canvas; + cls = (*env)->GetObjectClass(env, obj); if(cls==0) ret=JNI_FALSE; if(ret==JNI_TRUE) { - fwindowHandle = (*env)->GetFieldID(env, cls, "windowHandle", "I"); + fwindowHandle = (*env)->GetFieldID(env, cls, "windowHandle", "J"); if (fwindowHandle == 0) ret= JNI_FALSE; - else win = (Window) (*env)->GetIntField(env, obj, fwindowHandle); + else win = (Window) + ( (PointerHolder) (*env)->GetLongField(env, obj, fwindowHandle) ); } if(ret==JNI_TRUE) { - fdisplayHandle = (*env)->GetFieldID(env, cls, "displayHandle", "I"); + fdisplayHandle = (*env)->GetFieldID(env, cls, "displayHandle", "J"); if (fdisplayHandle == 0) ret= JNI_FALSE; - else disp=(Display *)(*env)->GetIntField(env, obj, fdisplayHandle); + else disp=(Display *) + ( (PointerHolder) (*env)->GetLongField(env, obj, fdisplayHandle)); } if(ret==JNI_TRUE) { - fglContext=(*env)->GetFieldID(env, cls, "glContext", "I"); + fglContext=(*env)->GetFieldID(env, cls, "glContext", "J"); if (fglContext == 0) ret= JNI_FALSE; - else gc =(GLXContext)(*env)->GetIntField(env, obj, fglContext); + else gc =(GLXContext) + ( (PointerHolder) (*env)->GetLongField(env, obj, fglContext) ); } if(ret==JNI_TRUE) { - fpData = (*env)->GetFieldID(env, cls, "pData", "I"); + fpData = (*env)->GetFieldID(env, cls, "pData", "J"); if (fpData == 0) ret= JNI_FALSE; - else pData =(*env)->GetIntField(env, obj, fpData); + else pData =(*env)->GetLongField(env, obj, fpData); } if(ret==JNI_TRUE) { - fpixmapHandle = (*env)->GetFieldID(env, cls, "pixmapHandle", "I"); + fpixmapHandle = (*env)->GetFieldID(env, cls, "pixmapHandle", "J"); if (fpixmapHandle == 0) ret= JNI_FALSE; - else pix = (Pixmap)(*env)->GetIntField(env, obj, fpixmapHandle); + else pix = (Pixmap) + ( (PointerHolder) (*env)->GetLongField(env, obj, fpixmapHandle)); + } + + if(ret==JNI_TRUE) { + fownwind = (*env)->GetFieldID(env, cls, "createOwnWindow", "Z"); + if (fownwind == 0) ret= JNI_FALSE; + else jownwind =(*env)->GetBooleanField(env, obj, fownwind); } glXWaitGL(); @@ -1166,17 +692,23 @@ Java_gl4java_GLContext_gljDestroyNative( JNIEnv *env, jobject obj ) } ret = JNI_FALSE; } - if( ret==JNI_TRUE && !glXMakeCurrent( disp, None, NULL ) ) + glXMakeCurrent( disp, None, NULL ); + + if(ret==JNI_TRUE) { - fprintf(stderr, "GL4Java: gljDestroy failed\n"); - fflush(stderr); - ret = JNI_FALSE; - } else if(ret==JNI_TRUE) { glXDestroyContext(disp, gc); if(pix!=0) { - XFreePixmap(disp, (Pixmap)pix); + if(win!=0) + glXDestroyGLXPixmap(disp, win); + win=0; + XFreePixmap(disp, pix); } + if(jownwind && win!=0) + { + XDestroyWindow(disp, win); + win=0; + } } } @@ -1190,33 +722,37 @@ Java_gl4java_GLContext_gljDestroyNative( JNIEnv *env, jobject obj ) } if(ret==JNI_TRUE && fpixmapHandle!=0) { - (*env)->SetIntField(env, obj, fpixmapHandle, (jint)pix); + (*env)->SetLongField(env, obj, fpixmapHandle, (jlong)((PointerHolder)pix)); } if(ret==JNI_TRUE && fwindowHandle!=0) { - (*env)->SetIntField(env, obj, fwindowHandle, (jint)win); + (*env)->SetLongField(env, obj, fwindowHandle, (jlong)((PointerHolder)win)); } if(ret==JNI_TRUE && fdisplayHandle) { - (*env)->SetIntField(env, obj, fdisplayHandle, (jint)disp); + (*env)->SetLongField(env, obj, fdisplayHandle, (jlong)((PointerHolder)disp)); } if(ret==JNI_TRUE && fglContext) { - (*env)->SetIntField(env, obj, fglContext, (jint)gc); + (*env)->SetLongField(env, obj, fglContext, (jlong)((PointerHolder)gc)); } if(ret==JNI_TRUE && fpData) { - (*env)->SetIntField(env, obj, fpData, (jint)pData); + (*env)->SetLongField(env, obj, fpData, pData); + } + + if(ret==JNI_TRUE && fownwind) { + (*env)->SetBooleanField(env, obj, fownwind, jownwind); } return ret; } JNIEXPORT jboolean JNICALL Java_gl4java_GLContext_gljSwapNative( JNIEnv *env, jobject obj, - jint disp, - jint thisWin, - jint glContext, + jlong disp, + jlong thisWin, + jlong glContext, jboolean doubleBuffer ) { @@ -1226,95 +762,10 @@ Java_gl4java_GLContext_gljSwapNative( JNIEnv *env, jobject obj, /* don't double buffer */ glXWaitGL(); } else { - glXSwapBuffers( (Display *)disp, (Window)thisWin ); + glXSwapBuffers( (Display *)((PointerHolder)disp), + (Window)((PointerHolder)thisWin) ); } return JNI_TRUE; } -/* - * Name : get_GC - * - * Parameters: win - the X window use to the OpenGL context with - * visual - The visual to create the context for - * gc - a pointer to a GLXContext structure. This is how - * the created context will be returned to the caller - * - * Returns : a pointer to a created GLXContext is returned through the - * gc argument. - * int - an error code: 0 means everything was fine - * -1 context creation failed - * -2 context/window association failed - * - * Purpose : create an X window Graphics context and assocaite it with - * the window. It returns 0 if everything was fine, -1 if the - * context could not be created, -2 if the context could not - * be associated with the window - */ -static int get_GC( Display *display, Window win, XVisualInfo *visual, - GLXContext *gc, GLXContext gc_share) -{ - int trial = 2; - - while(trial>0) - { - switch(trial) - { - case 2: - *gc = glXCreateContext( display, visual, gc_share, GL_TRUE ); - break; - case 1: - *gc = glXCreateContext( display, visual, gc_share, GL_FALSE ); - break; - } - trial--; - - /* check if the context could be created */ - if( *gc == NULL ) { - continue; - } - - /* associated the context with the X window */ - if( glXMakeCurrent( display, win, *gc ) == False) { - glXDestroyContext( display, *gc ); - continue; - } else return 0; - } - - return -2; -} - -static jboolean testX11Java() -{ - jboolean ret=JNI_TRUE; - - /* NON DEPENDENCE CHECKS */ - - /* FIRST OF ALL CHECK IF A NATIVE POINTER OR X11-TYPE FITS IN ´jint´ */ - - if( sizeof(jint) < sizeof(Display *) ) - { - fprintf(stderr,"GL4Java: (Display *) fits not in jint\n"); - ret = JNI_FALSE; - } - - if( sizeof(jint) < sizeof(GLXContext) ) - { - fprintf(stderr,"GL4Java: GLXContext fits not in jint\n"); - ret = JNI_FALSE; - } - - if( sizeof(jint) < sizeof(Window) ) - { - fprintf(stderr,"GL4Java: Window fits not in jint\n"); - ret = JNI_FALSE; - } - - if(ret==JNI_FALSE) - { - fflush(stderr); - } - - return ret; -} - diff --git a/CNativeCode/OpenGL_misc.c b/CNativeCode/OpenGL_misc.c index d2ad7c6..5f9d502 100644 --- a/CNativeCode/OpenGL_misc.c +++ b/CNativeCode/OpenGL_misc.c @@ -27,22 +27,11 @@ static const char * _lib_version_= __LIB_VERSION__ ; static const char * _lib_vendor_ = "Jausoft - Sven Goethel Software Development"; #endif -#ifndef LIBAPIENTRY - #define LIBAPIENTRY -#endif -#ifndef LIBAPI - #define LIBAPI -#endif #ifndef CALLBACK #define CALLBACK #endif -jboolean testJavaGLTypes(jboolean verbose); - -JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM * vm, void *reserved); -JNIEXPORT void JNICALL JNI_OnUnload(JavaVM *vm, void *reserved); - -jboolean testJavaGLTypes(jboolean verbose) +jboolean LIBAPIENTRY testJavaGLTypes(jboolean verbose) { jboolean ret=JNI_TRUE; jint i1 = (jint)0xaaff; @@ -156,6 +145,12 @@ jboolean testJavaGLTypes(jboolean verbose) * GLbitfield : dito. */ + if( sizeof(void *) > sizeof(PointerHolder) ) + { + fprintf(stderr,"(void *) > (PointerHolder)\n"); + ret = JNI_FALSE; + } + if( sizeof(void *) > sizeof(jlong) ) { fprintf(stderr,"(void *) > (jlong)\n"); @@ -208,8 +203,12 @@ jboolean testJavaGLTypes(jboolean verbose) fprintf(stderr,"jfloat %d\n", sizeof(jfloat)); fprintf(stderr,"jdouble %d\n", sizeof(jdouble)); - fflush(stderr); + fprintf(stderr,"\nPointerHolder %d\n", sizeof(PointerHolder)); + + fprintf(stderr, "GL4Java: useJAWT=%d\n\n", + (int) Java_gl4java_GLContext_useJAWT( 0, 0 ) ); + fflush(stderr); return ret; } @@ -232,19 +231,6 @@ Java_gl4java_GLContext_gljGetNativeLibVendorNative(JNIEnv *env, jobject obj ) return (*env)->NewStringUTF(env, _lib_vendor_); } -JNIEXPORT jint JNICALL -JNI_OnLoad(JavaVM * vm, void *reserved) -{ - return 0x00010001; /* old JDK 1.1 JNI :-) */ -} - -JNIEXPORT void JNICALL -JNI_OnUnload(JavaVM *vm, void *reserved) -{ - /* old JNI :-) */ -} - - /** * Experimental Code, not done yet ! * This one is to upspeed the Offscreen rendering engine for e.g. Swing ! diff --git a/CNativeCode/OpenGL_misc.h b/CNativeCode/OpenGL_misc.h index 2312d8c..368e2f7 100644 --- a/CNativeCode/OpenGL_misc.h +++ b/CNativeCode/OpenGL_misc.h @@ -22,6 +22,19 @@ #define LIBAPI #endif + #ifndef USE_64BIT_POINTER + typedef int PointerHolder; + #else + typedef long PointerHolder; + #endif + + /* testJavaGLTypes does important implementation plattformspecific checks: + * + * o do fit the JNI <-> GL Variables-Type Mapping + * o IF ERROR OR VERBOSE -> DUMP JNI,GL Type-Length + */ + LIBAPI jboolean LIBAPIENTRY testJavaGLTypes(jboolean verbose); + LIBAPI void * LIBAPIENTRY getGLProcAddressHelper (const char * func, int * method, int debug, int verbose ); diff --git a/CNativeCode/jni12tools.c b/CNativeCode/jni12tools.c index afe60ad..b4236b3 100644 --- a/CNativeCode/jni12tools.c +++ b/CNativeCode/jni12tools.c @@ -526,4 +526,16 @@ void * LIBAPIENTRY jnitoolsCreateNativeArray (JavaBasicType jbt, int dataArrayLe } return arrdata; } + + +JNIEXPORT jint JNICALL +JNI_OnLoad(JavaVM * vm, void *reserved) +{ + return JNI_VERSION_1_2; +} + +JNIEXPORT void JNICALL +JNI_OnUnload(JavaVM *vm, void *reserved) +{ +} diff --git a/CNativeCode/jnitools.c b/CNativeCode/jnitools.c index 948d797..2e6f282 100644 --- a/CNativeCode/jnitools.c +++ b/CNativeCode/jnitools.c @@ -577,3 +577,16 @@ void * LIBAPIENTRY jnitoolsCreateNativeArray (JavaBasicType jbt, int dataArrayLe return arrdata; } +JNIEXPORT jint JNICALL +JNI_OnLoad(JavaVM * vm, void *reserved) +{ + return JNI_VERSION_1_1; +} + +JNIEXPORT void JNICALL +JNI_OnUnload(JavaVM *vm, void *reserved) +{ + /* old JNI :-) */ +} + + diff --git a/CNativeCode/jnitools.h b/CNativeCode/jnitools.h index ee02405..d4eb716 100644 --- a/CNativeCode/jnitools.h +++ b/CNativeCode/jnitools.h @@ -119,4 +119,12 @@ LIBAPI void * LIBAPIENTRY jnitoolsCreateNativeArray (JavaBasicType jbt, int dataArrayLen, const char * errText); + + /** + * It is very important that OnLoad returns + * the right JNI Version Number ... !! + */ + JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM * vm, void *reserved); + JNIEXPORT void JNICALL JNI_OnUnload(JavaVM *vm, void *reserved); + #endif diff --git a/Installer/GL4JInst_cacert_ns.html b/Installer/GL4JInst_cacert_ns.html index b612f66..e2f85bc 100644 --- a/Installer/GL4JInst_cacert_ns.html +++ b/Installer/GL4JInst_cacert_ns.html @@ -49,7 +49,7 @@ Certificate Authority" box comes up: IS AN EXTRA SECURITY PRECAUTION.

When asked for a name, enter the following name, exactly as shown: GL4Java
-

Click here to import the signing certificate. Valid from Sat Nov 18, 2000 - Sun Feb 18, 2001 +

Click here to import the signing certificate. Valid from Tue Feb 13, 2001 to Sun May 13, 2001

After you have imported the certificate, Click here to begin the GL4Java installation. diff --git a/Installer/makeNetscapeSignedJar-Unix.sh b/Installer/makeNetscapeSignedJar-Unix.sh index 52a584d..e59193b 100755 --- a/Installer/makeNetscapeSignedJar-Unix.sh +++ b/Installer/makeNetscapeSignedJar-Unix.sh @@ -27,7 +27,7 @@ javac -classpath ".:../capsapi_classes.zip" *.java . versionundef.sh rm -rf META-INF -signtool -d . -e .class -k GL4JInst205 -Z GL4JInst_ns.jar -c9 --norecurse . +signtool -d . -e .class -k GL4JInst206a -Z GL4JInst_ns.jar -c9 --norecurse . rm -rf META-INF rm -f key3.db cert7.db *.class diff --git a/Installer/versiondef.sh b/Installer/versiondef.sh index f487820..413c39c 100644 --- a/Installer/versiondef.sh +++ b/Installer/versiondef.sh @@ -1,6 +1,6 @@ MAJV=2 MINV=5 -BUGV=0 +BUGV=2 RELV=0 echo creating installer for version $MAJV.$MINV.$BUGV.$RELV ! diff --git a/Win32VC6/GL4JavaJauGLJNI/GL4JavaJauGLJNI.plg b/Win32VC6/GL4JavaJauGLJNI/GL4JavaJauGLJNI.plg index 4420746..ee41548 100755 --- a/Win32VC6/GL4JavaJauGLJNI/GL4JavaJauGLJNI.plg +++ b/Win32VC6/GL4JavaJauGLJNI/GL4JavaJauGLJNI.plg @@ -6,13 +6,22 @@ --------------------Konfiguration: GL4JavaJauGLJNI - Win32 Release--------------------

Befehlszeilen

-Erstellen der temporären Datei "D:\TEMP\RSP1E.tmp" mit Inhalten +Erstellen der temporären Datei "D:\TEMP\RSP37.tmp" mit Inhalten +[ +/nologo /MT /W3 /GX /O2 /I "d:\java2\include" /I "d:\java2\include\win32" /I "..\..\CCLassHeaders" /I "..\..\CNativeCode" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WIN32_" /D "_MSVC_" /D "_MT" /D "_GL_DYNAMIC_BINDING_" /Fo"../temp/" /Fd"../temp/" /FD /c +"P:\java\GL4Java\GL4Java\CNativeCode\OpenGL_JauJNI_dynfuncs.c" +] +Creating command line "cl.exe @D:\TEMP\RSP37.tmp" +Erstellen der temporären Datei "D:\TEMP\RSP38.tmp" mit Inhalten [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib ../libs/GL4JavaJauGljJNI.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"../libs/GL4JavaJauGLJNI.pdb" /machine:I386 /out:"../libs/GL4JavaJauGLJNI.dll" /implib:"../libs/GL4JavaJauGLJNI.lib" \java\GL4Java\GL4Java\Win32VC6\temp\OpenGL_JauJNI_dynfuncs.obj +\java\GL4Java\GL4Java\Win32VC6\libs\GL4JavaJauGljJNI.lib ] -Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP1E.tmp" +Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP38.tmp"

Ausgabefenster

+Kompilierung läuft... +OpenGL_JauJNI_dynfuncs.c Linker-Vorgang läuft... Bibliothek ../libs/GL4JavaJauGLJNI.lib und Objekt ../libs/GL4JavaJauGLJNI.exp wird erstellt diff --git a/Win32VC6/GL4JavaJauGLJNI12/GL4JavaJauGLJNI12.plg b/Win32VC6/GL4JavaJauGLJNI12/GL4JavaJauGLJNI12.plg index e122698..f3409a6 100755 --- a/Win32VC6/GL4JavaJauGLJNI12/GL4JavaJauGLJNI12.plg +++ b/Win32VC6/GL4JavaJauGLJNI12/GL4JavaJauGLJNI12.plg @@ -6,18 +6,19 @@ --------------------Konfiguration: GL4JavaJauGLJNI12 - Win32 Release--------------------

Befehlszeilen

-Erstellen der temporären Datei "D:\TEMP\RSP22.tmp" mit Inhalten +Erstellen der temporären Datei "D:\TEMP\RSP3C.tmp" mit Inhalten [ /nologo /MT /W3 /GX /O2 /I "d:\java2\include" /I "d:\java2\include\win32" /I "..\..\CCLassHeaders" /I "..\..\CNativeCode" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WIN32_" /D "_MSVC_" /D "_MT" /D "_GL_DYNAMIC_BINDING_" /Fo"../temp/" /Fd"../temp/" /FD /c "P:\java\GL4Java\GL4Java\CNativeCode\OpenGL_JauJNI12_dynfuncs.c" ] -Creating command line "cl.exe @D:\TEMP\RSP22.tmp" -Erstellen der temporären Datei "D:\TEMP\RSP23.tmp" mit Inhalten +Creating command line "cl.exe @D:\TEMP\RSP3C.tmp" +Erstellen der temporären Datei "D:\TEMP\RSP3D.tmp" mit Inhalten [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib ../libs/GL4JavaJauGljJNI12.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"../libs/GL4JavaJauGLJNI12.pdb" /machine:I386 /out:"../libs/GL4JavaJauGLJNI12.dll" /implib:"../libs/GL4JavaJauGLJNI12.lib" \java\GL4Java\GL4Java\Win32VC6\temp\OpenGL_JauJNI12_dynfuncs.obj +\java\GL4Java\GL4Java\Win32VC6\libs\GL4JavaJauGljJNI12.lib ] -Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP23.tmp" +Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP3D.tmp"

Ausgabefenster

Kompilierung läuft... OpenGL_JauJNI12_dynfuncs.c diff --git a/Win32VC6/GL4JavaJauGLJNI12tst/GL4JavaJauGLJNI12tst.plg b/Win32VC6/GL4JavaJauGLJNI12tst/GL4JavaJauGLJNI12tst.plg index c368a8b..5e12f4c 100755 --- a/Win32VC6/GL4JavaJauGLJNI12tst/GL4JavaJauGLJNI12tst.plg +++ b/Win32VC6/GL4JavaJauGLJNI12tst/GL4JavaJauGLJNI12tst.plg @@ -6,18 +6,19 @@ --------------------Konfiguration: GL4JavaJauGLJNI12tst - Win32 Release--------------------

Befehlszeilen

-Erstellen der temporären Datei "D:\TEMP\RSP27.tmp" mit Inhalten +Erstellen der temporären Datei "D:\TEMP\RSP41.tmp" mit Inhalten [ /nologo /MT /W3 /GX /O2 /I "d:\java2\include" /I "d:\java2\include\win32" /I "..\..\CCLassHeaders" /I "..\..\CNativeCode" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WIN32_" /D "_MSVC_" /D "_MT" /D "_GL_DYNAMIC_BINDING_" /Fo"../temp/" /Fd"../temp/" /FD /c "P:\java\GL4Java\GL4Java\CNativeCode\OpenGL_JauJNI12tst_dynfuncs.c" ] -Creating command line "cl.exe @D:\TEMP\RSP27.tmp" -Erstellen der temporären Datei "D:\TEMP\RSP28.tmp" mit Inhalten +Creating command line "cl.exe @D:\TEMP\RSP41.tmp" +Erstellen der temporären Datei "D:\TEMP\RSP42.tmp" mit Inhalten [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib ../libs/GL4JavaJauGljJNI12.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"../libs/GL4JavaJauGLJNI12tst.pdb" /machine:I386 /out:"../libs/GL4JavaJauGLJNI12tst.dll" /implib:"../libs/GL4JavaJauGLJNI12tst.lib" \java\GL4Java\GL4Java\Win32VC6\temp\OpenGL_JauJNI12tst_dynfuncs.obj +\java\GL4Java\GL4Java\Win32VC6\libs\GL4JavaJauGljJNI12.lib ] -Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP28.tmp" +Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP42.tmp"

Ausgabefenster

Kompilierung läuft... OpenGL_JauJNI12tst_dynfuncs.c diff --git a/Win32VC6/GL4JavaJauGLJNInf/GL4JavaJauGLJNInf.plg b/Win32VC6/GL4JavaJauGLJNInf/GL4JavaJauGLJNInf.plg index 9d6afd4..eba5d24 100755 --- a/Win32VC6/GL4JavaJauGLJNInf/GL4JavaJauGLJNInf.plg +++ b/Win32VC6/GL4JavaJauGLJNInf/GL4JavaJauGLJNInf.plg @@ -6,18 +6,19 @@ --------------------Konfiguration: GL4JavaJauGLJNInf - Win32 Release--------------------

Befehlszeilen

-Erstellen der temporären Datei "D:\TEMP\RSP2C.tmp" mit Inhalten +Erstellen der temporären Datei "D:\TEMP\RSP46.tmp" mit Inhalten [ /nologo /MT /W3 /GX /O2 /I "d:\java2\include" /I "d:\java2\include\win32" /I "..\..\CCLassHeaders" /I "..\..\CNativeCode" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WIN32_" /D "_MSVC_" /D "_MT" /D "_GL_DYNAMIC_BINDING_" /Fo"../temp/" /Fd"../temp/" /FD /c "P:\java\GL4Java\GL4Java\CNativeCode\OpenGL_JauJNInf_dynfuncs.c" ] -Creating command line "cl.exe @D:\TEMP\RSP2C.tmp" -Erstellen der temporären Datei "D:\TEMP\RSP2D.tmp" mit Inhalten +Creating command line "cl.exe @D:\TEMP\RSP46.tmp" +Erstellen der temporären Datei "D:\TEMP\RSP47.tmp" mit Inhalten [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib ../libs/GL4JavaJauGljJNI.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"../libs/GL4JavaJauGLJNInf.pdb" /machine:I386 /out:"../libs/GL4JavaJauGLJNInf.dll" /implib:"../libs/GL4JavaJauGLJNInf.lib" \java\GL4Java\GL4Java\Win32VC6\temp\OpenGL_JauJNInf_dynfuncs.obj +\java\GL4Java\GL4Java\Win32VC6\libs\GL4JavaJauGljJNI.lib ] -Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP2D.tmp" +Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP47.tmp"

Ausgabefenster

Kompilierung läuft... OpenGL_JauJNInf_dynfuncs.c diff --git a/Win32VC6/GL4JavaJauGLJNItst/GL4JavaJauGLJNItst.plg b/Win32VC6/GL4JavaJauGLJNItst/GL4JavaJauGLJNItst.plg index 413f0f6..51f5fed 100755 --- a/Win32VC6/GL4JavaJauGLJNItst/GL4JavaJauGLJNItst.plg +++ b/Win32VC6/GL4JavaJauGLJNItst/GL4JavaJauGLJNItst.plg @@ -6,18 +6,19 @@ --------------------Konfiguration: GL4JavaJauGLJNItst - Win32 Release--------------------

Befehlszeilen

-Erstellen der temporären Datei "D:\TEMP\RSP31.tmp" mit Inhalten +Erstellen der temporären Datei "D:\TEMP\RSP4B.tmp" mit Inhalten [ /nologo /MT /W3 /GX /O2 /I "d:\java2\include" /I "d:\java2\include\win32" /I "..\..\CCLassHeaders" /I "..\..\CNativeCode" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WIN32_" /D "_MSVC_" /D "_MT" /D "_GL_DYNAMIC_BINDING_" /Fo"../temp/" /Fd"../temp/" /FD /c "P:\java\GL4Java\GL4Java\CNativeCode\OpenGL_JauJNItst_dynfuncs.c" ] -Creating command line "cl.exe @D:\TEMP\RSP31.tmp" -Erstellen der temporären Datei "D:\TEMP\RSP32.tmp" mit Inhalten +Creating command line "cl.exe @D:\TEMP\RSP4B.tmp" +Erstellen der temporären Datei "D:\TEMP\RSP4C.tmp" mit Inhalten [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib ../libs/GL4JavaJauGljJNI.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"../libs/GL4JavaJauGLJNItst.pdb" /machine:I386 /out:"../libs/GL4JavaJauGLJNItst.dll" /implib:"../libs/GL4JavaJauGLJNItst.lib" \java\GL4Java\GL4Java\Win32VC6\temp\OpenGL_JauJNItst_dynfuncs.obj +\java\GL4Java\GL4Java\Win32VC6\libs\GL4JavaJauGljJNI.lib ] -Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP32.tmp" +Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP4C.tmp"

Ausgabefenster

Kompilierung läuft... OpenGL_JauJNItst_dynfuncs.c diff --git a/Win32VC6/GL4JavaJauGLUJNI/GL4JavaJauGLUJNI.plg b/Win32VC6/GL4JavaJauGLUJNI/GL4JavaJauGLUJNI.plg index ab261ab..8f37e76 100755 --- a/Win32VC6/GL4JavaJauGLUJNI/GL4JavaJauGLUJNI.plg +++ b/Win32VC6/GL4JavaJauGLUJNI/GL4JavaJauGLUJNI.plg @@ -6,20 +6,21 @@ --------------------Konfiguration: GL4JavaJauGLUJNI - Win32 Release--------------------

Befehlszeilen

-Erstellen der temporären Datei "D:\TEMP\RSP36.tmp" mit Inhalten +Erstellen der temporären Datei "D:\TEMP\RSP50.tmp" mit Inhalten [ /nologo /MT /W3 /GX /O2 /I "d:\java2\include" /I "d:\java2\include\win32" /I "..\..\CCLassHeaders" /I "..\..\CNativeCode" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WIN32_" /D "_MSVC_" /D "_MT" /D "_GL_DYNAMIC_BINDING_" /Fo"../temp/" /Fd"../temp/" /FD /c "P:\java\GL4Java\GL4Java\CNativeCode\GLUCallbackJNI.c" "P:\java\GL4Java\GL4Java\CNativeCode\OpenGLU_JauJNI_funcs.c" ] -Creating command line "cl.exe @D:\TEMP\RSP36.tmp" -Erstellen der temporären Datei "D:\TEMP\RSP37.tmp" mit Inhalten +Creating command line "cl.exe @D:\TEMP\RSP50.tmp" +Erstellen der temporären Datei "D:\TEMP\RSP51.tmp" mit Inhalten [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib ../libs/GL4JavaJauGljJNI.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"../libs/GL4JavaJauGLUJNI.pdb" /machine:I386 /out:"../libs/GL4JavaJauGLUJNI.dll" /implib:"../libs/GL4JavaJauGLUJNI.lib" \java\GL4Java\GL4Java\Win32VC6\temp\GLUCallbackJNI.obj \java\GL4Java\GL4Java\Win32VC6\temp\OpenGLU_JauJNI_funcs.obj +\java\GL4Java\GL4Java\Win32VC6\libs\GL4JavaJauGljJNI.lib ] -Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP37.tmp" +Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP51.tmp"

Ausgabefenster

Kompilierung läuft... GLUCallbackJNI.c diff --git a/Win32VC6/GL4JavaJauGLUJNI12/GL4JavaJauGLUJNI12.plg b/Win32VC6/GL4JavaJauGLUJNI12/GL4JavaJauGLUJNI12.plg index d132652..689206e 100755 --- a/Win32VC6/GL4JavaJauGLUJNI12/GL4JavaJauGLUJNI12.plg +++ b/Win32VC6/GL4JavaJauGLUJNI12/GL4JavaJauGLUJNI12.plg @@ -6,19 +6,20 @@ --------------------Konfiguration: GL4JavaJauGLUJNI12 - Win32 Release--------------------

Befehlszeilen

-Erstellen der temporären Datei "D:\TEMP\RSP3B.tmp" mit Inhalten +Erstellen der temporären Datei "D:\TEMP\RSP55.tmp" mit Inhalten [ /nologo /MT /W3 /GX /O2 /I "d:\java2\include" /I "d:\java2\include\win32" /I "..\..\CCLassHeaders" /I "..\..\CNativeCode" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WIN32_" /D "_MSVC_" /D "_MT" /D "_GL_DYNAMIC_BINDING_" /Fo"../temp/" /Fd"../temp/" /FD /c "P:\java\GL4Java\GL4Java\CNativeCode\OpenGLU_JauJNI12_funcs.c" ] -Creating command line "cl.exe @D:\TEMP\RSP3B.tmp" -Erstellen der temporären Datei "D:\TEMP\RSP3C.tmp" mit Inhalten +Creating command line "cl.exe @D:\TEMP\RSP55.tmp" +Erstellen der temporären Datei "D:\TEMP\RSP56.tmp" mit Inhalten [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib ../libs/GL4JavaJauGljJNI12.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"../libs/GL4JavaJauGLUJNI12.pdb" /machine:I386 /out:"../libs/GL4JavaJauGLUJNI12.dll" /implib:"../libs/GL4JavaJauGLUJNI12.lib" \java\GL4Java\GL4Java\Win32VC6\temp\GLUCallbackJNI.obj \java\GL4Java\GL4Java\Win32VC6\temp\OpenGLU_JauJNI12_funcs.obj +\java\GL4Java\GL4Java\Win32VC6\libs\GL4JavaJauGljJNI12.lib ] -Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP3C.tmp" +Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP56.tmp"

Ausgabefenster

Kompilierung läuft... OpenGLU_JauJNI12_funcs.c diff --git a/Win32VC6/GL4JavaJauGLUJNI12tst/GL4JavaJauGLUJNI12tst.plg b/Win32VC6/GL4JavaJauGLUJNI12tst/GL4JavaJauGLUJNI12tst.plg index e751121..81dd3d0 100755 --- a/Win32VC6/GL4JavaJauGLUJNI12tst/GL4JavaJauGLUJNI12tst.plg +++ b/Win32VC6/GL4JavaJauGLUJNI12tst/GL4JavaJauGLUJNI12tst.plg @@ -6,19 +6,20 @@ --------------------Konfiguration: GL4JavaJauGLUJNI12tst - Win32 Release--------------------

Befehlszeilen

-Erstellen der temporären Datei "D:\TEMP\RSP40.tmp" mit Inhalten +Erstellen der temporären Datei "D:\TEMP\RSP5A.tmp" mit Inhalten [ /nologo /MT /W3 /GX /O2 /I "d:\java2\include" /I "d:\java2\include\win32" /I "..\..\CCLassHeaders" /I "..\..\CNativeCode" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WIN32_" /D "_MSVC_" /D "_MT" /D "_GL_DYNAMIC_BINDING_" /Fo"../temp/" /Fd"../temp/" /FD /c "P:\java\GL4Java\GL4Java\CNativeCode\OpenGLU_JauJNI12tst_funcs.c" ] -Creating command line "cl.exe @D:\TEMP\RSP40.tmp" -Erstellen der temporären Datei "D:\TEMP\RSP41.tmp" mit Inhalten +Creating command line "cl.exe @D:\TEMP\RSP5A.tmp" +Erstellen der temporären Datei "D:\TEMP\RSP5B.tmp" mit Inhalten [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib ../libs/GL4JavaJauGljJNI12.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"../libs/GL4JavaJauGLUJNI12tst.pdb" /machine:I386 /out:"../libs/GL4JavaJauGLUJNI12tst.dll" /implib:"../libs/GL4JavaJauGLUJNI12tst.lib" \java\GL4Java\GL4Java\Win32VC6\temp\GLUCallbackJNI.obj \java\GL4Java\GL4Java\Win32VC6\temp\OpenGLU_JauJNI12tst_funcs.obj +\java\GL4Java\GL4Java\Win32VC6\libs\GL4JavaJauGljJNI12.lib ] -Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP41.tmp" +Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP5B.tmp"

Ausgabefenster

Kompilierung läuft... OpenGLU_JauJNI12tst_funcs.c diff --git a/Win32VC6/GL4JavaJauGLUJNInf/GL4JavaJauGLUJNI.plg b/Win32VC6/GL4JavaJauGLUJNInf/GL4JavaJauGLUJNI.plg index 059db5d..37c8a7d 100755 --- a/Win32VC6/GL4JavaJauGLUJNInf/GL4JavaJauGLUJNI.plg +++ b/Win32VC6/GL4JavaJauGLUJNInf/GL4JavaJauGLUJNI.plg @@ -6,19 +6,20 @@ --------------------Konfiguration: GL4JavaJauGLUJNInf - Win32 Release--------------------

Befehlszeilen

-Erstellen der temporären Datei "D:\TEMP\RSP45.tmp" mit Inhalten +Erstellen der temporären Datei "D:\TEMP\RSP5F.tmp" mit Inhalten [ /nologo /MT /W3 /GX /O2 /I "d:\java2\include" /I "d:\java2\include\win32" /I "..\..\CCLassHeaders" /I "..\..\CNativeCode" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WIN32_" /D "_MSVC_" /D "_MT" /D "_GL_DYNAMIC_BINDING_" /Fo"../temp/" /Fd"../temp/" /FD /c "P:\java\GL4Java\GL4Java\CNativeCode\OpenGLU_JauJNInf_funcs.c" ] -Creating command line "cl.exe @D:\TEMP\RSP45.tmp" -Erstellen der temporären Datei "D:\TEMP\RSP46.tmp" mit Inhalten +Creating command line "cl.exe @D:\TEMP\RSP5F.tmp" +Erstellen der temporären Datei "D:\TEMP\RSP60.tmp" mit Inhalten [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib ../libs/GL4JavaJauGljJNI.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"../libs/GL4JavaJauGLUJNInf.pdb" /machine:I386 /out:"../libs/GL4JavaJauGLUJNInf.dll" /implib:"../libs/GL4JavaJauGLUJNInf.lib" \java\GL4Java\GL4Java\Win32VC6\temp\GLUCallbackJNI.obj \java\GL4Java\GL4Java\Win32VC6\temp\OpenGLU_JauJNInf_funcs.obj +\java\GL4Java\GL4Java\Win32VC6\libs\GL4JavaJauGljJNI.lib ] -Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP46.tmp" +Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP60.tmp"

Ausgabefenster

Kompilierung läuft... OpenGLU_JauJNInf_funcs.c diff --git a/Win32VC6/GL4JavaJauGLUJNItst/GL4JavaJauGLUJNItst.plg b/Win32VC6/GL4JavaJauGLUJNItst/GL4JavaJauGLUJNItst.plg index 6906667..cfdc04c 100755 --- a/Win32VC6/GL4JavaJauGLUJNItst/GL4JavaJauGLUJNItst.plg +++ b/Win32VC6/GL4JavaJauGLUJNItst/GL4JavaJauGLUJNItst.plg @@ -6,19 +6,20 @@ --------------------Konfiguration: GL4JavaJauGLUJNItst - Win32 Release--------------------

Befehlszeilen

-Erstellen der temporären Datei "D:\TEMP\RSP4A.tmp" mit Inhalten +Erstellen der temporären Datei "D:\TEMP\RSP64.tmp" mit Inhalten [ /nologo /MT /W3 /GX /O2 /I "d:\java2\include" /I "d:\java2\include\win32" /I "..\..\CCLassHeaders" /I "..\..\CNativeCode" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WIN32_" /D "_MSVC_" /D "_MT" /D "_GL_DYNAMIC_BINDING_" /Fo"../temp/" /Fd"../temp/" /FD /c "P:\java\GL4Java\GL4Java\CNativeCode\OpenGLU_JauJNItst_funcs.c" ] -Creating command line "cl.exe @D:\TEMP\RSP4A.tmp" -Erstellen der temporären Datei "D:\TEMP\RSP4B.tmp" mit Inhalten +Creating command line "cl.exe @D:\TEMP\RSP64.tmp" +Erstellen der temporären Datei "D:\TEMP\RSP65.tmp" mit Inhalten [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib glu32.lib ../libs/GL4JavaJauGljJNI.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"../libs/GL4JavaJauGLUJNItst.pdb" /machine:I386 /out:"../libs/GL4JavaJauGLUJNItst.dll" /implib:"../libs/GL4JavaJauGLUJNItst.lib" \java\GL4Java\GL4Java\Win32VC6\temp\GLUCallbackJNI.obj \java\GL4Java\GL4Java\Win32VC6\temp\OpenGLU_JauJNItst_funcs.obj +\java\GL4Java\GL4Java\Win32VC6\libs\GL4JavaJauGljJNI.lib ] -Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP4B.tmp" +Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP65.tmp"

Ausgabefenster

Kompilierung läuft... OpenGLU_JauJNItst_funcs.c diff --git a/Win32VC6/GL4JavaJauGljJNI/GL4JavaJauGljJNI.dsp b/Win32VC6/GL4JavaJauGljJNI/GL4JavaJauGljJNI.dsp index cff369f..43aa508 100755 --- a/Win32VC6/GL4JavaJauGljJNI/GL4JavaJauGljJNI.dsp +++ b/Win32VC6/GL4JavaJauGljJNI/GL4JavaJauGljJNI.dsp @@ -40,7 +40,6 @@ RSC=rc.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /I "d:\java2\include" /I "d:\java2\include\win32" /I "..\..\CCLassHeaders" /I "..\..\CNativeCode" /D "NO_VSNPRINTF" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WIN32_" /D "_MSVC_" /D "_MT" /D "_GL_DYNAMIC_BINDING_" /FD /c -# SUBTRACT CPP /Z # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD BASE RSC /l 0x407 /d "NDEBUG" @@ -71,5 +70,13 @@ SOURCE=..\..\CNativeCode\OpenGL_misc.c SOURCE=..\..\CNativeCode\OpenGL_Win32.c # End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\OpenGL_Win32_common.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\OpenGL_Win32_common.h +# End Source File # End Target # End Project diff --git a/Win32VC6/GL4JavaJauGljJNI/GL4JavaJauGljJNI.plg b/Win32VC6/GL4JavaJauGljJNI/GL4JavaJauGljJNI.plg index 90cada5..6780779 100755 --- a/Win32VC6/GL4JavaJauGljJNI/GL4JavaJauGljJNI.plg +++ b/Win32VC6/GL4JavaJauGljJNI/GL4JavaJauGljJNI.plg @@ -6,7 +6,7 @@ --------------------Konfiguration: GL4JavaJauGljJNI - Win32 Release--------------------

Befehlszeilen

-Erstellen der temporären Datei "D:\TEMP\RSP14.tmp" mit Inhalten +Erstellen der temporären Datei "D:\TEMP\RSP174.tmp" mit Inhalten [ /nologo /MT /W3 /GX /O2 /I "d:\java2\include" /I "d:\java2\include\win32" /I "..\..\CCLassHeaders" /I "..\..\CNativeCode" /D "NO_VSNPRINTF" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WIN32_" /D "_MSVC_" /D "_MT" /D "_GL_DYNAMIC_BINDING_" /Fo"../temp/" /Fd"../temp/" /FD /c "P:\java\GL4Java\GL4Java\CNativeCode\GLCallbackHelperJNI.c" @@ -14,16 +14,17 @@ Erstellen der tempor "P:\java\GL4Java\GL4Java\CNativeCode\OpenGL_misc.c" "P:\java\GL4Java\GL4Java\CNativeCode\OpenGL_Win32.c" ] -Creating command line "cl.exe @D:\TEMP\RSP14.tmp" -Erstellen der temporären Datei "D:\TEMP\RSP15.tmp" mit Inhalten +Creating command line "cl.exe @D:\TEMP\RSP174.tmp" +Erstellen der temporären Datei "D:\TEMP\RSP175.tmp" mit Inhalten [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"../libs/GL4JavaJauGljJNI.pdb" /machine:I386 /out:"../libs/GL4JavaJauGljJNI.dll" /implib:"../libs/GL4JavaJauGljJNI.lib" \java\GL4Java\GL4Java\Win32VC6\temp\GLCallbackHelperJNI.obj \java\GL4Java\GL4Java\Win32VC6\temp\jnitools.obj \java\GL4Java\GL4Java\Win32VC6\temp\OpenGL_misc.obj \java\GL4Java\GL4Java\Win32VC6\temp\OpenGL_Win32.obj +\java\GL4Java\GL4Java\Win32VC6\temp\OpenGL_Win32_common.obj ] -Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP15.tmp" +Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP175.tmp"

Ausgabefenster

Kompilierung läuft... GLCallbackHelperJNI.c @@ -38,6 +39,59 @@ Linker-Vorgang l

Ergebnisse

GL4JavaJauGljJNI.dll - 0 Fehler, 0 Warnung(en) +

+--------------------Konfiguration: GL4JavaJauGljJNI12 - Win32 Release-------------------- +

+

Befehlszeilen

+Erstellen der temporären Datei "D:\TEMP\RSP179.tmp" mit Inhalten +[ +/nologo /MT /W3 /GX /O2 /I "d:\java2\include" /I "d:\java2\include\win32" /I "..\..\CCLassHeaders" /I "..\..\CNativeCode" /D "NO_VSNPRINTF" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WIN32_" /D "_MSVC_" /D "_MT" /D "_GL_DYNAMIC_BINDING_" /Fo"../temp/" /Fd"../temp/" /FD /c +"P:\java\GL4Java\GL4Java\CNativeCode\jni12tools.c" +] +Creating command line "cl.exe @D:\TEMP\RSP179.tmp" +Erstellen der temporären Datei "D:\TEMP\RSP17A.tmp" mit Inhalten +[ +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"../libs/GL4JavaJauGljJNI12.pdb" /machine:I386 /out:"../libs/GL4JavaJauGljJNI12.dll" /implib:"../libs/GL4JavaJauGljJNI12.lib" +\java\GL4Java\GL4Java\Win32VC6\temp\GLCallbackHelperJNI.obj +\java\GL4Java\GL4Java\Win32VC6\temp\jni12tools.obj +\java\GL4Java\GL4Java\Win32VC6\temp\OpenGL_misc.obj +\java\GL4Java\GL4Java\Win32VC6\temp\OpenGL_Win32.obj +\java\GL4Java\GL4Java\Win32VC6\temp\OpenGL_Win32_common.obj +] +Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP17A.tmp" +

Ausgabefenster

+Kompilierung läuft... +jni12tools.c +Linker-Vorgang läuft... + Bibliothek ../libs/GL4JavaJauGljJNI12.lib und Objekt ../libs/GL4JavaJauGljJNI12.exp wird erstellt + + + +

Ergebnisse

+GL4JavaJauGljJNI12.dll - 0 Fehler, 0 Warnung(en) +

+--------------------Konfiguration: GL4JavaJauGljJNI13 - Win32 Release-------------------- +

+

Befehlszeilen

+Erstellen der temporären Datei "D:\TEMP\RSP17E.tmp" mit Inhalten +[ +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib jawt.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"../libs/GL4JavaJauGljJNI13.pdb" /machine:I386 /nodefaultlib:"jawt.lib" /out:"../libs/GL4JavaJauGljJNI13.dll" /implib:"../libs/GL4JavaJauGljJNI13.lib" /libpath:"d:\java2\lib" /libpath:"d:\java2\jre\bin" +\java\GL4Java\GL4Java\Win32VC6\temp\GLCallbackHelperJNI.obj +\java\GL4Java\GL4Java\Win32VC6\temp\jni12tools.obj +\java\GL4Java\GL4Java\Win32VC6\temp\OpenGL_misc.obj +\java\GL4Java\GL4Java\Win32VC6\temp\jawt_misc.obj +\java\GL4Java\GL4Java\Win32VC6\temp\OpenGL_Win32_common.obj +\java\GL4Java\GL4Java\Win32VC6\temp\OpenGL_Win32_jawt.obj +] +Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP17E.tmp" +

Ausgabefenster

+Linker-Vorgang läuft... + Bibliothek ../libs/GL4JavaJauGljJNI13.lib und Objekt ../libs/GL4JavaJauGljJNI13.exp wird erstellt + + + +

Ergebnisse

+GL4JavaJauGljJNI13.dll - 0 Fehler, 0 Warnung(en)
diff --git a/Win32VC6/GL4JavaJauGljJNI12/GL4JavaJauGljJNI12.dsp b/Win32VC6/GL4JavaJauGljJNI12/GL4JavaJauGljJNI12.dsp index c323340..28faec0 100755 --- a/Win32VC6/GL4JavaJauGljJNI12/GL4JavaJauGljJNI12.dsp +++ b/Win32VC6/GL4JavaJauGljJNI12/GL4JavaJauGljJNI12.dsp @@ -40,7 +40,6 @@ RSC=rc.exe # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c # ADD CPP /nologo /MT /W3 /GX /O2 /I "d:\java2\include" /I "d:\java2\include\win32" /I "..\..\CCLassHeaders" /I "..\..\CNativeCode" /D "NO_VSNPRINTF" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WIN32_" /D "_MSVC_" /D "_MT" /D "_GL_DYNAMIC_BINDING_" /FD /c -# SUBTRACT CPP /Z # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD BASE RSC /l 0x407 /d "NDEBUG" @@ -71,5 +70,9 @@ SOURCE=..\..\CNativeCode\OpenGL_misc.c SOURCE=..\..\CNativeCode\OpenGL_Win32.c # End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\OpenGL_Win32_common.c +# End Source File # End Target # End Project diff --git a/Win32VC6/GL4JavaJauGljJNI12/GL4JavaJauGljJNI12.plg b/Win32VC6/GL4JavaJauGljJNI12/GL4JavaJauGljJNI12.plg index 6d28890..3389844 100755 --- a/Win32VC6/GL4JavaJauGljJNI12/GL4JavaJauGljJNI12.plg +++ b/Win32VC6/GL4JavaJauGljJNI12/GL4JavaJauGljJNI12.plg @@ -6,24 +6,25 @@ --------------------Konfiguration: GL4JavaJauGljJNI12 - Win32 Release--------------------

Befehlszeilen

-Erstellen der temporären Datei "D:\TEMP\RSP19.tmp" mit Inhalten +Erstellen der temporären Datei "D:\TEMP\RSPEB.tmp" mit Inhalten [ /nologo /MT /W3 /GX /O2 /I "d:\java2\include" /I "d:\java2\include\win32" /I "..\..\CCLassHeaders" /I "..\..\CNativeCode" /D "NO_VSNPRINTF" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WIN32_" /D "_MSVC_" /D "_MT" /D "_GL_DYNAMIC_BINDING_" /Fo"../temp/" /Fd"../temp/" /FD /c -"P:\java\GL4Java\GL4Java\CNativeCode\jni12tools.c" +"P:\java\GL4Java\GL4Java\CNativeCode\OpenGL_Win32.c" ] -Creating command line "cl.exe @D:\TEMP\RSP19.tmp" -Erstellen der temporären Datei "D:\TEMP\RSP1A.tmp" mit Inhalten +Creating command line "cl.exe @D:\TEMP\RSPEB.tmp" +Erstellen der temporären Datei "D:\TEMP\RSPEC.tmp" mit Inhalten [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"../libs/GL4JavaJauGljJNI12.pdb" /machine:I386 /out:"../libs/GL4JavaJauGljJNI12.dll" /implib:"../libs/GL4JavaJauGljJNI12.lib" \java\GL4Java\GL4Java\Win32VC6\temp\GLCallbackHelperJNI.obj \java\GL4Java\GL4Java\Win32VC6\temp\jni12tools.obj \java\GL4Java\GL4Java\Win32VC6\temp\OpenGL_misc.obj \java\GL4Java\GL4Java\Win32VC6\temp\OpenGL_Win32.obj +\java\GL4Java\GL4Java\Win32VC6\temp\OpenGL_Win32_common.obj ] -Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP1A.tmp" +Erstellen der Befehlzeile "link.exe @D:\TEMP\RSPEC.tmp"

Ausgabefenster

Kompilierung läuft... -jni12tools.c +OpenGL_Win32.c Linker-Vorgang läuft... Bibliothek ../libs/GL4JavaJauGljJNI12.lib und Objekt ../libs/GL4JavaJauGljJNI12.exp wird erstellt diff --git a/Win32VC6/GL4JavaMSJDirect/GL4JavaMSJDirect.plg b/Win32VC6/GL4JavaMSJDirect/GL4JavaMSJDirect.plg index a71dd6d..d7671cc 100755 --- a/Win32VC6/GL4JavaMSJDirect/GL4JavaMSJDirect.plg +++ b/Win32VC6/GL4JavaMSJDirect/GL4JavaMSJDirect.plg @@ -6,18 +6,19 @@ --------------------Konfiguration: GL4JavaMSJDirect - Win32 Release--------------------

Befehlszeilen

-Erstellen der temporären Datei "D:\TEMP\RSP4F.tmp" mit Inhalten +Erstellen der temporären Datei "D:\TEMP\RSP69.tmp" mit Inhalten [ /nologo /MT /W3 /GX /O2 /I "d:\java2\include" /I "d:\java2\include\win32" /I "..\..\CCLassHeaders" /I "..\..\CNativeCode" /D "NO_VSNPRINTF" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WIN32_" /D "_MSVC_" /D "_MT" /D "_GL_DYNAMIC_BINDING_" /Fo"../temp/" /Fd"../temp/" /FD /c "P:\java\GL4Java\GL4Java\CNativeCode\OpenGL_Win32_JDirect.c" ] -Creating command line "cl.exe @D:\TEMP\RSP4F.tmp" -Erstellen der temporären Datei "D:\TEMP\RSP50.tmp" mit Inhalten +Creating command line "cl.exe @D:\TEMP\RSP69.tmp" +Erstellen der temporären Datei "D:\TEMP\RSP6A.tmp" mit Inhalten [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib ../libs/GL4JavaJauGljJNI.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"../libs/GL4JavaGljMSJDirect.pdb" /machine:I386 /out:"../libs/GL4JavaGljMSJDirect.dll" /implib:"../libs/GL4JavaGljMSJDirect.lib" \java\GL4Java\GL4Java\Win32VC6\temp\OpenGL_Win32_JDirect.obj +\java\GL4Java\GL4Java\Win32VC6\libs\GL4JavaJauGljJNI.lib ] -Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP50.tmp" +Erstellen der Befehlzeile "link.exe @D:\TEMP\RSP6A.tmp"

Ausgabefenster

Kompilierung läuft... OpenGL_Win32_JDirect.c diff --git a/Win32VC6/Win32VC6.dsw b/Win32VC6/Win32VC6.dsw index 73a463c..bee10b8 100755 --- a/Win32VC6/Win32VC6.dsw +++ b/Win32VC6/Win32VC6.dsw @@ -11,6 +11,9 @@ Package=<5> Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name GL4JavaJauGljJNI + End Project Dependency }}} ############################################################################### @@ -23,6 +26,9 @@ Package=<5> Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name GL4JavaJauGljJNI12 + End Project Dependency }}} ############################################################################### @@ -35,6 +41,9 @@ Package=<5> Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name GL4JavaJauGljJNI12 + End Project Dependency }}} ############################################################################### @@ -47,6 +56,9 @@ Package=<5> Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name GL4JavaJauGljJNI + End Project Dependency }}} ############################################################################### @@ -59,6 +71,9 @@ Package=<5> Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name GL4JavaJauGljJNI + End Project Dependency }}} ############################################################################### @@ -71,6 +86,9 @@ Package=<5> Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name GL4JavaJauGljJNI + End Project Dependency }}} ############################################################################### @@ -83,6 +101,9 @@ Package=<5> Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name GL4JavaJauGljJNI12 + End Project Dependency }}} ############################################################################### @@ -95,6 +116,9 @@ Package=<5> Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name GL4JavaJauGljJNI12 + End Project Dependency }}} ############################################################################### @@ -107,6 +131,9 @@ Package=<5> Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name GL4JavaJauGljJNI + End Project Dependency }}} ############################################################################### @@ -119,6 +146,9 @@ Package=<5> Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name GL4JavaJauGljJNI + End Project Dependency }}} ############################################################################### @@ -147,6 +177,18 @@ Package=<4> ############################################################################### +Project: "GL4JavaJauGljJNI13"=.\GL4JavaJauGljJNI13\GL4JavaJauGljJNI13.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Project: "GL4JavaMSJDirect"=.\GL4JavaMSJDirect\GL4JavaMSJDirect.dsp - Package Owner=<4> Package=<5> @@ -155,6 +197,9 @@ Package=<5> Package=<4> {{{ + Begin Project Dependency + Project_Dep_Name GL4JavaJauGljJNI + End Project Dependency }}} ############################################################################### diff --git a/demos/GLLandScape/GLLandScape1.java b/demos/GLLandScape/GLLandScape1.java index 209f6db..25ed9cf 100644 --- a/demos/GLLandScape/GLLandScape1.java +++ b/demos/GLLandScape/GLLandScape1.java @@ -577,6 +577,7 @@ class GLLandScape1 extends GLAnimCanvas gl.glEnable(GL_TEXTURE_2D); texture_mapping = TRUE; glj.gljCheckGL(); + glj.gljFree(); repaint(); } } @@ -595,6 +596,7 @@ class GLLandScape1 extends GLAnimCanvas gl.glDisable(GL_TEXTURE_2D); texture_mapping = FALSE; glj.gljCheckGL(); + glj.gljFree(); repaint(); } } @@ -623,6 +625,7 @@ class GLLandScape1 extends GLAnimCanvas gl.glEnable(GL_FOG); land_fogging = TRUE; glj.gljCheckGL(); + glj.gljFree(); repaint(); } } @@ -641,6 +644,7 @@ class GLLandScape1 extends GLAnimCanvas gl.glDisable(GL_FOG); land_fogging = FALSE; glj.gljCheckGL(); + glj.gljFree(); repaint(); } } @@ -669,6 +673,7 @@ class GLLandScape1 extends GLAnimCanvas gl.glShadeModel(GL_FLAT); flat_shading = TRUE; glj.gljCheckGL(); + glj.gljFree(); repaint(); } } @@ -687,6 +692,7 @@ class GLLandScape1 extends GLAnimCanvas gl.glShadeModel(GL_SMOOTH); flat_shading = FALSE; glj.gljCheckGL(); + glj.gljFree(); repaint(); } } @@ -706,6 +712,7 @@ class GLLandScape1 extends GLAnimCanvas gl.glDeleteLists(theLand, 1); genLand(); check_height(); + glj.gljFree(); repaint(); setSuspended(false); } diff --git a/demos/GLLandScape/GLLandScape1w1.java b/demos/GLLandScape/GLLandScape1w1.java index 9f6f1a3..cef739a 100644 --- a/demos/GLLandScape/GLLandScape1w1.java +++ b/demos/GLLandScape/GLLandScape1w1.java @@ -187,7 +187,7 @@ class GLLandScape1w1 extends GLAnimCanvas Dimension dim = getSize(); reshape(dim.width,dim.height); - myMove(FORWARD,mySpeed,true,false); + myMove(FORWARD,mySpeed,true); check_height(); repaint(); /* and start our working thread ... */ @@ -216,7 +216,7 @@ class GLLandScape1w1 extends GLAnimCanvas if(flat_shading == FALSE) gl.glShadeModel(GL_SMOOTH); - myMove(FORWARD,mySpeed,true,false); + myMove(FORWARD,mySpeed,true); check_height(); @@ -247,7 +247,6 @@ class GLLandScape1w1 extends GLAnimCanvas planes[i].theta = ((float)(random.nextInt() % 257))*0.1111f; planes[i].tick(); - if (isSuspended()) repaint(); System.out.println("plane added"); return; } @@ -261,7 +260,6 @@ class GLLandScape1w1 extends GLAnimCanvas if (planes[i].speed != 0.0f) { planes[i].speed = 0.0f; - if (isSuspended()) repaint(); System.out.println("plane removed"); return; } @@ -432,7 +430,7 @@ class GLLandScape1w1 extends GLAnimCanvas /* Function that moves the eye / turns the angle of sight. */ /* Updates scene if update. */ - void myMove(int dir, float amount, boolean update, boolean fetchGLContext) + void myMove(int dir, float amount, boolean update) { float diff = (float)Math.sqrt(lookx * lookx + lookz * lookz); /* @@ -448,7 +446,6 @@ class GLLandScape1w1 extends GLAnimCanvas alpha+=(float)((3.0*Math.PI)/2.0); float _alpha = (float) (alpha*180f/Math.PI ); */ - boolean do_repaint = false; lookx /= diff; lookz /= diff; //myDir=dir; @@ -464,7 +461,6 @@ class GLLandScape1w1 extends GLAnimCanvas // lookx^2 + lookz^2 != 1 for some reason. Fix. lookx /= diff; lookz /= diff; - do_repaint = true; break; case STRAFELEFT: posx += lookz * amount; @@ -472,15 +468,12 @@ class GLLandScape1w1 extends GLAnimCanvas break; case UP: posy += amount; - do_repaint = true; break; case LOOKUP: looky += amount; - do_repaint = true; break; case LOOKSET: looky = amount; - do_repaint = true; break; } int x = (int)(posx / (comp * 1.0f)); @@ -495,21 +488,10 @@ class GLLandScape1w1 extends GLAnimCanvas posz = MAP * comp; if (update) { - if(fetchGLContext && glj.gljMakeCurrent() == false) - { - System.out.println("problem in use() method"); - return; - } gl.glMatrixMode(GL_MODELVIEW); gl.glLoadIdentity(); glu.gluLookAt(posx,posy,posz, posx+lookx, posy+looky, posz+lookz, 0.0f,1.0f,0.0f); - - if(fetchGLContext) - glj.gljFree(); - - if( do_repaint ) - repaint(); } } @@ -603,7 +585,6 @@ class GLLandScape1w1 extends GLAnimCanvas public void reshape(int w, int h) { - glj.gljResize(w,h); gl.glViewport(0,0,w,h); gl.glMatrixMode(GL_PROJECTION); gl.glLoadIdentity(); @@ -644,7 +625,7 @@ class GLLandScape1w1 extends GLAnimCanvas gl.glEnable(GL_TEXTURE_2D); texture_mapping = TRUE; glj.gljCheckGL(); - repaint(); + glj.gljFree(); } } } @@ -662,7 +643,7 @@ class GLLandScape1w1 extends GLAnimCanvas gl.glDisable(GL_TEXTURE_2D); texture_mapping = FALSE; glj.gljCheckGL(); - repaint(); + glj.gljFree(); } } } @@ -690,7 +671,7 @@ class GLLandScape1w1 extends GLAnimCanvas gl.glEnable(GL_FOG); land_fogging = TRUE; glj.gljCheckGL(); - repaint(); + glj.gljFree(); } } } @@ -708,7 +689,7 @@ class GLLandScape1w1 extends GLAnimCanvas gl.glDisable(GL_FOG); land_fogging = FALSE; glj.gljCheckGL(); - repaint(); + glj.gljFree(); } } } @@ -736,7 +717,7 @@ class GLLandScape1w1 extends GLAnimCanvas gl.glShadeModel(GL_FLAT); flat_shading = TRUE; glj.gljCheckGL(); - repaint(); + glj.gljFree(); } } } @@ -754,7 +735,7 @@ class GLLandScape1w1 extends GLAnimCanvas gl.glShadeModel(GL_SMOOTH); flat_shading = FALSE; glj.gljCheckGL(); - repaint(); + glj.gljFree(); } } } @@ -773,9 +754,26 @@ class GLLandScape1w1 extends GLAnimCanvas gl.glDeleteLists(theLand, 1); genLand(); check_height(); - repaint(); setSuspended(false); + glj.gljFree(); } + public String getGLString(int id) + { + String result = "null"; + if(glj!=null) + { + if(glj.gljMakeCurrent() == false) + { + System.out.println("problem in use() method"); + return result; + } + result = gl.glGetString(id); + glj.gljCheckGL(); + glj.gljFree(); + } + + return result; + } } diff --git a/demos/GLLandScape/GLLandScape1w1Applet.java b/demos/GLLandScape/GLLandScape1w1Applet.java index 90da5f3..ea55f7f 100755 --- a/demos/GLLandScape/GLLandScape1w1Applet.java +++ b/demos/GLLandScape/GLLandScape1w1Applet.java @@ -1,13 +1,14 @@ import gl4java.GLContext; +import gl4java.GLFunc; import java.awt.*; import java.applet.*; import java.awt.event.*; public class GLLandScape1w1Applet extends Applet - implements MouseListener, KeyListener, ActionListener + implements MouseListener, KeyListener, ActionListener, ItemListener { - GLLandScape1w1 landScape = null; + public GLLandScape1w1 landScape = null; Button bAddPlane = null; Button bRemPlane = null; @@ -19,10 +20,16 @@ public class GLLandScape1w1Applet extends Applet Button bFps; TextField tFps; + Checkbox bUseRepaint = null; + Checkbox bUseFpsSleep = null; + boolean gameOn = true; SpeedTimer tMySpeed = null; + GLThread gt1 = null; + GLThread gt2 = null; + public void init() { init(0,0); @@ -51,13 +58,21 @@ public class GLLandScape1w1Applet extends Applet add("East", glFeatures); Panel pFps = new Panel(); - pFps.setLayout(new GridLayout(1,3)); + pFps.setLayout(new GridLayout(1,5)); pFps.add(bInfo =new Button("info")); pFps.add(bFps =new Button("get fps")); pFps.add(tFps =new TextField()); bInfo.addMouseListener(this); bFps.addMouseListener(this); tFps.addActionListener(this); + + bUseRepaint = new Checkbox("repaint", true); + bUseRepaint.addItemListener(this); + pFps.add(bUseRepaint); + bUseFpsSleep = new Checkbox("fps-sleep", true); + bUseFpsSleep.addItemListener(this); + pFps.add(bUseFpsSleep); + add("South", pFps); if(w==0 && h==0) @@ -79,9 +94,16 @@ public class GLLandScape1w1Applet extends Applet add("Center", landScape); } + public void startTestThreads() + { + gt1 = new GLThread(landScape, GLFunc.GL_VENDOR, "gt1"); + gt2 = new GLThread(landScape, GLFunc.GL_VERSION, "gt2"); + gt1.start(); + gt2.start(); + } + public void destroy() { - landScape.stop(); landScape.cvsDispose(); landScape.removeMouseListener(this); landScape.removeKeyListener(this); @@ -114,6 +136,7 @@ public class GLLandScape1w1Applet extends Applet gljLib + ", " + glLib + ", " + gluLib); GLContext.gljNativeDebug = false; + GLContext.gljThreadDebug = false; GLContext.gljClassDebug = false; GLLandScape1w1Applet window = @@ -141,12 +164,39 @@ public class GLLandScape1w1Applet extends Applet Dimension ps = window.getPreferredSize(); f.setBounds(-100,-100,99,99); f.setVisible(true); - f.setVisible(false); + //f.setVisible(false); Insets i = f.getInsets(); f.setBounds(0,0, ps.width+i.left+i.right, ps.height+i.top+i.bottom); f.setVisible(true); + + // ThreadTest + // window.startTestThreads(); + } + + public void itemStateChanged( ItemEvent evt ) + { + ItemSelectable comp = evt.getItemSelectable(); + + if( comp.equals(bUseRepaint) ) + { + if(landScape!=null) + { + landScape.setUseRepaint(bUseRepaint.getState()); + System.out.println("LandScape uses repaint: "+ + bUseRepaint.getState()); + } + } + else if( comp.equals(bUseFpsSleep ) ) + { + if(landScape!=null) + { + landScape.setUseFpsSleep(bUseFpsSleep.getState()); + System.out.println("LandScape uses fps-sleep: "+ + bUseFpsSleep.getState()); + } + } } // Methods required for the implementation of MouseListener @@ -215,12 +265,12 @@ public class GLLandScape1w1Applet extends Applet { if ( key==KeyEvent.VK_LEFT ) { - landScape.myMove(landScape.TURNLEFT, 0.1f, true, true); + landScape.myMove(landScape.TURNLEFT, 0.1f, false); tMySpeed.start(); } else if ( key==KeyEvent.VK_RIGHT ) { - landScape.myMove(landScape.TURNLEFT, -0.1f, true, true); + landScape.myMove(landScape.TURNLEFT, -0.1f, false); tMySpeed.start(); } else if ( key==KeyEvent.VK_UP ) @@ -241,24 +291,24 @@ public class GLLandScape1w1Applet extends Applet float v = tMySpeed.getSpeed(); if ( e.isShiftDown() ) - tMySpeed.setSpeed(v/2.0f); + tMySpeed.setSpeed(v-2.0f); else tMySpeed.setSpeed(v-1.0f); tMySpeed.start(); } else if ( key==KeyEvent.VK_PAGE_UP ) { - landScape.myMove(landScape.LOOKUP, 0.1f, true,true); + landScape.myMove(landScape.LOOKUP, 0.1f, false); tMySpeed.start(); } else if ( key==KeyEvent.VK_PAGE_DOWN ) { - landScape.myMove(landScape.LOOKUP, -0.1f, true,true); + landScape.myMove(landScape.LOOKUP, -0.1f, false); tMySpeed.start(); } else if ( key==KeyEvent.VK_END ) { - landScape.myMove(landScape.LOOKSET, 0f, true,true); + landScape.myMove(landScape.LOOKSET, 0f, false); tMySpeed.start(); } } @@ -306,7 +356,7 @@ public class GLLandScape1w1Applet extends Applet class SpeedTimer implements Runnable { protected Thread me = null; - protected boolean to=false, started=false; + protected boolean to=false; protected int _t; protected float speed = 0.0f; @@ -315,53 +365,130 @@ public class GLLandScape1w1Applet extends Applet public SpeedTimer(GLLandScape1w1 ls, int t) { _ls=ls; _t=t; } - public void start() + public synchronized void start() { - if(me!=null) stop(); - to=false; - started=true; + if(me!=null && to) return; + + stop(); me = new Thread(this); me.start(); } - public void stop() { + public synchronized void stop() { if(me!=null) { - me.stop(); me=null; - started=false; - to=false; + + notifyAll(); + + while(to) { + try { + wait(); + } catch (Exception e) {} + } } } public void run() { if(me!=null) { - try {me.sleep(_t,0);} catch (InterruptedException e){} - to=true; - while(speed>1.0f) + synchronized (this) { + to=true; + notifyAll(); + } + while(me!=null && (-0.2f>=speed || speed>=0.2f) ) { + try {me.sleep(_t,0);} catch (InterruptedException e){} speed/=2.0f; _ls.setMySpeed(speed); - try {me.sleep(_t,0);} catch (InterruptedException e){} + // System.out.println("timer: lower speed: "+speed); } speed = 0.0f; _ls.setMySpeed(0f); + + synchronized (this) { + to=false; + notifyAll(); + } } } public boolean isActive() { return to; } - public boolean isStarted() { return started; } public float getSpeed() { return speed; } public void setSpeed(float v) { speed=v; _ls.setMySpeed(speed); + //System.out.println("timer: set speed: "+speed); } } + class GLThread implements Runnable { + protected Thread me = null; + protected boolean to=false; + protected int _id; + protected String _name; + + protected GLLandScape1w1 _ls; + + public GLThread(GLLandScape1w1 ls, int id, String name) + { _ls=ls; _id=id; _name=name;} + + public synchronized void start() + { + if(me!=null && to) return; + + stop(); + + me = new Thread(this, _name); + me.start(); + } + + public synchronized void stop() { + if(me!=null) + { + me=null; + + notifyAll(); + + while(to) { + try { + wait(); + } catch (Exception e) {} + } + } + } + + public void run() { + if(me!=null) + { + synchronized (this) { + to=true; + notifyAll(); + } + while(me!=null) + { + if(_ls.cvsIsInit()) + { + if(GLContext.gljThreadDebug) + _ls.getGLString(_id); + else + System.out.println("gt: "+_ls.getGLString(_id)); + } + } + + synchronized (this) { + to=false; + notifyAll(); + } + } + } + + public boolean isActive() { return to; } + } + class InfoWin extends Frame implements ActionListener { diff --git a/demos/HodglimsNeHe/Lesson1.java b/demos/HodglimsNeHe/Lesson1.java index fb05de2..b1e883b 100644 --- a/demos/HodglimsNeHe/Lesson1.java +++ b/demos/HodglimsNeHe/Lesson1.java @@ -197,6 +197,7 @@ public class Lesson1 extends Applet //Swap buffers glj.gljSwap(); + glj.gljFree(); } diff --git a/demos/HodglimsNeHe/Lesson11.java b/demos/HodglimsNeHe/Lesson11.java index ad566ee..265a2d2 100644 --- a/demos/HodglimsNeHe/Lesson11.java +++ b/demos/HodglimsNeHe/Lesson11.java @@ -318,6 +318,7 @@ public class Lesson11 extends Applet //Swap buffers glj.gljSwap(); + glj.gljFree(); } diff --git a/demos/HodglimsNeHe/Lesson12.java b/demos/HodglimsNeHe/Lesson12.java index 86a9f02..5de7084 100644 --- a/demos/HodglimsNeHe/Lesson12.java +++ b/demos/HodglimsNeHe/Lesson12.java @@ -346,6 +346,7 @@ public class Lesson12 extends Applet //Swap buffers glj.gljSwap(); + glj.gljFree(); } diff --git a/demos/HodglimsNeHe/Lesson16.java b/demos/HodglimsNeHe/Lesson16.java index 82fa7b7..0d7d125 100644 --- a/demos/HodglimsNeHe/Lesson16.java +++ b/demos/HodglimsNeHe/Lesson16.java @@ -373,6 +373,7 @@ public class Lesson16 extends Applet //Swap buffers glj.gljSwap(); + glj.gljFree(); } @@ -393,6 +394,10 @@ public class Lesson16 extends Applet */ public void keyPressed(KeyEvent e) { + //Ensure GL is initialised correctly + if (glj.gljMakeCurrent(true) == false) + return; + switch(e.getKeyCode()) { //Switch ON/OFF light when L is pressed @@ -487,6 +492,8 @@ public class Lesson16 extends Applet break; } } + glj.gljFree(); + } diff --git a/demos/HodglimsNeHe/Lesson18.java b/demos/HodglimsNeHe/Lesson18.java index b63a627..98bc1cc 100644 --- a/demos/HodglimsNeHe/Lesson18.java +++ b/demos/HodglimsNeHe/Lesson18.java @@ -107,7 +107,7 @@ public class Lesson18 extends Applet int part2; // End Of Disc int p1=0; // Increase 1 int p2=1; // Increase 2 - int quadratic; // Storage For Our Quadratic Objects + long quadratic; // Storage For Our Quadratic Objects int object=0; // Which Object To Draw public renderCanvas(int w, int h) { @@ -278,7 +278,11 @@ public class Lesson18 extends Applet } public void display() { - //Clear The Screen And The Depth Buffer + //Ensure GL is initialised correctly + if (glj.gljMakeCurrent(true) == false) + return; + +//Clear The Screen And The Depth Buffer gl.glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); //Reset The View gl.glLoadIdentity(); @@ -332,12 +336,17 @@ public class Lesson18 extends Applet //Swap buffers glj.gljSwap(); + glj.gljFree(); } public void keyTyped(KeyEvent e) { //We are not handling any keyboard events yet } public void keyPressed(KeyEvent e) { + //Ensure GL is initialised correctly + if (glj.gljMakeCurrent(true) == false) + return; + switch(e.getKeyCode()) { //Switch ON/OFF light when L is pressed case KeyEvent.VK_L: @@ -398,6 +407,8 @@ public class Lesson18 extends Applet } break; } + glj.gljFree(); + } public void keyReleased(KeyEvent e) { switch(e.getKeyCode()) { diff --git a/demos/HodglimsNeHe/Lesson2.java b/demos/HodglimsNeHe/Lesson2.java index 8f6eb2c..12fa7bd 100644 --- a/demos/HodglimsNeHe/Lesson2.java +++ b/demos/HodglimsNeHe/Lesson2.java @@ -216,6 +216,7 @@ public class Lesson2 extends Applet //Swap buffers glj.gljSwap(); + glj.gljFree(); } diff --git a/demos/HodglimsNeHe/Lesson3.java b/demos/HodglimsNeHe/Lesson3.java index b5e3377..d4ac6ea 100644 --- a/demos/HodglimsNeHe/Lesson3.java +++ b/demos/HodglimsNeHe/Lesson3.java @@ -220,6 +220,7 @@ public class Lesson3 extends Applet //Swap buffers glj.gljSwap(); + glj.gljFree(); } diff --git a/demos/HodglimsNeHe/Lesson4.java b/demos/HodglimsNeHe/Lesson4.java index ada7dd5..270b08b 100644 --- a/demos/HodglimsNeHe/Lesson4.java +++ b/demos/HodglimsNeHe/Lesson4.java @@ -240,6 +240,7 @@ public class Lesson4 extends Applet //Swap buffers glj.gljSwap(); + glj.gljFree(); } diff --git a/demos/HodglimsNeHe/Lesson5.java b/demos/HodglimsNeHe/Lesson5.java index 026ecb3..25b565d 100644 --- a/demos/HodglimsNeHe/Lesson5.java +++ b/demos/HodglimsNeHe/Lesson5.java @@ -291,6 +291,7 @@ public class Lesson5 extends Applet //Swap buffers glj.gljSwap(); + glj.gljFree(); } diff --git a/demos/HodglimsNeHe/Lesson6.java b/demos/HodglimsNeHe/Lesson6.java index ae85d76..129a44b 100644 --- a/demos/HodglimsNeHe/Lesson6.java +++ b/demos/HodglimsNeHe/Lesson6.java @@ -293,6 +293,7 @@ public class Lesson6 extends Applet //Swap buffers glj.gljSwap(); + glj.gljFree(); } diff --git a/demos/HodglimsNeHe/Lesson7.java b/demos/HodglimsNeHe/Lesson7.java index d6f65f4..a19a016 100644 --- a/demos/HodglimsNeHe/Lesson7.java +++ b/demos/HodglimsNeHe/Lesson7.java @@ -351,6 +351,7 @@ public class Lesson7 extends Applet //Swap buffers glj.gljSwap(); + glj.gljFree(); } // Methods required for the implementation of MouseListener @@ -396,6 +397,10 @@ public class Lesson7 extends Applet */ public void keyPressed(KeyEvent e) { + //Ensure GL is initialised correctly + if (glj.gljMakeCurrent(true) == false) + return; + switch(e.getKeyCode()) { //Switch ON/OFF light when L is pressed @@ -473,6 +478,8 @@ public class Lesson7 extends Applet break; } } + glj.gljFree(); + } diff --git a/demos/HodglimsNeHe/Lesson8.java b/demos/HodglimsNeHe/Lesson8.java index f8735d5..f0dc1cc 100644 --- a/demos/HodglimsNeHe/Lesson8.java +++ b/demos/HodglimsNeHe/Lesson8.java @@ -360,6 +360,7 @@ public class Lesson8 extends Applet //Swap buffers glj.gljSwap(); + glj.gljFree(); } @@ -380,6 +381,10 @@ public class Lesson8 extends Applet */ public void keyPressed(KeyEvent e) { + //Ensure GL is initialised correctly + if (glj.gljMakeCurrent(true) == false) + return; + switch(e.getKeyCode()) { //Switch ON/OFF light when L is pressed @@ -481,6 +486,8 @@ public class Lesson8 extends Applet break; } } + glj.gljFree(); + } diff --git a/demos/HodglimsNeHe/Lesson9.java b/demos/HodglimsNeHe/Lesson9.java index 4c4a92d..0a43cb8 100644 --- a/demos/HodglimsNeHe/Lesson9.java +++ b/demos/HodglimsNeHe/Lesson9.java @@ -313,6 +313,7 @@ public class Lesson9 extends Applet //Swap buffers glj.gljSwap(); + glj.gljFree(); } diff --git a/demos/HodglimsNeHe/index.html b/demos/HodglimsNeHe/index.html index 88ac1fb..d1993ea 100644 --- a/demos/HodglimsNeHe/index.html +++ b/demos/HodglimsNeHe/index.html @@ -11,7 +11,7 @@ NeHe OpenGL Tutorial Demos originally ported by Hodglim -for GL4Java >= 2.4.0.0:
+for GL4Java >= 2.5.2.0:

This demos have added requestFocus() statements, especially for the events: mouseEntered and mouseClicked !
diff --git a/demos/HodglimsNeHe/index_plugin13.html b/demos/HodglimsNeHe/index_plugin13.html index 754940c..802b8ee 100644 --- a/demos/HodglimsNeHe/index_plugin13.html +++ b/demos/HodglimsNeHe/index_plugin13.html @@ -11,7 +11,7 @@ NeHe OpenGL Tutorial Demos originally ported by Hodglim -for GL4Java >= 2.4.0.0:
+for GL4Java >= 2.5.2.0:

This demos have added requestFocus() statements, especially for the events: mouseEntered and mouseClicked !
diff --git a/demos/MiscDemos/DrawColoredPrimitives.java b/demos/MiscDemos/DrawColoredPrimitives.java index 0e6725b..e65d322 100755 --- a/demos/MiscDemos/DrawColoredPrimitives.java +++ b/demos/MiscDemos/DrawColoredPrimitives.java @@ -60,7 +60,7 @@ public class DrawColoredPrimitives extends SimpleGLAnimApplet1 Dimension ps = applet.getPreferredSize(); f.setBounds(-100,-100,99,99); f.setVisible(true); - f.setVisible(false); + //f.setVisible(false); Insets i = f.getInsets(); f.setBounds(0,0, ps.width+i.left+i.right, diff --git a/demos/MiscDemos/DrawColoredPrimitives2.java b/demos/MiscDemos/DrawColoredPrimitives2.java index fad8668..e67f46b 100644 --- a/demos/MiscDemos/DrawColoredPrimitives2.java +++ b/demos/MiscDemos/DrawColoredPrimitives2.java @@ -54,7 +54,7 @@ public class DrawColoredPrimitives2 extends SimpleGLAnimApplet1 Dimension ps = applet.getPreferredSize(); f.setBounds(-100,-100,99,99); f.setVisible(true); - f.setVisible(false); + //f.setVisible(false); Insets i = f.getInsets(); f.setBounds(0,0, ps.width+i.left+i.right, diff --git a/demos/MiscDemos/GLImageWorld1.java b/demos/MiscDemos/GLImageWorld1.java index 6ac78f5..cfef4f8 100755 --- a/demos/MiscDemos/GLImageWorld1.java +++ b/demos/MiscDemos/GLImageWorld1.java @@ -64,7 +64,10 @@ public class GLImageWorld1 extends GLCanvas if(fetchGL) { if( glj.gljMakeCurrent() == false ) + { System.out.println("problem in use() method"); + return; + } } TranlateObj(0f,0f,-10f); @@ -346,12 +349,6 @@ public class GLImageWorld1 extends GLCanvas float axisY, float axisZ) { - if( glj.gljMakeCurrent() == false ) - { - System.out.println("problem in use() method"); - return; - } - gl.glMatrixMode (GL_MODELVIEW); gl.glLoadIdentity (); @@ -359,18 +356,10 @@ public class GLImageWorld1 extends GLCanvas gl.glRotatef(degree,axisX,axisY,axisZ); gl.glMultMatrixf(mPosObjRot); gl.glGetFloatv(GL_MODELVIEW_MATRIX,mPosObjRot); - - repaint(); } void TranlateObj(float x,float y,float z) { - if( glj.gljMakeCurrent() == false ) - { - System.out.println("problem in use() method"); - return; - } - gl.glMatrixMode (GL_MODELVIEW); gl.glLoadIdentity (); @@ -378,8 +367,6 @@ public class GLImageWorld1 extends GLCanvas gl.glLoadMatrixf(mPosObjTrans); gl.glTranslatef(x,y,z); gl.glGetFloatv(GL_MODELVIEW_MATRIX,mPosObjTrans); - - repaint(); } // entfernt rotationen aus aktueller matrix @@ -433,6 +420,12 @@ public class GLImageWorld1 extends GLCanvas Point dif=new Point(mousePoint.x-oldMousePoint.x, mousePoint.y-oldMousePoint.y); + if( glj.gljMakeCurrent() == false ) + { + System.out.println("problem in use() method"); + return; + } + if(e.isShiftDown()==true) TranlateObj((float)dif.x/6.0f,(float)dif.y/-6.0f,0f); else if(e.isAltDown()==true) @@ -445,6 +438,9 @@ public class GLImageWorld1 extends GLCanvas RotateObj(dif.x,0f,1f,0f); RotateObj(dif.y,1f,0f,0f); } + + glj.gljFree(); + repaint(); } } public void mouseMoved(MouseEvent e) diff --git a/demos/MiscDemos/TriangleRotate.java b/demos/MiscDemos/TriangleRotate.java index c2d93f7..695575b 100755 --- a/demos/MiscDemos/TriangleRotate.java +++ b/demos/MiscDemos/TriangleRotate.java @@ -56,7 +56,7 @@ public class TriangleRotate extends SimpleGLAnimApplet1 Dimension ps = applet.getPreferredSize(); f.setBounds(-100,-100,99,99); f.setVisible(true); - f.setVisible(false); + //f.setVisible(false); Insets i = f.getInsets(); f.setBounds(0,0, ps.width+i.left+i.right, diff --git a/demos/MiscDemos/accanti.java b/demos/MiscDemos/accanti.java index 3191452..f15287a 100644 --- a/demos/MiscDemos/accanti.java +++ b/demos/MiscDemos/accanti.java @@ -82,7 +82,7 @@ public class accanti extends Applet Dimension ps = applet.getPreferredSize(); f.setBounds(-100,-100,99,99); f.setVisible(true); - f.setVisible(false); + //f.setVisible(false); Insets i = f.getInsets(); f.setBounds(0,0, ps.width+i.left+i.right, diff --git a/demos/MiscDemos/alpha3D.java b/demos/MiscDemos/alpha3D.java index a982375..3d59134 100644 --- a/demos/MiscDemos/alpha3D.java +++ b/demos/MiscDemos/alpha3D.java @@ -67,7 +67,7 @@ public class alpha3D extends SimpleGLAnimApplet1 Dimension ps = applet.getPreferredSize(); f.setBounds(-100,-100,99,99); f.setVisible(true); - f.setVisible(false); + //f.setVisible(false); Insets i = f.getInsets(); f.setBounds(0,0, ps.width+i.left+i.right, diff --git a/demos/MiscDemos/gears.java b/demos/MiscDemos/gears.java index b61d711..44f709e 100644 --- a/demos/MiscDemos/gears.java +++ b/demos/MiscDemos/gears.java @@ -40,6 +40,7 @@ public class gears extends SimpleGLAnimApplet1 public static void main( String args[] ) { int i = 0; + String gljLib = null; String glLib = null; String gluLib = null; boolean perftest=false; @@ -49,6 +50,11 @@ public class gears extends SimpleGLAnimApplet1 if(args[i].equals("-perftest")) { perftest=true; + } else if(args[i].equals("-gljLib")) + { + i++; + if(args.length>i) + gljLib=args[i]; } else if(args[i].equals("-glLib")) { i++; @@ -67,16 +73,32 @@ public class gears extends SimpleGLAnimApplet1 if(!perftest) { - GLContext.gljNativeDebug = true; - GLContext.gljClassDebug = true; + GLContext.gljNativeDebug = false; + GLContext.gljThreadDebug = false; + GLContext.gljClassDebug = false; } - System.out.println("loading libs(gl, glu): "+ - glLib+", "+gluLib+": "+ - GLContext.loadNativeLibraries(null, glLib, gluLib)); + if(perftest) + GLContext.gljClassDebug=true; + GLContext.loadNativeLibraries(gljLib, glLib, gluLib); + if(perftest) + GLContext.gljClassDebug=false; Frame mainFrame = new Frame("gears"); + mainFrame.addWindowListener( new WindowAdapter() + { + public void windowClosed(WindowEvent e) + { + System.exit(0); + } + public void windowClosing(WindowEvent e) + { + windowClosed(e); + } + } + ); + gears applet = new gears(); applet.setSize(300, 300); @@ -90,6 +112,9 @@ public class gears extends SimpleGLAnimApplet1 applet.canvas.getUseFpsSleep()); System.out.println("useRepaint: "+ applet.canvas.getUseRepaint()); + + System.out.println("useFpsSleep: "+ + applet.canvas.getUseFpsSleep()); } applet.start(); @@ -104,7 +129,7 @@ public class gears extends SimpleGLAnimApplet1 /* Local GLAnimCanvas extension class */ - private class gearsCanvas extends GLAnimCanvas implements MouseListener, MouseMotionListener + public class gearsCanvas extends GLAnimCanvas implements MouseListener, MouseMotionListener { private static final float M_PI = 3.14159265f; diff --git a/demos/MiscDemos/glutFontBitmapTest2Applet.java b/demos/MiscDemos/glutFontBitmapTest2Applet.java index 0985385..3059bb0 100644 --- a/demos/MiscDemos/glutFontBitmapTest2Applet.java +++ b/demos/MiscDemos/glutFontBitmapTest2Applet.java @@ -209,12 +209,6 @@ public class glutFontBitmapTest2Applet extends Applet float axisY, float axisZ) { - if( glj.gljMakeCurrent() == false ) - { - System.out.println("problem in use() method"); - return; - } - gl.glMatrixMode (GL_MODELVIEW); gl.glLoadIdentity (); @@ -222,18 +216,10 @@ public class glutFontBitmapTest2Applet extends Applet gl.glRotatef(degree,axisX,axisY,axisZ); gl.glMultMatrixf(mPosObjRot); gl.glGetFloatv(GL_MODELVIEW_MATRIX,mPosObjRot); - - repaint(); } void TranlateObj(float x,float y,float z) { - if( glj.gljMakeCurrent() == false ) - { - System.out.println("problem in use() method"); - return; - } - gl.glMatrixMode (GL_MODELVIEW); gl.glLoadIdentity (); @@ -241,8 +227,6 @@ public class glutFontBitmapTest2Applet extends Applet gl.glLoadMatrixf(mPosObjTrans); gl.glTranslatef(x,y,z); gl.glGetFloatv(GL_MODELVIEW_MATRIX,mPosObjTrans); - - repaint(); } // entfernt rotationen aus aktueller matrix @@ -296,6 +280,12 @@ public class glutFontBitmapTest2Applet extends Applet Point dif=new Point(mousePoint.x-oldMousePoint.x, mousePoint.y-oldMousePoint.y); + if( glj.gljMakeCurrent() == false ) + { + System.out.println("problem in use() method"); + return; + } + if(e.isShiftDown()==true) TranlateObj((float)dif.x/6.0f,(float)dif.y/-6.0f,0f); else if(e.isAltDown()==true) @@ -308,6 +298,11 @@ public class glutFontBitmapTest2Applet extends Applet RotateObj(dif.x,0f,1f,0f); RotateObj(dif.y,1f,0f,0f); } + + glj.gljFree(); + + repaint(); + } } public void mouseMoved(MouseEvent e) diff --git a/demos/MiscDemos/index.html b/demos/MiscDemos/index.html index 0c01565..b9fb0a0 100644 --- a/demos/MiscDemos/index.html +++ b/demos/MiscDemos/index.html @@ -7,7 +7,7 @@ Misc Demos -

Here are the demos-II for GL4Java >= 2.4.0.0:
+

Here are the demos-II for GL4Java >= 2.5.2.0:

To use the Java2 Plug-In (Java2, JRE, Plug-In 1.3), click here !

@@ -57,19 +57,19 @@ : GLUT Font Bitmap 2 (GLUT DEMO)
 
-
 Tessellator Demo 1 +

 Tessellator Demo 1 : test/shows 2 tesselated geometries -
 Tessellator Demo 2 +

 Tessellator Demo 2 : test/shows tesselated geometries with different winding rules -
 Tessellator Demo 3 +

 Tessellator Demo 3 : test/shows self created tesselated geometries
 
-
 Shared GL-Context +

 Shared GL-Context : test/shows the usage of a shared GLContext for Display-Lists
 
-
 Selection Demo 1 +

 Selection Demo 1 : test/shows selection
 
diff --git a/demos/MiscDemos/index_plugin13.html b/demos/MiscDemos/index_plugin13.html index 082aab8..47de881 100644 --- a/demos/MiscDemos/index_plugin13.html +++ b/demos/MiscDemos/index_plugin13.html @@ -7,7 +7,7 @@ Misc Demos -

Here are the demos-II for GL4Java >= 2.4.0.0: & Java2 Plug-In 1.3 +

Here are the demos-II for GL4Java >= 2.5.2.0: & Java2 Plug-In 1.3



  The Java2 (sdk, jre, plugin 1.3) policy file example to give GL4Java the necessary permissions (Click here) ! @@ -59,19 +59,19 @@ : GLUT Font Bitmap 2 (GLUT DEMO)
 
-
 Tessellator Demo 1 +

 Tessellator Demo 1 : test/shows 2 tesselated geometries -
 Tessellator Demo 2 +

 Tessellator Demo 2 : test/shows tesselated geometries with different winding rules -
 Tessellator Demo 3 +

 Tessellator Demo 3 : test/shows self created tesselated geometries
 
-
 Shared GL-Context +

 Shared GL-Context : test/shows the usage of a shared GLContext for Display-Lists
 
-
 Selection Demo 1 +

 Selection Demo 1 : test/shows selection
 
diff --git a/demos/MiscDemos/morph3d.java b/demos/MiscDemos/morph3d.java index 7c8a8fe..6669163 100755 --- a/demos/MiscDemos/morph3d.java +++ b/demos/MiscDemos/morph3d.java @@ -171,16 +171,29 @@ public class morph3d extends SimpleGLAnimApplet1 public void init() { - super.init(); - Dimension d = getSize(); - canvas = new morph3dCanvas(d.width, d.height); - add("Center", canvas); + super.init(); + Dimension d = getSize(); + canvas = new morph3dCanvas(d.width, d.height); + add("Center", canvas); } public static void main( String args[] ) { Frame mainFrame = new Frame("morph3d"); + mainFrame.addWindowListener( new WindowAdapter() + { + public void windowClosed(WindowEvent e) + { + System.exit(0); + } + public void windowClosing(WindowEvent e) + { + windowClosed(e); + } + } + ); + GLContext.gljNativeDebug = true; GLContext.gljClassDebug = true; diff --git a/demos/MiscDemos/nurbs.java b/demos/MiscDemos/nurbs.java index 52ecd99..fe9ab6c 100644 --- a/demos/MiscDemos/nurbs.java +++ b/demos/MiscDemos/nurbs.java @@ -102,7 +102,7 @@ public class nurbs extends SimpleGLAnimApplet1 }; - int theNurb; + long theNurb; public gldemo(int w, int h) { diff --git a/demos/MiscDemos/pngTextureTestApplet.java b/demos/MiscDemos/pngTextureTestApplet.java index 99ea0bb..18c05d2 100755 --- a/demos/MiscDemos/pngTextureTestApplet.java +++ b/demos/MiscDemos/pngTextureTestApplet.java @@ -59,7 +59,7 @@ public class pngTextureTestApplet extends Applet Dimension ps = applet.getPreferredSize(); f.setBounds(-100,-100,99,99); f.setVisible(true); - f.setVisible(false); + //f.setVisible(false); Insets i = f.getInsets(); f.setBounds(0,0, ps.width+i.left+i.right, @@ -305,47 +305,6 @@ public class pngTextureTestApplet extends Applet glu.gluPerspective(60f,aspect,.01,100); } - void RotateObj(float degree, - float axisX, - float axisY, - float axisZ) - { - if( glj.gljMakeCurrent() == false ) - { - System.out.println("problem in use() method"); - return; - } - - gl.glMatrixMode (GL_MODELVIEW); - gl.glLoadIdentity (); - - // kamera setzen - gl.glRotatef(degree,axisX,axisY,axisZ); - gl.glMultMatrixf(mPosObjRot); - gl.glGetFloatv(GL_MODELVIEW_MATRIX,mPosObjRot); - - repaint(); - } - - void TranlateObj(float x,float y,float z) - { - if( glj.gljMakeCurrent() == false ) - { - System.out.println("problem in use() method"); - return; - } - - gl.glMatrixMode (GL_MODELVIEW); - gl.glLoadIdentity (); - - // kamera setzen - gl.glLoadMatrixf(mPosObjTrans); - gl.glTranslatef(x,y,z); - gl.glGetFloatv(GL_MODELVIEW_MATRIX,mPosObjTrans); - - repaint(); - } - // entfernt rotationen aus aktueller matrix double Billboard() { @@ -397,6 +356,12 @@ public class pngTextureTestApplet extends Applet Point dif=new Point(mousePoint.x-oldMousePoint.x, mousePoint.y-oldMousePoint.y); + if( glj.gljMakeCurrent() == false ) + { + System.out.println("problem in use() method"); + return; + } + if(e.isShiftDown()==true) TranlateObj((float)dif.x/6.0f,(float)dif.y/-6.0f,0f); else if(e.isAltDown()==true) @@ -409,12 +374,42 @@ public class pngTextureTestApplet extends Applet RotateObj(dif.x,0f,1f,0f); RotateObj(dif.y,1f,0f,0f); } + + glj.gljFree(); + repaint(); + } } public void mouseMoved(MouseEvent e) { } + void RotateObj(float degree, + float axisX, + float axisY, + float axisZ) + { + gl.glMatrixMode (GL_MODELVIEW); + gl.glLoadIdentity (); + + // kamera setzen + gl.glRotatef(degree,axisX,axisY,axisZ); + gl.glMultMatrixf(mPosObjRot); + gl.glGetFloatv(GL_MODELVIEW_MATRIX,mPosObjRot); + } + + void TranlateObj(float x,float y,float z) + { + gl.glMatrixMode (GL_MODELVIEW); + gl.glLoadIdentity (); + + // kamera setzen + gl.glLoadMatrixf(mPosObjTrans); + gl.glTranslatef(x,y,z); + gl.glGetFloatv(GL_MODELVIEW_MATRIX,mPosObjTrans); + + } + } } diff --git a/demos/MiscDemos/select.java b/demos/MiscDemos/select.java index a1020c3..3605e97 100644 --- a/demos/MiscDemos/select.java +++ b/demos/MiscDemos/select.java @@ -95,7 +95,7 @@ public class select extends Applet Dimension ps = applet.getPreferredSize(); f.setBounds(-100,-100,99,99); f.setVisible(true); - f.setVisible(false); + //f.setVisible(false); Insets i = f.getInsets(); f.setBounds(0,0, ps.width+i.left+i.right, diff --git a/demos/MiscDemos/spectex.java b/demos/MiscDemos/spectex.java index 55d4aae..fe0b323 100644 --- a/demos/MiscDemos/spectex.java +++ b/demos/MiscDemos/spectex.java @@ -59,7 +59,7 @@ public class spectex extends SimpleGLAnimApplet1 final float M_PI_2 = 1.57079632f; int view = 0; /* 0 = front, 1 = top, 2 = bottom */ - int Quadric; + long Quadric; int Sphere; float LightPos[/*4*/] = {10.0f, 10.0f, 10.0f, 1.0f}; float Delta = 1.0f; diff --git a/demos/MiscDemos/stencil.java b/demos/MiscDemos/stencil.java index a2d163f..b5f7fe7 100644 --- a/demos/MiscDemos/stencil.java +++ b/demos/MiscDemos/stencil.java @@ -261,7 +261,7 @@ public class stencil extends Applet gl.glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); gl.glCallList(BLUEMAT); - int qobj = glu.gluNewQuadric(); + long qobj = glu.gluNewQuadric(); glu.gluQuadricOrientation(qobj,GLU_OUTSIDE); glu.gluQuadricNormals(qobj,GLU_SMOOTH); glu.gluQuadricTexture(qobj,false); diff --git a/demos/MiscDemos/tess.java b/demos/MiscDemos/tess.java index 2cf3a7a..72943aa 100644 --- a/demos/MiscDemos/tess.java +++ b/demos/MiscDemos/tess.java @@ -132,7 +132,7 @@ public class tess extends Applet { int i; glut = new GLUTFuncLightImplWithFonts(gl, glu); - int tobj; + long tobj; gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f); diff --git a/demos/MiscDemos/tessdemo.java b/demos/MiscDemos/tessdemo.java index 899b27a..91d9754 100755 --- a/demos/MiscDemos/tessdemo.java +++ b/demos/MiscDemos/tessdemo.java @@ -14,8 +14,15 @@ /* * $Log$ - * Revision 1.1 2000/11/18 06:53:19 sven - * Initial revision + * Revision 1.2 2001/02/13 05:32:09 sven + * JAWT Support JDK >=1.3 + * + * Revision 1.1.1.2 2000/11/18 10:41:27 sven + * still working for the initial check in + * + * Revision 1.1.1.1 2000/11/18 06:53:19 sven + * Initial import into CVS. + * Version 2.5.0.0 beta 1 * * Revision 1.3f.2.1f 1999/11/16 11:09:09 gareth * Added combine callback. Converted vertices from ints to floats. @@ -316,7 +323,7 @@ public class tessdemo extends Applet { public void tesse( ) { - int tobj; + long tobj; double data[] = new double[3]; int i, j, point_cnt; diff --git a/demos/MiscDemos/tesswind.java b/demos/MiscDemos/tesswind.java index b25ca42..d37e79c 100755 --- a/demos/MiscDemos/tesswind.java +++ b/demos/MiscDemos/tesswind.java @@ -175,7 +175,7 @@ public class tesswind extends Applet { double currentWinding = GLU_TESS_WINDING_ODD; int currentShape = 0; - int tobj; + long tobj; int list; public void init() { diff --git a/demos/RectRenderSpeed/GL4JCanvas.java b/demos/RectRenderSpeed/GL4JCanvas.java index 7366ee0..409de36 100644 --- a/demos/RectRenderSpeed/GL4JCanvas.java +++ b/demos/RectRenderSpeed/GL4JCanvas.java @@ -320,9 +320,9 @@ public void gl_display () { if (glj.gljMakeCurrent () == false) { - System.out.println ("GL4JCanvas`gl_display- gljMakeCurrent" + System.out.println ("GL4JCanvas`gl_display- makeCurrent" +" is false"); - loc_err = true; + return; } } diff --git a/demos/RonsDemos/dinoshade.java b/demos/RonsDemos/dinoshade.java index 344fd00..570ea12 100755 --- a/demos/RonsDemos/dinoshade.java +++ b/demos/RonsDemos/dinoshade.java @@ -611,7 +611,7 @@ public class dinoshade extends SimpleGLAnimApplet1 { /* Draw a yellow ball at the light source. */ gl.glTranslatef(lightPosition[0], lightPosition[1], lightPosition[2]); - int qobj = glu.gluNewQuadric(); + long qobj = glu.gluNewQuadric(); glu.gluQuadricOrientation(qobj,GLU_OUTSIDE); glu.gluQuadricNormals(qobj,GLU_SMOOTH); glu.gluQuadricTexture(qobj,false); diff --git a/demos/RonsDemos/fog.java b/demos/RonsDemos/fog.java index 7f99c94..3865f62 100644 --- a/demos/RonsDemos/fog.java +++ b/demos/RonsDemos/fog.java @@ -215,7 +215,7 @@ public class fog extends Applet gl.glPushMatrix(); gl.glTranslatef(x, y, z); - int qobj = glu.gluNewQuadric(); + long qobj = glu.gluNewQuadric(); glu.gluQuadricOrientation(qobj,GLU_OUTSIDE); glu.gluQuadricNormals(qobj,GLU_SMOOTH); glu.gluQuadricTexture(qobj,false); diff --git a/demos/RonsDemos/material.java b/demos/RonsDemos/material.java index 2558c84..b78a1ec 100644 --- a/demos/RonsDemos/material.java +++ b/demos/RonsDemos/material.java @@ -188,7 +188,7 @@ public class material extends Applet float low_shininess[] = { 5.0f }; float high_shininess[] = { 100.0f }; float mat_emission[] = {0.3f, 0.2f, 0.2f, 0.0f}; - int qobj; + long qobj; gl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); diff --git a/demos/RonsDemos/molehill.java b/demos/RonsDemos/molehill.java index 8dbe12e..42eea66 100644 --- a/demos/RonsDemos/molehill.java +++ b/demos/RonsDemos/molehill.java @@ -87,7 +87,7 @@ public class molehill extends Applet float pts2[] = new float[4*4*3]; float pts3[] = new float[4*4*3]; float pts4[] = new float[4*4*3]; - int nurb; + long nurb; int u, v; public molehillCanvas(int w, int h) diff --git a/demos/RonsDemos/moth.java b/demos/RonsDemos/moth.java index c12a4a9..dfc42ac 100644 --- a/demos/RonsDemos/moth.java +++ b/demos/RonsDemos/moth.java @@ -423,7 +423,7 @@ public class moth extends SimpleGLAnimApplet1 gl.glTranslatef(0.0f, 1.6f, -5.0f); /* draw lamp */ - int qobj = glu.gluNewQuadric(); + long qobj = glu.gluNewQuadric(); glu.gluQuadricOrientation(qobj,GLU_OUTSIDE); glu.gluQuadricNormals(qobj,GLU_SMOOTH); glu.gluQuadricTexture(qobj,false); diff --git a/demos/RonsDemos/particle.java b/demos/RonsDemos/particle.java index 2369b00..7f1d552 100644 --- a/demos/RonsDemos/particle.java +++ b/demos/RonsDemos/particle.java @@ -253,7 +253,7 @@ public class particle extends SimpleGLAnimApplet1 sphere_list = gl.glGenLists(1); gl.glNewList(sphere_list,GL_COMPILE); gl.glColor3ub((byte)0, (byte)255, (byte)128); - int qobj = glu.gluNewQuadric(); + long qobj = glu.gluNewQuadric(); glu.gluQuadricOrientation(qobj,GLU_OUTSIDE); glu.gluQuadricNormals(qobj,GLU_SMOOTH); glu.gluQuadricTexture(qobj,false); diff --git a/demos/RonsDemos/polyoff.java b/demos/RonsDemos/polyoff.java index a79a398..255aa0a 100644 --- a/demos/RonsDemos/polyoff.java +++ b/demos/RonsDemos/polyoff.java @@ -147,7 +147,7 @@ public class polyoff extends Applet list = gl.glGenLists(1); gl.glNewList (list, GL_COMPILE); - int qobj = glu.gluNewQuadric(); + long qobj = glu.gluNewQuadric(); glu.gluQuadricOrientation(qobj,GLU_OUTSIDE); glu.gluQuadricNormals(qobj,GLU_SMOOTH); glu.gluQuadricTexture(qobj,false); diff --git a/demos/RonsDemos/quadric.java b/demos/RonsDemos/quadric.java index 932f428..0c39b13 100644 --- a/demos/RonsDemos/quadric.java +++ b/demos/RonsDemos/quadric.java @@ -125,7 +125,7 @@ public class quadric extends Applet System.out.println("init(): " + this); reshape(getSize().width, getSize().height); - int qobj; + long qobj; float mat_ambient[] = { 0.5f, 0.5f, 0.5f, 1.0f }; float mat_specular[] = { 1.0f, 1.0f, 1.0f, 1.0f }; float mat_shininess[] = { 50.0f }; diff --git a/demos/RonsDemos/reflect.java b/demos/RonsDemos/reflect.java index e857881..6858c26 100644 --- a/demos/RonsDemos/reflect.java +++ b/demos/RonsDemos/reflect.java @@ -283,7 +283,7 @@ public class reflect extends SimpleGLAnimApplet1 private void make_objects() { - int q; + long q; float cyan[] = { 0.0f, 1.0f, 1.0f, 1.0f }; float green[] = { 0.2f, 1.0f, 0.2f, 1.0f }; diff --git a/demos/RonsDemos/renormal.java b/demos/RonsDemos/renormal.java index 783bf15..1a0ecdf 100644 --- a/demos/RonsDemos/renormal.java +++ b/demos/RonsDemos/renormal.java @@ -93,7 +93,7 @@ public class renormal extends SimpleGLAnimApplet1 gl.glPushMatrix(); gl.glScalef(scale, scale, scale); - int qobj = glu.gluNewQuadric(); + long qobj = glu.gluNewQuadric(); glu.gluQuadricOrientation(qobj,GLU_OUTSIDE); glu.gluQuadricNormals(qobj,GLU_SMOOTH); glu.gluQuadricTexture(qobj,false); diff --git a/demos/RonsDemos/rings.java b/demos/RonsDemos/rings.java index 8a08bb5..c03ca7d 100644 --- a/demos/RonsDemos/rings.java +++ b/demos/RonsDemos/rings.java @@ -352,7 +352,7 @@ public class rings extends SimpleGLAnimApplet1 int slices, int stacks) { - int qobj = glu.gluNewQuadric(); + long qobj = glu.gluNewQuadric(); glu.gluQuadricDrawStyle(qobj,GLU_FILL); glu.gluQuadricNormals(qobj,GLU_SMOOTH); diff --git a/demos/RonsDemos/shadowvol.java b/demos/RonsDemos/shadowvol.java index f40f20b..f25d6dc 100644 --- a/demos/RonsDemos/shadowvol.java +++ b/demos/RonsDemos/shadowvol.java @@ -111,7 +111,7 @@ public class shadowvol extends Applet reshape(getSize().width, getSize().height); byte tex[]; - int sphere, cone, base; + long sphere, cone, base; float sphere_mat[] = {1.0f, 0.5f, 0.0f, 1.0f}; float cone_mat[] = {0.0f, 0.5f, 1.0f, 1.0f}; diff --git a/demos/RonsDemos/softshadow.java b/demos/RonsDemos/softshadow.java index 0d9e8ef..c49a434 100644 --- a/demos/RonsDemos/softshadow.java +++ b/demos/RonsDemos/softshadow.java @@ -149,7 +149,7 @@ public class softshadow extends Applet /* make display lists for sphere and cone; for efficiency */ - int sphere, cone, base; + long sphere, cone, base; gl.glNewList(SPHERE, GL_COMPILE); sphere = glu.gluNewQuadric(); diff --git a/demos/RonsDemos/steam.java b/demos/RonsDemos/steam.java index 3f19f7e..e89afde 100644 --- a/demos/RonsDemos/steam.java +++ b/demos/RonsDemos/steam.java @@ -95,7 +95,7 @@ public class steam extends SimpleGLAnimApplet1 private int list_flywheel_filled = 4; private int list_flywheel_texture = 8; /* Variable used in the creaton of glu objects */ - int obj; // (GLU quadric object) + long obj; // (GLU quadric object) private PopupMenu menu = null; private boolean menu_showing = false; @@ -587,7 +587,7 @@ public class steam extends SimpleGLAnimApplet1 /* Draws a cylinder using glu function, drawing flat discs at each end, to give the appearence of it being solid. */ private void myCylinder - (int object, float outerRadius, float innerRadius, float length) + (long object, float outerRadius, float innerRadius, float length) { gl.glPushMatrix(); glu.gluCylinder(object, outerRadius, outerRadius, length, 20, 1); diff --git a/demos/RonsDemos/surface.java b/demos/RonsDemos/surface.java index 2d959b8..a33f48b 100644 --- a/demos/RonsDemos/surface.java +++ b/demos/RonsDemos/surface.java @@ -102,7 +102,7 @@ public class surface extends Applet { float ctlpoints[] = new float [4*4*3]; boolean showPoints = false; - int theNurb; + long theNurb; public surfaceCanvas(int w, int h) { diff --git a/demos/RonsDemos/text3d.java b/demos/RonsDemos/text3d.java index ed40bee..9d288d5 100644 --- a/demos/RonsDemos/text3d.java +++ b/demos/RonsDemos/text3d.java @@ -371,6 +371,7 @@ public class text3d extends SimpleGLAnimApplet1 doubleBuffer = true; stereoView = false; accumSize = 8; + setUseRepaint(false); } public void init() diff --git a/demos/SwingDemos/CrossColorJPanel.java b/demos/SwingDemos/CrossColorJPanel.java index 44a6492..97ed71f 100644 --- a/demos/SwingDemos/CrossColorJPanel.java +++ b/demos/SwingDemos/CrossColorJPanel.java @@ -17,7 +17,6 @@ public class CrossColorJPanel extends GLJPanel public void display() { - System.out.println("i"); int i; gl.glPushMatrix(); diff --git a/demos/SwingDemos/TessJPanel.java b/demos/SwingDemos/TessJPanel.java index f070823..60005ab 100644 --- a/demos/SwingDemos/TessJPanel.java +++ b/demos/SwingDemos/TessJPanel.java @@ -93,7 +93,7 @@ public class TessJPanel extends GLJPanel int i; glut = new GLUTFuncLightImplWithFonts(gl, glu); - int tobj; + long tobj; gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f); diff --git a/demos/demoCvs.java b/demos/demoCvs.java index 79b5c73..7eaec65 100644 --- a/demos/demoCvs.java +++ b/demos/demoCvs.java @@ -40,7 +40,6 @@ class demoCvs extends GLCanvas /* Standard GL4Java Init */ if( glj.gljMakeCurrent() == false ) { - System.out.println("problem in use() method"); return; } diff --git a/demos/demoCvsAnim.java b/demos/demoCvsAnim.java index 3dcc689..560c088 100644 --- a/demos/demoCvsAnim.java +++ b/demos/demoCvsAnim.java @@ -40,7 +40,6 @@ class demoCvsAnim extends GLAnimCanvas /* Standard GL4Java Init */ if( glj.gljMakeCurrent() == false ) { - System.out.println("problem in use() method"); return; } diff --git a/demos/glDemosCvs.java b/demos/glDemosCvs.java index 6902b95..d280f35 100644 --- a/demos/glDemosCvs.java +++ b/demos/glDemosCvs.java @@ -17,6 +17,10 @@ public class glDemosCvs extends Applet * */ + Panel pWave ; + Panel pOlympic ; + Panel pLogo ; + Panel pStar ; Button ButtonFps; TextField TextFpsOlymp; TextField TextFpsLogo; @@ -87,22 +91,22 @@ public class glDemosCvs extends Applet add("Center", pAllCvs); // 1. Wave - Panel pWave = new Panel(); + pWave = new Panel(); pWave.setLayout(new GridLayout(1,2)); pAllCvs.add(pWave); // 2. Olympic - Panel pOlympic = new Panel(); + pOlympic = new Panel(); pOlympic.setLayout(new GridLayout(1,2)); pAllCvs.add(pOlympic); // 3. Logo - Panel pLogo = new Panel(); + pLogo = new Panel(); pLogo.setLayout(new GridLayout(1,2)); pAllCvs.add(pLogo); // 3. Star - Panel pStar = new Panel(); + pStar = new Panel(); pStar.setLayout(new GridLayout(1,2)); pAllCvs.add(pStar); @@ -261,13 +265,9 @@ public class glDemosCvs extends Applet } public void destroy() { - cvsOlympic.stop(); cvsOlympic.cvsDispose(); - cvsWave.stop(); cvsWave.cvsDispose(); - cvsLogo.stop(); cvsLogo.cvsDispose(); - cvsStar.stop(); cvsStar.cvsDispose(); } @@ -332,8 +332,55 @@ public class glDemosCvs extends Applet { Component comp = evt.getComponent(); - if( comp.equals(ButtonFps) ) + if ((evt.getModifiers() & evt.BUTTON3_MASK) != 0) { + System.out.println("button3: "+comp); + if(comp instanceof GLAnimCanvas) + { + GLAnimCanvas glcvs = (GLAnimCanvas)comp; + glcvs.cvsDispose(); + + Container c = glcvs.getParent(); + c.remove(glcvs); + + glcvs.setVisible(true); + + if(c instanceof Frame) + { + Frame of = (Frame)c; + of.dispose(); + of=null; + + Panel p = null; + + if(glcvs.equals(cvsStar)) + p = pStar; + else if(glcvs.equals(cvsLogo)) + p = pLogo; + else if(glcvs.equals(cvsOlympic)) + p = pOlympic; + else if(glcvs.equals(cvsWave)) + p = pWave; + p.add(glcvs); + p.doLayout(); + } else if(c instanceof Panel) + { + Frame f = new Frame("EXTRA"); + f.add(glcvs); + f.pack(); + f.setVisible(true); + } + glcvs.start(); + + System.out.println("GLContextNumber: "+ + GLContext.getNativeGLContextNumber()); + } + } else if ((evt.getModifiers() & evt.BUTTON1_MASK) != 0) + { + if( comp.equals(ButtonFps) ) + { + System.out.println("GLContextNumber: "+ + GLContext.getNativeGLContextNumber()); double fps = 0; int a1; @@ -369,70 +416,73 @@ public class glDemosCvs extends Applet fps=(double)a1/100.0; TextFpsStar.setText(String.valueOf(fps)); } - } - else if( comp.equals(buttonInfo) ) - { - Frame fInfo = null; - if(cvsWave!=null && cvsWave.getGLContext()!=null) - fInfo = cvsWave.getGLContext().gljShowVersions(); - else if(cvsOlympic!=null && cvsOlympic.getGLContext()!=null) - fInfo = cvsOlympic.getGLContext().gljShowVersions(); - else if(cvsLogo!=null && cvsLogo.getGLContext()!=null) - fInfo = cvsLogo.getGLContext().gljShowVersions(); - else if(cvsStar!=null && cvsStar.getGLContext()!=null) - fInfo = cvsStar.getGLContext().gljShowVersions(); - } - else if( comp.equals(cvsWave) ) - { + } + else if( comp.equals(buttonInfo) ) + { + System.out.println("GLContextNumber: "+ + GLContext.getNativeGLContextNumber()); + Frame fInfo = null; + if(cvsWave!=null && cvsWave.getGLContext()!=null) + fInfo = cvsWave.getGLContext().gljShowVersions(); + else if(cvsOlympic!=null && cvsOlympic.getGLContext()!=null) + fInfo = cvsOlympic.getGLContext().gljShowVersions(); + else if(cvsLogo!=null && cvsLogo.getGLContext()!=null) + fInfo = cvsLogo.getGLContext().gljShowVersions(); + else if(cvsStar!=null && cvsStar.getGLContext()!=null) + fInfo = cvsStar.getGLContext().gljShowVersions(); + } + else if( comp.equals(cvsWave) ) + { cvsWave.setSuspended(!cvsWave.isSuspended(), evt.getClickCount()>1 // -> ReInit ); - } - else if( comp.equals(cvsOlympic) ) - { + } + else if( comp.equals(cvsOlympic) ) + { cvsOlympic.setSuspended(!cvsOlympic.isSuspended(), evt.getClickCount()>1 // -> ReInit ); - } - else if( comp.equals(cvsLogo) ) - { + } + else if( comp.equals(cvsLogo) ) + { cvsLogo.setSuspended(!cvsLogo.isSuspended(), evt.getClickCount()>1 // -> ReInit ); - } - else if( comp.equals(cvsStar) ) - { + } + else if( comp.equals(cvsStar) ) + { cvsStar.setSuspended(!cvsStar.isSuspended(), evt.getClickCount()>1 // -> ReInit ); - } - if( comp.equals(bReStartL) ) - { + } + if( comp.equals(bReStartL) ) + { if(cvsLogo!=null) { cvsLogo.setSuspended(false, true); } - } - if( comp.equals(bReStartO) ) - { + } + if( comp.equals(bReStartO) ) + { if(cvsOlympic!=null) { cvsOlympic.setSuspended(false, true); } - } - if( comp.equals(bReStartW) ) - { + } + if( comp.equals(bReStartW) ) + { if(cvsWave!=null) { cvsWave.setSuspended(false, true); } - } - if( comp.equals(bReStartS) ) - { + } + if( comp.equals(bReStartS) ) + { if(cvsStar!=null) { cvsStar.setSuspended(false, true); } + } } } diff --git a/demos/glLogoCvs.java b/demos/glLogoCvs.java index e287406..ffeac8d 100644 --- a/demos/glLogoCvs.java +++ b/demos/glLogoCvs.java @@ -106,7 +106,6 @@ class glLogoCvs extends GLAnimCanvas /* Standard GL4Java Init */ if( glj.gljMakeCurrent() == false ) { - System.out.println("problem in use() method"); return; } diff --git a/demos/glStencilTest.java b/demos/glStencilTest.java index 79a2e4b..92ce6e8 100755 --- a/demos/glStencilTest.java +++ b/demos/glStencilTest.java @@ -29,7 +29,6 @@ public class glStencilTest { Dimension d=new Dimension(w,h); if (!cvsIsInit()) return; if( glj.gljMakeCurrent() == false ) { - System.out.println("problem in use() method"); return; } setSize(d); @@ -42,7 +41,6 @@ public class glStencilTest { int i; if( glj.gljMakeCurrent() == false ) { - System.out.println("problem in use() method"); return; } diff --git a/demos/index.html b/demos/index.html index 1ac862b..8de04df 100755 --- a/demos/index.html +++ b/demos/index.html @@ -8,7 +8,7 @@

Here are the demos-I for -GL4Java >= 2.4.0.0:
+GL4Java >= 2.5.2.0:

  • glDemosCvs : Many OpenGL Canvas running together diff --git a/demos/olympicCvs.java b/demos/olympicCvs.java index 189e52d..3b46bf8 100644 --- a/demos/olympicCvs.java +++ b/demos/olympicCvs.java @@ -171,7 +171,6 @@ class olympicCvs extends GLAnimCanvas /* Standard GL4Java Init */ if( glj.gljMakeCurrent() == false ) { - System.out.println("problem in use() method"); return; } diff --git a/demos/starCvs.java b/demos/starCvs.java index b7c942c..2e9dc8f 100644 --- a/demos/starCvs.java +++ b/demos/starCvs.java @@ -128,7 +128,6 @@ class starCvs extends GLAnimCanvas /* Standard gl4java Init */ if( glj.gljMakeCurrent() == false ) { - System.out.println("problem in use() method"); return; } diff --git a/demos/test1Cvs.java b/demos/test1Cvs.java index 85e03bb..f225cf5 100644 --- a/demos/test1Cvs.java +++ b/demos/test1Cvs.java @@ -46,7 +46,6 @@ class test1Cvs extends GLCanvas /* Standard GL4Java Init */ if( glj.gljMakeCurrent() == false ) { - System.out.println("problem in use() method"); return; } diff --git a/demos/testTextPPM1.java b/demos/testTextPPM1.java index e7d876c..0d1780f 100755 --- a/demos/testTextPPM1.java +++ b/demos/testTextPPM1.java @@ -361,7 +361,7 @@ public void display() public void puntVista() { - if (cvsIsInit()==false || glj.gljMakeCurrent() == false) + if (cvsIsInit()==false ) { System.out.println("-- Tenim algun problema glj.gljUse -3-"); return; @@ -462,8 +462,6 @@ public void mouseDragged(MouseEvent e) sl_alfaUsu.setValue(anclaAlfa+difX); sl_betaUsu.setValue(anclaBeta+difY); - // puntVista(); JAU - // display(); JAU ... -> sDisplay() or repaint ... repaint(); } //--------------------------------------------------------------- diff --git a/demos/waveCvs.java b/demos/waveCvs.java index bd7afbe..fab29c6 100644 --- a/demos/waveCvs.java +++ b/demos/waveCvs.java @@ -201,7 +201,6 @@ class waveCvs extends GLAnimCanvas /* Standard gl4java Init */ if( glj.gljMakeCurrent() == false ) { - System.out.println("wave-display: problem in use() method"); return; } @@ -476,7 +475,6 @@ class waveCvs extends GLAnimCanvas if( glj.gljMakeCurrent() == false ) { - System.out.println("CtrlWin: problem in use() method"); return; } else { gl.glFinish(); diff --git a/docs/index.html b/docs/index.html index 3ee89a3..05a4ba0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -20,6 +20,10 @@
    API
     
    Performance Measurement Log-Files +


    +
    Other Documentation +
      +
    Using OpenGL in Java by Roman Podobedov
     


      diff --git a/gl4java/GL4JavaReflections.java b/gl4java/GL4JavaReflections.java index 79969bf..7ae4d28 100644 --- a/gl4java/GL4JavaReflections.java +++ b/gl4java/GL4JavaReflections.java @@ -12,7 +12,6 @@ import java.lang.reflect.*; /** * The function-declaration holder ! * - * @see CFuncVariable * @version 1.00, 12. Novemeber 1999 * @author Sven Goethel * diff --git a/gl4java/GLContext.java.skel b/gl4java/GLContext.java.skel index c91e4f6..449a3b3 100644 --- a/gl4java/GLContext.java.skel +++ b/gl4java/GLContext.java.skel @@ -62,27 +62,27 @@ import java.lang.reflect.*; * The native libraries are plattform depended. * *

    -	  The default native library for Win32 and Unice's is :
    -	  

    - GLContext: GL4JavaJauGljJNI - GLFuncJauJNI: GL4JavaJauGLJNI - GLUFuncJauJNI: GL4JavaJauGLUJNI -

    - Note: -

    - The default native library for Macintosh is : -

    - GLContext: GL4JavaMacGZGljJNI - GLFuncJauJNI: GL4JavaMacGZGLJNI - GLUFuncJauJNI: GL4JavaMacGZGLUJNI + The default native library's are:

    + GLContext: GL4JavaJauGljJNI (jdk ==1.1), + GL4JavaJauGljJNI12 (jdk ==1.2), + GL4JavaJauGljJNI13 (jdk >=1.3) + + GLFuncJauJNI: GL4JavaJauGLJNI (jdk ==1.1), + GL4JavaJauGLJNI12 (jdk >=1.2) + + GLUFuncJauJNI: GL4JavaJauGLUJNI (jdk ==1.1), + GL4JavaJauGLUJNI12 (jdk >=1.2)

    To check wich version and vendors are currently used, just call while a GLContext is created :

    gljShowVersions

    - Where an own Frame is opened ! + Or just run at the command line: +

    + java gl4java.GLContext -info +

    *

    * * Make sure that this library is installed in your library path. @@ -132,17 +132,17 @@ import java.lang.reflect.*; loadNativeLibraries createGLFunc createGLUFunc + gljIsInit + gljMakeCurrent + gljSwap + gljFree + gljDestroy gljGetNativeLibVersion gljGetClassVersion gljShowVersions gljCheckGL gljCheckGLTypes gljResize - gljSwap - gljIsInit - gljMakeCurrent - gljDestroy - gljFree *
  • *

    @@ -163,7 +163,6 @@ import java.lang.reflect.*; *

    *

    * - * @see WinDataAccess * @version 2.00, 21. April 1999 * @author Sven Goethel * @@ -171,7 +170,6 @@ import java.lang.reflect.*; public class GLContext extends Object implements Runnable { - protected boolean isInitialized = false; /** @@ -180,8 +178,7 @@ public class GLContext extends Object * If we failed loading the lib., * gljMakeCurrent and gljIsInit will return false. * - * @see GLContext#gljMakeCurrent - * @see GLContext#gljIsInit + * @see gl4java.GLContext#gljIsInit */ protected static boolean libsLoaded = false; @@ -234,45 +231,47 @@ public class GLContext extends Object * Usually for debugging. */ public static boolean gljClassDebug = false; + public static boolean gljThreadDebug = false; public static boolean gljNativeDebug = false; /** * We will store the GL Context right here. * - * @see GLContext#createGLContext - * @see GLContext#gljInit + * @see gl4java.GLContext#createGLContext + * @see gl4java.GLContext#gljInit */ - protected int glContext=0; + protected long glContext=0; + protected static int glContextNumber=0; /** * The context with witch display lists and textures will be shared. * - * @see GLContext#createGLContext - * @see GLContext#gljInit + * @see gl4java.GLContext#createGLContext + * @see gl4java.GLContext#gljInit */ protected GLContext sharedGLContext; - protected int sharedGLContextNative= 0; // No sharing by default. + protected long sharedGLContextNative= 0; // No sharing by default. /** * Xwindow data AND Windows data for the widget * - * @see GLContext#createGLContext - * @see GLContext#gljInit + * @see gl4java.GLContext#createGLContext + * @see gl4java.GLContext#gljInit */ - protected int pixmapHandle=0; // unique handle for the Pixmap - protected int windowHandle=0; // unique handle for this widget's window - protected int displayHandle=0; // unqiue handle to the display + protected long pixmapHandle=0; // unique handle for the Pixmap + protected long windowHandle=0; // unique handle for this widget's window + protected long displayHandle=0; // unqiue handle to the display + private int createwinw; + private int createwinh; /** * MS-JDirect-Window data for the MS-JVM interface * - * @see GLContext#createGLContext - * @see GLContext#gljInit + * @see gl4java.GLContext#createGLContext + * @see gl4java.GLContext#gljInit */ private int createwinx; private int createwiny; - private int createwinw; - private int createwinh; private boolean threadRunning = false; private boolean destroyWindow = false; protected Container containerWindow = null; @@ -286,24 +285,24 @@ public class GLContext extends Object * * Must be set via createOffScreenCtx * - * @see GLJPanel#paint - * @see GLJPanel#createOffScreenCtx + * @see gl4java.swing.GLJPanel#paint + * @see gl4java.GLContext#createOffScreenCtx */ protected Dimension offScrnSize = null; /** * Windows data AND flag is Window-Handel is read (for X11 also) ! * - * @see GLContext#createGLContext - * @see GLContext#gljInit + * @see gl4java.GLContext#createGLContext + * @see gl4java.GLContext#gljInit */ - int pData = 0; // stores the pointer structure that holds windows info + long pData = 0; // stores the pointer structure that holds windows info /** * Flag to check, if the OpenGL-Context is active ! * - * @see GLCanvas#gljIsEnabled - * @see GLCanvas#gljSetEnabled + * @see gl4java.GLContext#isEnabled + * @see gl4java.GLContext#setEnabled */ protected boolean glEnabled = true; @@ -315,7 +314,7 @@ public class GLContext extends Object * * This is set via the constructor ! * - * @see GLContext#GLContext + * @see gl4java.GLContext#GLContext */ protected boolean offScreenRenderer = false; @@ -325,15 +324,15 @@ public class GLContext extends Object * * This is set via the constructor ! * - * @see GLContext#isDoubleBuffer - * @see GLContext#GLContext + * @see gl4java.GLContext#isDoubleBuffer + * @see gl4java.GLContext#GLContext */ protected boolean doubleBuffer = true; /** * Visual pre-set for stencil-bit number, default: 0 * - * @see GLContext#GLContext + * @see gl4java.GLContext#GLContext */ protected int stencilBits = 0; @@ -347,7 +346,7 @@ public class GLContext extends Object * The output value, after the constructor returns, * it is the summary of all accumulation bits of all components ! * - * @see GLContext#GLContext + * @see gl4java.GLContext#GLContext */ protected int accumSize = 0; @@ -357,8 +356,8 @@ public class GLContext extends Object * * This is set via the constructor ! * - * @see GLContext#isStereoView - * @see GLContext#GLContext + * @see gl4java.GLContext#isStereoView + * @see gl4java.GLContext#GLContext */ protected boolean stereoView = false; @@ -368,8 +367,8 @@ public class GLContext extends Object * * This is set via the constructor ! * - * @see GLContext#isRGBA - * @see GLContext#GLContext + * @see gl4java.GLContext#isRGBA + * @see gl4java.GLContext#GLContext */ protected boolean rgba = true; @@ -383,8 +382,8 @@ public class GLContext extends Object * * This is set via the constructor ! * - * @see GLContext#isOwnWindowCreated - * @see GLContext#GLContext + * @see gl4java.GLContext#isOwnWindowCreated + * @see gl4java.GLContext#GLContext */ protected boolean createOwnWindow = false; @@ -430,6 +429,7 @@ public class GLContext extends Object private static boolean isNetscapeJvm = false; private static boolean isMicrosoftJvm = false; + private static boolean isIBMJvm = false; private static boolean useMSJDirect = false; private static String jvmVendor = null; private static String jvmVersion = null; @@ -437,35 +437,43 @@ public class GLContext extends Object private static int jvmVersionMinor = 1; // min. defaults private static String osName = null; + private static String jniEXTsuff_gl_glu = ""; + private static String jniEXTsuff_glj = ""; + /** * Get the native GL Context ! * - * @see GLContext#glContext + * @see gl4java.GLContext#glContext */ - public final long getNativeGLContext() { return (long)glContext; } + public final long getNativeGLContext() { return glContext; } + + public static final int getNativeGLContextNumber() + { return glContextNumber; } /** * Get the native Window Handle ! * - * @see GLContext#windowHandle + * @see gl4java.GLContext#windowHandle + * + * @deprecated The native window handle is no more accessible + * through this method since JDK >= 1.3 ! */ - public final long getNativeWindoHandle() { return (long)windowHandle; } + public final long getNativeWindoHandle() { return windowHandle; } /** * Get the optional shared GL Context ! * - * @see GLContext#sharedGLContext + * @see gl4java.GLContext#sharedGLContext */ public final GLContext getSharedGLContext() { return sharedGLContext; } /** * Get the native OS-Type ! * - * @see GLContext#osType - * @see GLContext#OsWindoof - * @see GLContext#OsUnknown - * @see GLContext#OsX11 - * @see GLContext#OsMac + * @see gl4java.GLContext#OsWindoof + * @see gl4java.GLContext#OsUnknown + * @see gl4java.GLContext#OsX11 + * @see gl4java.GLContext#OsMac */ public final int getNativeOSType() { return osType; } @@ -474,8 +482,8 @@ public class GLContext extends Object * * After a GLContext is created, this property can be queried ! * - * @see GLContext#doubleBuffer - * @see GLContext#GLContext + * @see gl4java.GLContext#doubleBuffer + * @see gl4java.GLContext#GLContext */ public final boolean isDoubleBuffer() { return doubleBuffer; } @@ -484,8 +492,8 @@ public class GLContext extends Object * * After a GLContext is created, this property can be queried ! * - * @see GLContext#stereoView - * @see GLContext#GLContext + * @see gl4java.GLContext#stereoView + * @see gl4java.GLContext#GLContext */ public final int getStencilBitNumber() { return stencilBits; } @@ -494,7 +502,7 @@ public class GLContext extends Object * * After a GLContext is created, this property can be queried ! * - * @see GLContext#GLContext + * @see gl4java.GLContext#GLContext */ public final int getAccumSize() { return accumSize; } @@ -503,8 +511,8 @@ public class GLContext extends Object * * After a GLContext is created, this property can be queried ! * - * @see GLContext#stereoView - * @see GLContext#GLContext + * @see gl4java.GLContext#stereoView + * @see gl4java.GLContext#GLContext */ public final boolean isStereoView() { return stereoView; } @@ -513,8 +521,8 @@ public class GLContext extends Object * * After a GLContext is created, this property can be queried ! * - * @see GLContext#rgba - * @see GLContext#GLContext + * @see gl4java.GLContext#rgba + * @see gl4java.GLContext#GLContext */ public final boolean isRGBA() { return rgba; } @@ -523,8 +531,8 @@ public class GLContext extends Object * * After a GLContext is created, this property can be queried ! * - * @see GLContext#createOwnWindow - * @see GLContext#GLContext + * @see gl4java.GLContext#createOwnWindow + * @see gl4java.GLContext#GLContext */ public final boolean isOwnWindowCreated() { return createOwnWindow; } @@ -537,6 +545,17 @@ public class GLContext extends Object * Java level, or "libGL4JavaJauGljJNI.so" at the solaris level, * or "GL4JavaJauGljJNI.dll" at the win32 level :-). * + *

    + * + * The user must call loadNativeLibrary ! + * E.g. he can add the default loader like this: + *

    +	    static {
    +		if(GLContext.loadNativeLibraries(null, null, null)==false)
    +		  System.out.println("could not load def. native libs.");
    +	    }
    +     * 
    + * * @param gljLibName The name of the GLContex native library. * If gljLibName==null, the default library will be used ! * @@ -548,11 +567,11 @@ public class GLContext extends Object * * @return boolean, true if succesfull ! * - * @see GLContext#defGljLib + * @see gl4java.GLContext#defGljLib * - * @see GLContext#defGLFuncLib + * @see gl4java.GLContext#defGLFuncLib * - * @see GLContext#defGLUFuncLib + * @see gl4java.GLContext#defGLUFuncLib */ public static boolean loadNativeLibraries ( String gljLibName, String glLibName, @@ -606,6 +625,7 @@ public class GLContext extends Object isNetscapeJvm = jvmVendor!=null && jvmVendor.indexOf("Netscape")>=0 ; isMicrosoftJvm = jvmVendor!=null && jvmVendor.indexOf("Microsoft")>=0 ; + isIBMJvm = jvmVendor!=null && jvmVendor.indexOf("IBM")>=0 ; // Determine the OS osName = System.getProperty( "os.name" ); @@ -616,21 +636,46 @@ public class GLContext extends Object else /* oops - lets guess unix/x11 :-) */ osType = OsX11; - String jniEXTsuff = ""; - if( jvmVersionMajor>=2 || - ( jvmVersionMajor==1 && jvmVersionMinor>=2 ) + ( jvmVersionMajor==1 && jvmVersionMinor>=4 ) ) { - jniEXTsuff = "12"; + jniEXTsuff_gl_glu = "12"; + jniEXTsuff_glj = "13"; + } + + else + + if( jvmVersionMajor==1 && jvmVersionMinor>=3 + && !isIBMJvm && !isMicrosoftJvm + ) + { + jniEXTsuff_gl_glu = "12"; + jniEXTsuff_glj = "13"; + } + + else + + if( jvmVersionMajor==1 && jvmVersionMinor>=2 ) + { + jniEXTsuff_gl_glu = "12"; + jniEXTsuff_glj = "12"; + } + + else + + { + jniEXTsuff_gl_glu = ""; + jniEXTsuff_glj = ""; } + if(gljLibName==null) - gljLibName = defGljLib+jniEXTsuff; + gljLibName = defGljLib+jniEXTsuff_glj; if(glLibName==null) - glLibName = defGLFuncLib+jniEXTsuff; + glLibName = defGLFuncLib+jniEXTsuff_gl_glu; if(gluLibName==null) - gluLibName = defGLUFuncLib+jniEXTsuff; + gluLibName = defGLUFuncLib+jniEXTsuff_gl_glu; if ( (osType==OsWindoof) && (isMicrosoftJvm) ) { @@ -717,19 +762,6 @@ public class GLContext extends Object return libsLoaded; } - /** - * no no no .. the user has to choose ! - * - * The user must call loadNativeLibrary ! - * - * @see GLContext#loadNativeLibrary - * - * static { - * if(!libLoaded) - * loadNativeLibrares(null, null, null); - * } - */ - /** * Test to load the native library, GLFunc and GLUFunc implementation ! * If succesfull, a Frame will created and the GL-Infos (vendor, ...) @@ -826,10 +858,16 @@ public class GLContext extends Object Frame f = new Frame("GL4Java Info"); f.setSize(10, 10); - f.pack(); + Canvas cvs = new Canvas(); + cvs.setVisible(true); + cvs.setSize(50,50); + f.add("Center", cvs); + f.setSize(60,60); + + // f.pack(); f.setVisible(true); - GLContext glj = new GLContext(f, gl, glu); + GLContext glj = new GLContext(cvs, gl, glu); Frame fInfo = glj.gljShowVersions(); @@ -1382,7 +1420,7 @@ public class GLContext extends Object * @return GLFunc, the implementation's instance if exists * and valid, or null * - * @see GLContext#defGLFuncClass + * @see gl4java.GLContext#defGLFuncClass */ public static final GLFunc createGLFunc(String vendorClass) { @@ -1427,7 +1465,7 @@ public class GLContext extends Object * @return GLUFunc, the implementation's instance if exists * and valid, or null * - * @see GLContext#defGLUFuncClass + * @see gl4java.GLContext#defGLUFuncClass */ public static final GLUFunc createGLUFunc(String vendorClass) { @@ -1505,7 +1543,7 @@ public class GLContext extends Object * * @return void * - * @see GLContext#GLContext + * @see gl4java.GLContext#GLContext */ public final void createGLContext(Graphics g) { @@ -1524,7 +1562,9 @@ public class GLContext extends Object System.out.println("using MSJDirect ..."); win_access = (WinHandleAccess) - Class.forName(access_name + "windows.MSWin32HandleAccess").newInstance(); + Class.forName( + access_name+"windows.MSWin32HandleAccess" + ).newInstance(); /* _comp should be a subclass of Canvas, and its parent class should be of type Panel, Frame or Window. If not, this all falls apart. */ @@ -1549,7 +1589,7 @@ public class GLContext extends Object if(g==null) System.out.println("GL4Java-MSJVM: got empty Graphics"); - pData = (int)win_access.getWinHandle(ob,g); + pData = win_access.getWinHandle(ob,g); if (pData != 0) { @@ -1588,25 +1628,31 @@ public class GLContext extends Object { } } } - } else if(osType==OsWindoof) + } else if(osType==OsWindoof && !useJAWT()) { win_access = (WinHandleAccess) - Class.forName(access_name + "windows.Win32HandleAccess").newInstance(); - pData = (int) win_access.getWinHandle(_compHeavy, g); + Class.forName( + access_name+"windows.Win32HandleAccess" + ).newInstance(); + pData = win_access.getWinHandle(_compHeavy, g); windowHandle = pData; } - else if(osType==OsMac) + else if(osType==OsMac && !useJAWT()) { win_access = (WinHandleAccess) - Class.forName(access_name + "macintosh.MacHandleAccess").newInstance(); - pData = (int) win_access.getWinHandle(_compHeavy, g); + Class.forName( + access_name+"macintosh.MacHandleAccess" + ).newInstance(); + pData = win_access.getWinHandle(_compHeavy, g); windowHandle = pData; } - else /* X11 */ + else if(!useJAWT()) { win_access = (WinHandleAccess) - Class.forName(access_name + "motif.X11HandleAccess").newInstance(); - pData = (int) win_access.getWinHandle(_compHeavy, g); + Class.forName( + access_name+"motif.X11HandleAccess" + ).newInstance(); + pData = win_access.getWinHandle(_compHeavy, g); windowHandle = pData; } } @@ -1652,7 +1698,7 @@ public class GLContext extends Object * @exception GL4Java.GL4JavaInitException * this class throws an exception * if the native call to create a OpenGL context failed. - * @see GLContext#createGLContext + * @see gl4java.GLContext#createGLContext * @see gl4java.awt.GLCanvas#paint * @see gl4java.awt.GLCanvas#init */ @@ -1661,7 +1707,7 @@ public class GLContext extends Object { if( libsLoaded==false ) return ; - if(pData==0 && !offScreenRenderer) + if(pData==0 && !offScreenRenderer && !useJAWT()) { System.out.println("could not open a GL widget -- Win CONTEXT"); throw new GL4JavaInitException (); @@ -1670,7 +1716,11 @@ public class GLContext extends Object if(gljClassDebug) System.out.println(">>> gljInit"); - if( openOpenGLNative() == false ) + boolean ok; + + ok = openOpenGLNative(_comp); + + if( ! ok ) { if ( useMSJDirect ) { @@ -1691,6 +1741,7 @@ public class GLContext extends Object throw new GL4JavaInitException (); } else { isInitialized = true; + glContextNumber++; } } @@ -1755,7 +1806,7 @@ public class GLContext extends Object *

    * * @return boolean - * @see GLContext#gljInit + * @see gl4java.GLContext#gljInit * @see gl4java.awt.GLCanvas#cvsIsInit */ public final boolean gljIsInit() @@ -1803,13 +1854,30 @@ public class GLContext extends Object } private final native void gljResizeNative( boolean isOwnWindow, - int disp, int thisWin, + long disp, long thisWin, int width, int height ); + /** + * native C function of GLJ Library, + * which query if it uses the JDK 1.3 JAWT interface + * to fetch the native window handle + */ + protected final native boolean useJAWT(); + + /** + * native C function of GLJ Library, + * which query if the JAWT Surface has changed ! + * + * Use this after gljMakeCurrent -> jawt_lock ! + * + * If true, we need a new GLContext ! + */ + protected final native boolean hasJAWTSurfaceChanged(long thisWin); + /** * native C function to open the OpenGLwidget */ - protected final native boolean openOpenGLNative(); + protected final native boolean openOpenGLNative(Component canvas); /** * native C function to check the gl types. @@ -1856,24 +1924,153 @@ public class GLContext extends Object return true; } + private Thread ctxThread = null; + private Thread nextThread = null; + /** * * gljMakeCurrent checks whether GL4Java is initializes * AND makes the GL-Context current for this thread. * - * It's more save to use ´gljMakeCurrent´, instead of - * ´gljMakeCurrentNative´, because we do check if GL is initalised ! + *

    + * + * You MUST encapsulate your OpenGL call's within: + *

    +    	- gljMakeCurrent()
    +		YOUR OpenGL commands here !
    +    	- gljFree()
    +    * 
    * * @return boolean + * + * @see gl4java.GLContext#gljSwap + * @see gl4java.awt.GLCanvas#display + * @see gl4java.awt.GLCanvas#sDisplay */ - public final boolean gljMakeCurrent() + public synchronized final boolean gljMakeCurrent() { if ( ! isInitialized || !glEnabled ) return false; - return gljMakeCurrentNative( displayHandle, - windowHandle, - glContext); + Thread thisThread = Thread.currentThread(); + boolean dbgPrinted = false; + + /** + * force a thread switch to improve responsiveness ! + * + * if an earmarked thread exist (nextThread) + * we have to wait .. + */ + while (nextThread!=null && nextThread!=thisThread) + { + if(gljThreadDebug && !dbgPrinted) + { + System.out.println("wait-switch: "+thisThread); + System.out.println("\tctxThread="+ctxThread+", next="+nextThread); + dbgPrinted=true; + } + + /** + * Force freeing this threads context .. to avoid a deadlock .. + * This makes sense, because it is possible, + * that the same thread enters this point twice, + * before calling gljFree ! + */ + if (ctxThread!=null && ctxThread==thisThread) + gljFree(); + + try { + // wait till earmarked nextThread has its chance .. + wait(); + } catch (InterruptedException e) { } + } + dbgPrinted=false; + + /** + * put all req. threads to the wait-state, + * if another thread owns the GLXContext ! + */ + while (ctxThread!=null && ctxThread!=thisThread) + { + /** + * remember this thread as earmarked, + * to be sure being the next one ... + */ + nextThread = thisThread; + + if(gljThreadDebug && !dbgPrinted) + { + System.out.println("wait-earmarked: "+thisThread); + System.out.println("\tctxThread="+ctxThread+", next="+nextThread); + dbgPrinted=true; + } + + try { + // wait for gljFree to release the GLXContext + wait(); + } catch (InterruptedException e) { } + } + + ctxThread = thisThread ; // blocking asap .. + + if(gljThreadDebug) + { + if(nextThread==thisThread) + { + System.out.println(thisThread+" "); + System.out.println("\tctxThread="+ctxThread+", next:=NULL"); + } else { + System.out.println(thisThread); + System.out.println("\tctxThread="+ctxThread+", next="+nextThread); + } + } + + /** + * if next thread gotten the context, it is no more earmarked .. + */ + if(nextThread==thisThread) + nextThread = null; + + boolean result = gljMakeCurrentNative( _comp, displayHandle, + windowHandle, glContext); + + /** + * If glXMakeCurrent failed, nobody holds this GLXContext .. + */ + if(!result) + { + ctxThread=null; + if(hasJAWTSurfaceChanged(windowHandle)) + { + /** + * This can only happen while using JAWT .. + */ + System.out.println("GL4Java: JAWT Surface-Change !!!"); + System.out.println("\t destroying GLContext ...!!!"); + gljDestroy(); + + System.out.println("GL4Java: JAWT Surface-Change !!!"); + System.out.println("\t creating GLContext ...!!!"); + + /* try to establish a context to OpenGL */ + try + { + System.out.println("GL4Java: JAWT Surface-Change !!!"); + gljInit(); + System.out.println("GL4Java: JAWT Surface-Change finished !!!"); + } + catch( GL4JavaInitException e ) + { + System.out.println( "\tcan't create a GL context\n"); + System.out.println("GL4Java: JAWT Surface Change FAILED!!!"); + } + System.out.println("\t GLContext Recreated ...!!!"); + } + } + + notifyAll(); // notify gljFree after action is done .. + + return result; } @@ -1891,20 +2088,16 @@ public class GLContext extends Object * * @deprecated The argument freeContextFirst is obsolete ! */ - public final boolean gljMakeCurrent(boolean freeContextFirst) + public synchronized final boolean gljMakeCurrent(boolean freeContextFirst) { - if ( ! isInitialized || !glEnabled ) - return false; - - return gljMakeCurrentNative( displayHandle, - windowHandle, - glContext); + return gljMakeCurrent(); } private static final native boolean gljMakeCurrentNative( - int disp, - int thisWin, - int glContext); + Component canvas, + long disp, + long thisWin, + long glContext); /** * @@ -1917,21 +2110,24 @@ public class GLContext extends Object /** * - * gljDestroy free´s AND destroy´s the GL Context + * gljDestroy destroy´s the GL Context * * This function should be called when removing * a GLContext !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * + * Call gljFree befor this method, to be sure .. + * * @return void * - * @see GLContext#gljMakeCurrent - * @see GLContext#gljSwap + * @see gl4java.GLContext#gljMakeCurrent + * @see gl4java.GLContext#gljFree + * @see gl4java.GLContext#gljSwap */ - public final synchronized boolean gljDestroy() + public synchronized final boolean gljDestroy() { boolean result = true; - if (!gljDestroyNative()) + if (!gljDestroyNative(_comp)) result = false; windowHandle = 0; @@ -1948,37 +2144,77 @@ public class GLContext extends Object } pData = 0; + isInitialized = false; + glContextNumber--; return result; } - private final native boolean gljDestroyNative(); + private final native boolean gljDestroyNative(Component canvas); /** * * gljFree free´s the GL Context * - * This could be called after at last in your display function, - * if you have GC problems .... + * This MUST be called at last in your display function ! * * @return void * - * @see GLContext#gljMakeCurrent - * @see GLContext#gljSwap + * @see gl4java.GLContext#gljMakeCurrent + * @see gl4java.GLContext#gljSwap + * @see gl4java.awt.GLCanvas#display * @see gl4java.awt.GLCanvas#sDisplay */ - public final boolean gljFree() + public synchronized final boolean gljFree() { if ( ! isInitialized ) return false; - return gljFreeNative ( displayHandle, - windowHandle, - glContext); + Thread thisThread = Thread.currentThread(); + boolean dbgPrinted = false; + + /** + * I do skip a lock for the gljFree semantics, + * because: + * - to minimize a deadlock + * - believing that gljFree is semantically the last call ;-) + * - see above -> redundant + while (ctxThread!=null && ctxThread!=thisThread) + { + if(gljThreadDebug && !dbgPrinted) + { + System.out.println("* wait: "+thisThread); + System.out.println("\tctxThread="+ctxThread+", next="+nextThread); + dbgPrinted=true; + } + + try { + // wait for gljMakeCurrent to lock the GLXContext + wait(); + } catch (InterruptedException e) { } + } + + if(gljThreadDebug) + { + System.out.println("*: "+thisThread); + System.out.println("\tctxThread="+ctxThread+", next="+nextThread); + } + */ + + + boolean result = + gljFreeNative ( _comp, displayHandle, + windowHandle, + glContext); + ctxThread = null ; + notifyAll(); + + return result; } - private static final native boolean gljFreeNative( int disp, - int thisWin, - int glContext ); + private static final native boolean gljFreeNative( Component canvas, + long disp, + long thisWin, + long glContext ); /** * swap method are for double buffering @@ -1993,9 +2229,9 @@ public class GLContext extends Object doubleBuffer); } - private static final native boolean gljSwapNative( int disp, - int thisWin, - int glContext, + private static final native boolean gljSwapNative( long disp, + long thisWin, + long glContext, boolean doubleBuffer ); /** @@ -2007,8 +2243,7 @@ public class GLContext extends Object * * @return boolean * - * @see GLContext#gljIsEnabled - * @see GLContext#gljMakeCurrent + * @see gl4java.GLContext#gljMakeCurrent */ public void setEnabled(boolean b) { @@ -2022,8 +2257,8 @@ public class GLContext extends Object * * @return boolean * - * @see GLContext#setEnabled - * @see GLContext#gljMakeCurrent + * @see gl4java.GLContext#setEnabled + * @see gl4java.GLContext#gljMakeCurrent */ public boolean isEnabled() { diff --git a/gl4java/GLEnum.java b/gl4java/GLEnum.java index ee53d8b..a096e56 100644 --- a/gl4java/GLEnum.java +++ b/gl4java/GLEnum.java @@ -25,7 +25,7 @@ public interface GLEnum public static final boolean GL_TRUE = true; /** - * C2J Parser Version 1.4 Beta + * C2J Parser Version 1.5 Beta * Jausoft - Sven Goethel Software Development * Reading from file: gl-enum-auto.orig.h . . . * Destination-Class: gl4java_GLEnum ! @@ -1340,7 +1340,7 @@ public interface GLEnum public static final int GL_ZERO = 0x0; public static final int GL_ZOOM_X = 0x0D16; public static final int GL_ZOOM_Y = 0x0D17; -/* C2J Parser Version 1.4 Beta: Java program parsed successfully. */ +/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */ } diff --git a/gl4java/GLFunc.java b/gl4java/GLFunc.java index 3879569..896f7ca 100644 --- a/gl4java/GLFunc.java +++ b/gl4java/GLFunc.java @@ -31,7 +31,7 @@ public String getClassVersion ( ) ; public static final String[] GL_PROC_NAMES = { /** - * C2J Parser Version 1.4 Beta + * C2J Parser Version 1.5 Beta * Jausoft - Sven Goethel Software Development * Reading from file: gl-proto-auto.orig.h . . . * Destination-Class: gl4java_GLFuncJauJNI ! @@ -474,11 +474,11 @@ public static final String[] GL_PROC_NAMES = { "glMultiTexCoord4ivARB", "glMultiTexCoord4sARB", "glMultiTexCoord4svARB", -/* C2J Parser Version 1.4 Beta: Java program parsed successfully. */ +/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */ null }; /** - * C2J Parser Version 1.4 Beta + * C2J Parser Version 1.5 Beta * Jausoft - Sven Goethel Software Development * Reading from file: gl-proto-auto.orig.h . . . * Destination-Class: gl4java_GLFuncJauJNI ! @@ -7431,7 +7431,7 @@ public static final String[] GL_PROC_NAMES = { short[] v ) ; -/* C2J Parser Version 1.4 Beta: Java program parsed successfully. */ +/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */ } diff --git a/gl4java/GLFuncJauJNI.java b/gl4java/GLFuncJauJNI.java index 7887860..b8ee949 100644 --- a/gl4java/GLFuncJauJNI.java +++ b/gl4java/GLFuncJauJNI.java @@ -37,7 +37,7 @@ public final String getClassVersion ( ) /** - * C2J Parser Version 1.4 Beta + * C2J Parser Version 1.5 Beta * Jausoft - Sven Goethel Software Development * Reading from file: gl-proto-auto.orig.h . . . * Destination-Class: gl4java_GLFuncJauJNI ! @@ -6990,7 +6990,7 @@ public final String getClassVersion ( ) short[] v ) ; -/* C2J Parser Version 1.4 Beta: Java program parsed successfully. */ +/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */ } diff --git a/gl4java/GLFuncJauJNInf.java b/gl4java/GLFuncJauJNInf.java index 5187e83..68a5b8d 100644 --- a/gl4java/GLFuncJauJNInf.java +++ b/gl4java/GLFuncJauJNInf.java @@ -37,7 +37,7 @@ public String getClassVersion ( ) /** - * C2J Parser Version 1.4 Beta + * C2J Parser Version 1.5 Beta * Jausoft - Sven Goethel Software Development * Reading from file: gl-proto-auto.orig.h . . . * Destination-Class: gl4java_GLFuncJauJNInf ! @@ -6990,7 +6990,7 @@ public String getClassVersion ( ) short[] v ) ; -/* C2J Parser Version 1.4 Beta: Java program parsed successfully. */ +/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */ } diff --git a/gl4java/GLUEnum.java b/gl4java/GLUEnum.java index 41982b5..b34eb08 100644 --- a/gl4java/GLUEnum.java +++ b/gl4java/GLUEnum.java @@ -22,7 +22,7 @@ public interface GLUEnum { /** - * C2J Parser Version 1.4 Beta + * C2J Parser Version 1.5 Beta * Jausoft - Sven Goethel Software Development * Reading from file: glu-enum-auto.orig.h . . . * Destination-Class: gl4java_GLUEnum ! @@ -134,7 +134,7 @@ public interface GLUEnum public static final int GLU_EDGE_FLAG = GLU_TESS_EDGE_FLAG; public static final int GLU_END = GLU_TESS_END; public static final int GLU_ERROR = GLU_TESS_ERROR; -/* C2J Parser Version 1.4 Beta: Java program parsed successfully. */ +/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */ } diff --git a/gl4java/GLUFunc.java b/gl4java/GLUFunc.java index a36448d..afee2cb 100644 --- a/gl4java/GLUFunc.java +++ b/gl4java/GLUFunc.java @@ -31,15 +31,19 @@ public String getNativeVersion ( ) ; public String getClassVendor ( ) ; public String getClassVersion ( ) ; +public long gluNewQuadric( ); +public long gluNewNurbsRenderer( ); +public long gluNewTess( ); + public void gluQuadricCallback( - int qobj, int which, + long qobj, int which, Object methodClassInstance, String methodName, String signature ); public void gluNurbsCallback( - int nobj, int which, + long nobj, int which, Object methodClassInstance, String methodName, String signature @@ -47,7 +51,7 @@ public void gluNurbsCallback( public void gluTessCallback( - int tobj, int which, + long tobj, int which, Object methodClassInstance, String methodName, String signature, @@ -58,14 +62,14 @@ public void gluTessCallback( int voidArrayLen5 ); -public void gluDeleteQuadric( int qobj ); +public void gluDeleteQuadric( long qobj ); -public void gluDeleteNurbsRenderer( int nobj ); +public void gluDeleteNurbsRenderer( long nobj ); -public void gluDeleteTess( int tobj ); +public void gluDeleteTess( long tobj ); /** - * C2J Parser Version 1.4 Beta + * C2J Parser Version 1.5 Beta * Jausoft - Sven Goethel Software Development * Reading from file: glu-proto-auto.orig.h . . . * Destination-Class: gl4java_GLUFuncJauJNI ! @@ -316,15 +320,6 @@ public void gluDeleteTess( int tobj ); long[] data ) ; -/** - * Original Function-Prototype : - *
     
    -   extern GLUquadricObj * gluNewQuadric ( void ) ;
    - * 
    - */ - public int gluNewQuadric ( - ) ; - /** * Original Function-Prototype : *
     
    @@ -332,7 +327,7 @@ public void  gluDeleteTess( int tobj );
      * 
    */ public void gluQuadricDrawStyle ( - int quadObject, + long quadObject, int drawStyle ) ; @@ -343,7 +338,7 @@ public void gluDeleteTess( int tobj ); *
    */ public void gluQuadricOrientation ( - int quadObject, + long quadObject, int orientation ) ; @@ -354,7 +349,7 @@ public void gluDeleteTess( int tobj ); *
    */ public void gluQuadricNormals ( - int quadObject, + long quadObject, int normals ) ; @@ -365,7 +360,7 @@ public void gluDeleteTess( int tobj ); * */ public void gluQuadricTexture ( - int quadObject, + long quadObject, boolean textureCoords ) ; @@ -376,7 +371,7 @@ public void gluDeleteTess( int tobj ); * */ public void gluCylinder ( - int qobj, + long qobj, double baseRadius, double topRadius, double height, @@ -391,7 +386,7 @@ public void gluDeleteTess( int tobj ); * */ public void gluSphere ( - int qobj, + long qobj, double radius, int slices, int stacks @@ -404,7 +399,7 @@ public void gluDeleteTess( int tobj ); * */ public void gluDisk ( - int qobj, + long qobj, double innerRadius, double outerRadius, int slices, @@ -418,7 +413,7 @@ public void gluDeleteTess( int tobj ); * */ public void gluPartialDisk ( - int qobj, + long qobj, double innerRadius, double outerRadius, int slices, @@ -427,15 +422,6 @@ public void gluDeleteTess( int tobj ); double sweepAngle ) ; -/** - * Original Function-Prototype : - *
     
    -   extern GLUnurbsObj * gluNewNurbsRenderer ( void ) ;
    - * 
    - */ - public int gluNewNurbsRenderer ( - ) ; - /** * Original Function-Prototype : *
     
    @@ -443,7 +429,7 @@ public void  gluDeleteTess( int tobj );
      * 
    */ public void gluLoadSamplingMatrices ( - int nobj, + long nobj, float[] modelMatrix, float[] projMatrix, int[] viewport @@ -456,7 +442,7 @@ public void gluDeleteTess( int tobj ); * */ public void gluNurbsProperty ( - int nobj, + long nobj, int property, float value ) ; @@ -468,7 +454,7 @@ public void gluDeleteTess( int tobj ); * */ public void gluGetNurbsProperty ( - int nobj, + long nobj, int property, float[] value ) ; @@ -480,7 +466,7 @@ public void gluDeleteTess( int tobj ); * */ public void gluBeginCurve ( - int nobj + long nobj ) ; /** @@ -490,7 +476,7 @@ public void gluDeleteTess( int tobj ); * */ public void gluEndCurve ( - int nobj + long nobj ) ; /** @@ -500,7 +486,7 @@ public void gluDeleteTess( int tobj ); * */ public void gluNurbsCurve ( - int nobj, + long nobj, int nknots, float[] knot, int stride, @@ -516,7 +502,7 @@ public void gluDeleteTess( int tobj ); * */ public void gluBeginSurface ( - int nobj + long nobj ) ; /** @@ -526,7 +512,7 @@ public void gluDeleteTess( int tobj ); * */ public void gluEndSurface ( - int nobj + long nobj ) ; /** @@ -536,7 +522,7 @@ public void gluDeleteTess( int tobj ); * */ public void gluNurbsSurface ( - int nobj, + long nobj, int sknot_count, float[] sknot, int tknot_count, @@ -556,7 +542,7 @@ public void gluDeleteTess( int tobj ); * */ public void gluBeginTrim ( - int nobj + long nobj ) ; /** @@ -566,7 +552,7 @@ public void gluDeleteTess( int tobj ); * */ public void gluEndTrim ( - int nobj + long nobj ) ; /** @@ -576,22 +562,13 @@ public void gluDeleteTess( int tobj ); * */ public void gluPwlCurve ( - int nobj, + long nobj, int count, float[] array, int stride, int type ) ; -/** - * Original Function-Prototype : - *
     
    -   extern GLUtesselator * gluNewTess ( void ) ;
    - * 
    - */ - public int gluNewTess ( - ) ; - /** * Original Function-Prototype : *
     
    @@ -599,31 +576,31 @@ public void  gluDeleteTess( int tobj );
      * 
    */ public void gluTessBeginPolygon ( - int tobj, + long tobj, byte[] polygon_data ) ; public void gluTessBeginPolygon ( - int tobj, + long tobj, short[] polygon_data ) ; public void gluTessBeginPolygon ( - int tobj, + long tobj, int[] polygon_data ) ; public void gluTessBeginPolygon ( - int tobj, + long tobj, float[] polygon_data ) ; public void gluTessBeginPolygon ( - int tobj, + long tobj, double[] polygon_data ) ; public void gluTessBeginPolygon ( - int tobj, + long tobj, boolean[] polygon_data ) ; public void gluTessBeginPolygon ( - int tobj, + long tobj, long[] polygon_data ) ; @@ -634,7 +611,7 @@ public void gluDeleteTess( int tobj ); * */ public void gluTessBeginContour ( - int tobj + long tobj ) ; /** @@ -644,37 +621,37 @@ public void gluDeleteTess( int tobj ); * */ public void gluTessVertex ( - int tobj, + long tobj, double[] coords, byte[] vertex_data ) ; public void gluTessVertex ( - int tobj, + long tobj, double[] coords, short[] vertex_data ) ; public void gluTessVertex ( - int tobj, + long tobj, double[] coords, int[] vertex_data ) ; public void gluTessVertex ( - int tobj, + long tobj, double[] coords, float[] vertex_data ) ; public void gluTessVertex ( - int tobj, + long tobj, double[] coords, double[] vertex_data ) ; public void gluTessVertex ( - int tobj, + long tobj, double[] coords, boolean[] vertex_data ) ; public void gluTessVertex ( - int tobj, + long tobj, double[] coords, long[] vertex_data ) ; @@ -686,7 +663,7 @@ public void gluDeleteTess( int tobj ); * */ public void gluTessEndContour ( - int tobj + long tobj ) ; /** @@ -696,7 +673,7 @@ public void gluDeleteTess( int tobj ); * */ public void gluTessEndPolygon ( - int tobj + long tobj ) ; /** @@ -706,7 +683,7 @@ public void gluDeleteTess( int tobj ); * */ public void gluTessProperty ( - int tobj, + long tobj, int which, double value ) ; @@ -718,7 +695,7 @@ public void gluDeleteTess( int tobj ); * */ public void gluTessNormal ( - int tobj, + long tobj, double x, double y, double z @@ -731,7 +708,7 @@ public void gluDeleteTess( int tobj ); * */ public void gluGetTessProperty ( - int tobj, + long tobj, int which, double[] value ) ; @@ -743,7 +720,7 @@ public void gluDeleteTess( int tobj ); * */ public void gluBeginPolygon ( - int tobj + long tobj ) ; /** @@ -753,7 +730,7 @@ public void gluDeleteTess( int tobj ); * */ public void gluNextContour ( - int tobj, + long tobj, int type ) ; @@ -764,10 +741,10 @@ public void gluDeleteTess( int tobj ); * */ public void gluEndPolygon ( - int tobj + long tobj ) ; -/* C2J Parser Version 1.4 Beta: Java program parsed successfully. */ +/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */ } diff --git a/gl4java/GLUFuncJauJNI.java b/gl4java/GLUFuncJauJNI.java index 439a758..5ba2f08 100644 --- a/gl4java/GLUFuncJauJNI.java +++ b/gl4java/GLUFuncJauJNI.java @@ -50,7 +50,7 @@ public final String getClassVersion ( ) * @see GLUFunc#gluNewQuadric */ public final native void gluQuadricCallback( - int qobj, int which, + long qobj, int which, Object methodClassInstance, String methodName, String signature @@ -71,7 +71,7 @@ public final native void gluQuadricCallback( * @see GLUFunc#gluNewNurbsRenderer */ public final native void gluNurbsCallback( - int nobj, int which, + long nobj, int which, Object methodClassInstance, String methodName, String signature @@ -103,7 +103,7 @@ public final native void gluNurbsCallback( * @see GLUFunc#gluNewTess */ public final native void gluTessCallback( - int tobj, int which, + long tobj, int which, Object methodClassInstance, String methodName, String signature, @@ -120,7 +120,7 @@ public final native void gluTessCallback( * @param qobj the quadratic id, for which all callback-methods * should be de-registered */ -public final native void gluDeleteQuadric( int qobj ); +public final native void gluDeleteQuadric( long qobj ); /** * The Callback de-registry function. @@ -128,7 +128,7 @@ public final native void gluDeleteQuadric( int qobj ); * @param nobj the nurbs id, for which all callback-methods * should be de-registered */ -public final native void gluDeleteNurbsRenderer( int nobj ); +public final native void gluDeleteNurbsRenderer( long nobj ); /** * The Callback de-registry function. @@ -136,10 +136,14 @@ public final native void gluDeleteNurbsRenderer( int nobj ); * @param tobj the tesselation id, for which all callback-methods * should be de-registered */ -public final native void gluDeleteTess( int tobj ); +public final native void gluDeleteTess( long tobj ); + +public final native long gluNewQuadric( ); +public final native long gluNewNurbsRenderer( ); +public final native long gluNewTess( ); /** - * C2J Parser Version 1.4 Beta + * C2J Parser Version 1.5 Beta * Jausoft - Sven Goethel Software Development * Reading from file: glu-proto-auto.orig.h . . . * Destination-Class: gl4java_GLUFuncJauJNI ! @@ -390,15 +394,6 @@ public final native void gluDeleteTess( int tobj ); long[] data ) ; -/** - * Original Function-Prototype : - *
     
    -   extern GLUquadricObj * gluNewQuadric ( void ) ;
    - * 
    - */ - public final native int gluNewQuadric ( - ) ; - /** * Original Function-Prototype : *
     
    @@ -406,7 +401,7 @@ public final native void  gluDeleteTess( int tobj );
      * 
    */ public final native void gluQuadricDrawStyle ( - int quadObject, + long quadObject, int drawStyle ) ; @@ -417,7 +412,7 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluQuadricOrientation ( - int quadObject, + long quadObject, int orientation ) ; @@ -428,7 +423,7 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluQuadricNormals ( - int quadObject, + long quadObject, int normals ) ; @@ -439,7 +434,7 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluQuadricTexture ( - int quadObject, + long quadObject, boolean textureCoords ) ; @@ -450,7 +445,7 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluCylinder ( - int qobj, + long qobj, double baseRadius, double topRadius, double height, @@ -465,7 +460,7 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluSphere ( - int qobj, + long qobj, double radius, int slices, int stacks @@ -478,7 +473,7 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluDisk ( - int qobj, + long qobj, double innerRadius, double outerRadius, int slices, @@ -492,7 +487,7 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluPartialDisk ( - int qobj, + long qobj, double innerRadius, double outerRadius, int slices, @@ -501,15 +496,6 @@ public final native void gluDeleteTess( int tobj ); double sweepAngle ) ; -/** - * Original Function-Prototype : - *
     
    -   extern GLUnurbsObj * gluNewNurbsRenderer ( void ) ;
    - * 
    - */ - public final native int gluNewNurbsRenderer ( - ) ; - /** * Original Function-Prototype : *
     
    @@ -517,7 +503,7 @@ public final native void  gluDeleteTess( int tobj );
      * 
    */ public final native void gluLoadSamplingMatrices ( - int nobj, + long nobj, float[] modelMatrix, float[] projMatrix, int[] viewport @@ -530,7 +516,7 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluNurbsProperty ( - int nobj, + long nobj, int property, float value ) ; @@ -542,7 +528,7 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluGetNurbsProperty ( - int nobj, + long nobj, int property, float[] value ) ; @@ -554,7 +540,7 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluBeginCurve ( - int nobj + long nobj ) ; /** @@ -564,7 +550,7 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluEndCurve ( - int nobj + long nobj ) ; /** @@ -574,7 +560,7 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluNurbsCurve ( - int nobj, + long nobj, int nknots, float[] knot, int stride, @@ -590,7 +576,7 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluBeginSurface ( - int nobj + long nobj ) ; /** @@ -600,7 +586,7 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluEndSurface ( - int nobj + long nobj ) ; /** @@ -610,7 +596,7 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluNurbsSurface ( - int nobj, + long nobj, int sknot_count, float[] sknot, int tknot_count, @@ -630,7 +616,7 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluBeginTrim ( - int nobj + long nobj ) ; /** @@ -640,7 +626,7 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluEndTrim ( - int nobj + long nobj ) ; /** @@ -650,22 +636,13 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluPwlCurve ( - int nobj, + long nobj, int count, float[] array, int stride, int type ) ; -/** - * Original Function-Prototype : - *
     
    -   extern GLUtesselator * gluNewTess ( void ) ;
    - * 
    - */ - public final native int gluNewTess ( - ) ; - /** * Original Function-Prototype : *
     
    @@ -673,31 +650,31 @@ public final native void  gluDeleteTess( int tobj );
      * 
    */ public final native void gluTessBeginPolygon ( - int tobj, + long tobj, byte[] polygon_data ) ; public final native void gluTessBeginPolygon ( - int tobj, + long tobj, short[] polygon_data ) ; public final native void gluTessBeginPolygon ( - int tobj, + long tobj, int[] polygon_data ) ; public final native void gluTessBeginPolygon ( - int tobj, + long tobj, float[] polygon_data ) ; public final native void gluTessBeginPolygon ( - int tobj, + long tobj, double[] polygon_data ) ; public final native void gluTessBeginPolygon ( - int tobj, + long tobj, boolean[] polygon_data ) ; public final native void gluTessBeginPolygon ( - int tobj, + long tobj, long[] polygon_data ) ; @@ -708,7 +685,7 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluTessBeginContour ( - int tobj + long tobj ) ; /** @@ -718,37 +695,37 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluTessVertex ( - int tobj, + long tobj, double[] coords, byte[] vertex_data ) ; public final native void gluTessVertex ( - int tobj, + long tobj, double[] coords, short[] vertex_data ) ; public final native void gluTessVertex ( - int tobj, + long tobj, double[] coords, int[] vertex_data ) ; public final native void gluTessVertex ( - int tobj, + long tobj, double[] coords, float[] vertex_data ) ; public final native void gluTessVertex ( - int tobj, + long tobj, double[] coords, double[] vertex_data ) ; public final native void gluTessVertex ( - int tobj, + long tobj, double[] coords, boolean[] vertex_data ) ; public final native void gluTessVertex ( - int tobj, + long tobj, double[] coords, long[] vertex_data ) ; @@ -760,7 +737,7 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluTessEndContour ( - int tobj + long tobj ) ; /** @@ -770,7 +747,7 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluTessEndPolygon ( - int tobj + long tobj ) ; /** @@ -780,7 +757,7 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluTessProperty ( - int tobj, + long tobj, int which, double value ) ; @@ -792,7 +769,7 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluTessNormal ( - int tobj, + long tobj, double x, double y, double z @@ -805,7 +782,7 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluGetTessProperty ( - int tobj, + long tobj, int which, double[] value ) ; @@ -817,7 +794,7 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluBeginPolygon ( - int tobj + long tobj ) ; /** @@ -827,7 +804,7 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluNextContour ( - int tobj, + long tobj, int type ) ; @@ -838,10 +815,10 @@ public final native void gluDeleteTess( int tobj ); * */ public final native void gluEndPolygon ( - int tobj + long tobj ) ; -/* C2J Parser Version 1.4 Beta: Java program parsed successfully. */ +/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */ } diff --git a/gl4java/GLUFuncJauJNInf.java b/gl4java/GLUFuncJauJNInf.java index b1ea21a..f509fe4 100644 --- a/gl4java/GLUFuncJauJNInf.java +++ b/gl4java/GLUFuncJauJNInf.java @@ -50,7 +50,7 @@ public String getClassVersion ( ) * @see GLUFunc#gluNewQuadric */ public native void gluQuadricCallback( - int qobj, int which, + long qobj, int which, Object methodClassInstance, String methodName, String signature @@ -71,7 +71,7 @@ public native void gluQuadricCallback( * @see GLUFunc#gluNewNurbsRenderer */ public native void gluNurbsCallback( - int nobj, int which, + long nobj, int which, Object methodClassInstance, String methodName, String signature @@ -103,7 +103,7 @@ public native void gluNurbsCallback( * @see GLUFunc#gluNewTess */ public native void gluTessCallback( - int tobj, int which, + long tobj, int which, Object methodClassInstance, String methodName, String signature, @@ -120,7 +120,7 @@ public native void gluTessCallback( * @param qobj the quadratic id, for which all callback-methods * should be de-registered */ -public native void gluDeleteQuadric( int qobj ); +public native void gluDeleteQuadric( long qobj ); /** * The Callback de-registry function. @@ -128,7 +128,7 @@ public native void gluDeleteQuadric( int qobj ); * @param nobj the nurbs id, for which all callback-methods * should be de-registered */ -public native void gluDeleteNurbsRenderer( int nobj ); +public native void gluDeleteNurbsRenderer( long nobj ); /** * The Callback de-registry function. @@ -136,10 +136,14 @@ public native void gluDeleteNurbsRenderer( int nobj ); * @param tobj the tesselation id, for which all callback-methods * should be de-registered */ -public native void gluDeleteTess( int tobj ); +public native void gluDeleteTess( long tobj ); + +public native long gluNewQuadric( ); +public native long gluNewNurbsRenderer( ); +public native long gluNewTess( ); /** - * C2J Parser Version 1.4 Beta + * C2J Parser Version 1.5 Beta * Jausoft - Sven Goethel Software Development * Reading from file: glu-proto-auto.orig.h . . . * Destination-Class: gl4java_GLUFuncJauJNInf ! @@ -390,15 +394,6 @@ public native void gluDeleteTess( int tobj ); long[] data ) ; -/** - * Original Function-Prototype : - *
     
    -   extern GLUquadricObj * gluNewQuadric ( void ) ;
    - * 
    - */ - public native int gluNewQuadric ( - ) ; - /** * Original Function-Prototype : *
     
    @@ -406,7 +401,7 @@ public native void  gluDeleteTess( int tobj );
      * 
    */ public native void gluQuadricDrawStyle ( - int quadObject, + long quadObject, int drawStyle ) ; @@ -417,7 +412,7 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluQuadricOrientation ( - int quadObject, + long quadObject, int orientation ) ; @@ -428,7 +423,7 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluQuadricNormals ( - int quadObject, + long quadObject, int normals ) ; @@ -439,7 +434,7 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluQuadricTexture ( - int quadObject, + long quadObject, boolean textureCoords ) ; @@ -450,7 +445,7 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluCylinder ( - int qobj, + long qobj, double baseRadius, double topRadius, double height, @@ -465,7 +460,7 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluSphere ( - int qobj, + long qobj, double radius, int slices, int stacks @@ -478,7 +473,7 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluDisk ( - int qobj, + long qobj, double innerRadius, double outerRadius, int slices, @@ -492,7 +487,7 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluPartialDisk ( - int qobj, + long qobj, double innerRadius, double outerRadius, int slices, @@ -501,15 +496,6 @@ public native void gluDeleteTess( int tobj ); double sweepAngle ) ; -/** - * Original Function-Prototype : - *
     
    -   extern GLUnurbsObj * gluNewNurbsRenderer ( void ) ;
    - * 
    - */ - public native int gluNewNurbsRenderer ( - ) ; - /** * Original Function-Prototype : *
     
    @@ -517,7 +503,7 @@ public native void  gluDeleteTess( int tobj );
      * 
    */ public native void gluLoadSamplingMatrices ( - int nobj, + long nobj, float[] modelMatrix, float[] projMatrix, int[] viewport @@ -530,7 +516,7 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluNurbsProperty ( - int nobj, + long nobj, int property, float value ) ; @@ -542,7 +528,7 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluGetNurbsProperty ( - int nobj, + long nobj, int property, float[] value ) ; @@ -554,7 +540,7 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluBeginCurve ( - int nobj + long nobj ) ; /** @@ -564,7 +550,7 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluEndCurve ( - int nobj + long nobj ) ; /** @@ -574,7 +560,7 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluNurbsCurve ( - int nobj, + long nobj, int nknots, float[] knot, int stride, @@ -590,7 +576,7 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluBeginSurface ( - int nobj + long nobj ) ; /** @@ -600,7 +586,7 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluEndSurface ( - int nobj + long nobj ) ; /** @@ -610,7 +596,7 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluNurbsSurface ( - int nobj, + long nobj, int sknot_count, float[] sknot, int tknot_count, @@ -630,7 +616,7 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluBeginTrim ( - int nobj + long nobj ) ; /** @@ -640,7 +626,7 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluEndTrim ( - int nobj + long nobj ) ; /** @@ -650,22 +636,13 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluPwlCurve ( - int nobj, + long nobj, int count, float[] array, int stride, int type ) ; -/** - * Original Function-Prototype : - *
     
    -   extern GLUtesselator * gluNewTess ( void ) ;
    - * 
    - */ - public native int gluNewTess ( - ) ; - /** * Original Function-Prototype : *
     
    @@ -673,31 +650,31 @@ public native void  gluDeleteTess( int tobj );
      * 
    */ public native void gluTessBeginPolygon ( - int tobj, + long tobj, byte[] polygon_data ) ; public native void gluTessBeginPolygon ( - int tobj, + long tobj, short[] polygon_data ) ; public native void gluTessBeginPolygon ( - int tobj, + long tobj, int[] polygon_data ) ; public native void gluTessBeginPolygon ( - int tobj, + long tobj, float[] polygon_data ) ; public native void gluTessBeginPolygon ( - int tobj, + long tobj, double[] polygon_data ) ; public native void gluTessBeginPolygon ( - int tobj, + long tobj, boolean[] polygon_data ) ; public native void gluTessBeginPolygon ( - int tobj, + long tobj, long[] polygon_data ) ; @@ -708,7 +685,7 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluTessBeginContour ( - int tobj + long tobj ) ; /** @@ -718,37 +695,37 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluTessVertex ( - int tobj, + long tobj, double[] coords, byte[] vertex_data ) ; public native void gluTessVertex ( - int tobj, + long tobj, double[] coords, short[] vertex_data ) ; public native void gluTessVertex ( - int tobj, + long tobj, double[] coords, int[] vertex_data ) ; public native void gluTessVertex ( - int tobj, + long tobj, double[] coords, float[] vertex_data ) ; public native void gluTessVertex ( - int tobj, + long tobj, double[] coords, double[] vertex_data ) ; public native void gluTessVertex ( - int tobj, + long tobj, double[] coords, boolean[] vertex_data ) ; public native void gluTessVertex ( - int tobj, + long tobj, double[] coords, long[] vertex_data ) ; @@ -760,7 +737,7 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluTessEndContour ( - int tobj + long tobj ) ; /** @@ -770,7 +747,7 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluTessEndPolygon ( - int tobj + long tobj ) ; /** @@ -780,7 +757,7 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluTessProperty ( - int tobj, + long tobj, int which, double value ) ; @@ -792,7 +769,7 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluTessNormal ( - int tobj, + long tobj, double x, double y, double z @@ -805,7 +782,7 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluGetTessProperty ( - int tobj, + long tobj, int which, double[] value ) ; @@ -817,7 +794,7 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluBeginPolygon ( - int tobj + long tobj ) ; /** @@ -827,7 +804,7 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluNextContour ( - int tobj, + long tobj, int type ) ; @@ -838,10 +815,10 @@ public native void gluDeleteTess( int tobj ); * */ public native void gluEndPolygon ( - int tobj + long tobj ) ; -/* C2J Parser Version 1.4 Beta: Java program parsed successfully. */ +/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */ } diff --git a/gl4java/applet/SimpleGLAnimApplet1.java b/gl4java/applet/SimpleGLAnimApplet1.java index db74690..aa2b97b 100644 --- a/gl4java/applet/SimpleGLAnimApplet1.java +++ b/gl4java/applet/SimpleGLAnimApplet1.java @@ -72,6 +72,7 @@ public class SimpleGLAnimApplet1 extends Applet { checkUseFpsSleep.setState(canvas.getUseFpsSleep()); checkUseRepaint.setState(canvas.getUseRepaint()); + canvas.addMouseListener(this); canvas.start(); } @@ -111,10 +112,55 @@ public class SimpleGLAnimApplet1 extends Applet { } + Container _cont = null; + public void mouseClicked( MouseEvent evt ) { Component comp = evt.getComponent(); + if ((evt.getModifiers() & evt.BUTTON3_MASK) != 0) + { + if(comp instanceof GLAnimCanvas) + { + GLAnimCanvas glcvs = (GLAnimCanvas)comp; + glcvs.cvsDispose(); + + Container c = glcvs.getParent(); + c.remove(glcvs); + + System.out.println("\n\nremoved: "+glcvs); + System.out.println("Global GLAnimCanvas Render-Thread Number: "+ GLAnimCanvas.getGlobalThreadNumber()); + System.out.println("GLContextNumber: "+ + GLContext.getNativeGLContextNumber()); + + glcvs.setVisible(true); + + if(c instanceof Frame) + { + Frame of = (Frame)c; + of.dispose(); + of=null; + + _cont.add(canvas); + _cont.doLayout(); + } else if(c instanceof Panel) + { + _cont=c; + Frame f = new Frame("EXTRA"); + f.add(glcvs); + f.pack(); + f.setVisible(true); + } + glcvs.start(); + + System.out.println("\nadded+started: "+glcvs); + System.out.println("Global GLAnimCanvas Render-Thread Number: "+ GLAnimCanvas.getGlobalThreadNumber()); + System.out.println("GLContextNumber: "+ + GLContext.getNativeGLContextNumber()); + } + return; + } + if( canvas!=null && comp.equals(buttonFps) ) { double fps = 0; diff --git a/gl4java/awt/GLAnimCanvas.java b/gl4java/awt/GLAnimCanvas.java index 77fd21f..6133e60 100644 --- a/gl4java/awt/GLAnimCanvas.java +++ b/gl4java/awt/GLAnimCanvas.java @@ -83,6 +83,13 @@ import java.lang.Math; * because a GL-Context can be shared by many threads, * but one thread can have just one GL-Context ! * + *

    + * + * Since GL4Java 2.5.2 and using a JVM >= 1.3 + * the multithreading support is stable ! + * + *

    + * * (comments welcome) * *

    @@ -102,7 +109,7 @@ import java.lang.Math; ReInit - ReInitialisation after stop for setSuspended(false) * * - * @see GLCanvas + * @see gl4java.awt.GLCanvas * @version 2.0, 21. April 1999 * @author Sven Goethel * @@ -116,11 +123,18 @@ public class GLAnimCanvas extends GLCanvas * * A little GUI is supported ! * - * @see GLAnimCanvas#run + * @see gl4java.awt.GLAnimCanvas#run */ protected double FramesPerSec=20; protected long mSecPerFrame=0; + protected static int globalThreadNumber=0; + + public static int getGlobalThreadNumber() + { + return globalThreadNumber; + } + /** * the delays .. */ @@ -129,16 +143,16 @@ public class GLAnimCanvas extends GLCanvas /** * The thread for referencing Thread (Animation) * - * @see GLAnimCanvas#stop - * @see GLAnimCanvas#start - * @see GLAnimCanvas#run + * @see gl4java.awt.GLAnimCanvas#stop + * @see gl4java.awt.GLAnimCanvas#start + * @see gl4java.awt.GLAnimCanvas#run */ protected Thread killme = null; /** * Instead of using suspend (JAVA2) * - * @see GLAnimCanvas#run + * @see gl4java.awt.GLAnimCanvas#run */ protected boolean threadSuspended = false; @@ -151,7 +165,7 @@ public class GLAnimCanvas extends GLCanvas * * Constructor * - * @see GLCanvas#GLCanvas + * @see gl4java.awt.GLCanvas#GLCanvas * */ public GLAnimCanvas( int width, int height, @@ -169,7 +183,7 @@ public class GLAnimCanvas extends GLCanvas * * Uses the default GLFunc and GLUFunc implementation ! * - * @see GLCanvas#GLCanvas + * @see gl4java.awt.GLCanvas#GLCanvas * */ public GLAnimCanvas( int width, int height ) @@ -206,16 +220,24 @@ public class GLAnimCanvas extends GLCanvas * *

    * + * You MUST encapsulate your OpenGL call's within: + *

    +		- glj.gljMakeCurrent()
    +			YOUR OpenGL commands here !
    +		- glj.gljFree()
    +	 * 
    + *

    + * * You should set shallWeRender here, * to signalize the animation-loop 'run' to supsend *

    * To restart the thread, just call setSuspended(false) * - * @see GLAnimCanvas#shallWeRender - * @see GLAnimCanvas#run - * @see GLAnimCanvas#setSuspended - * @see GLCanvas#sDisplay - * @see GLCanvas#paint + * @see gl4java.awt.GLAnimCanvas#shallWeRender + * @see gl4java.awt.GLAnimCanvas#run + * @see gl4java.awt.GLAnimCanvas#setSuspended + * @see gl4java.awt.GLCanvas#sDisplay + * @see gl4java.awt.GLCanvas#paint */ public void display() { @@ -229,7 +251,7 @@ public class GLAnimCanvas extends GLCanvas return; } - if( glj.gljMakeCurrent(true) == false ) + if( glj.gljMakeCurrent() == false ) { if(glj.gljClassDebug) System.out.println("GLAnimCanvas problem in gljMakeCurrent() method"); @@ -248,7 +270,7 @@ public class GLAnimCanvas extends GLCanvas * ReInit should be overwritten by you, * to enter your re-initialisation within setSuspended(false) * - * @see GLAnimCanvas#setSuspended + * @see gl4java.awt.GLAnimCanvas#setSuspended */ public void ReInit() { @@ -271,8 +293,8 @@ public class GLAnimCanvas extends GLCanvas *

    * * @param b if true, uses repaint (default), otherwise directly sDisplay - * @see GLCanvas#sDisplay - * @see GLAnimCanvas#setUseFpsSleep + * @see gl4java.awt.GLCanvas#sDisplay + * @see gl4java.awt.GLAnimCanvas#setUseFpsSleep */ public void setUseRepaint(boolean b) { @@ -288,8 +310,8 @@ public class GLAnimCanvas extends GLCanvas *

    * * @param b if true, uses Fps sleeping, else not ! - * @see GLCanvas#sDisplay - * @see GLAnimCanvas#setUseRepaint + * @see gl4java.awt.GLCanvas#sDisplay + * @see gl4java.awt.GLAnimCanvas#setUseRepaint */ public void setUseFpsSleep(boolean b) { @@ -324,10 +346,30 @@ public class GLAnimCanvas extends GLCanvas public synchronized void stop() { killme = null; - threadSuspended=false; - notify(); + threadSuspended=false; + + notifyAll(); } + /** + * You should call this before releasing/dispose this Window ! + * Also you can overwrite this class, + * to dispose your own elements, e.g. a Frame etc. - + * but be shure that you call + * cvsDispose implementation call this one ! + * + * This function calls gljDestroy of GLContext ! + * + * @see gl4java.GLContext#gljDestroy + * @see gl4java.awt.GLCanvas#cvsDispose + * @see gl4java.awt.GLCanvas#doCleanup + */ + public void cvsDispose() + { + stop(); + super.cvsDispose(); + } + /** * Should be set in display, * whether to render or not while the animation loop @@ -335,10 +377,11 @@ public class GLAnimCanvas extends GLCanvas * If shallWeRender is false, * this thread will suspend ! * - * @see GLAnimCanvas#display - * @see GLAnimCanvas#run + * @see gl4java.awt.GLAnimCanvas#display + * @see gl4java.awt.GLAnimCanvas#run */ protected boolean shallWeRender = true; + protected boolean isRunning = false; private long _fDelay = 0; private long _fDelay_Frames = 10; @@ -349,14 +392,18 @@ public class GLAnimCanvas extends GLCanvas * The running loop for animations * which initiates the call of display * - * @see GLAnimCanvas#shallWeRender - * @see GLAnimCanvas#display - * @see GLAnimCanvas#diplay + * @see gl4java.awt.GLAnimCanvas#shallWeRender + * @see gl4java.awt.GLAnimCanvas#display */ public void run() { Thread thisThread = Thread.currentThread(); + isRunning = true; + + synchronized (this) { + globalThreadNumber++; + } while (killme==thisThread) { @@ -370,8 +417,7 @@ public class GLAnimCanvas extends GLCanvas else sDisplay(); } else { - // lets sleep ... - synchronized (this) { + synchronized (this) { threadSuspended=true; } } @@ -399,7 +445,9 @@ public class GLAnimCanvas extends GLCanvas } Thread.currentThread().sleep(dFpsMilli, 0 ); - } + } else { + Thread.yield(); + } if (threadSuspended) { stopFpsCounter(); @@ -411,6 +459,15 @@ public class GLAnimCanvas extends GLCanvas } catch (InterruptedException e) {} } + + if(glj!=null) + glj.gljFree(); // just to be sure .. + + synchronized (this) { + globalThreadNumber--; + } + + isRunning = false; } /** @@ -422,8 +479,8 @@ public class GLAnimCanvas extends GLCanvas * @param suspend if true the thread will be suspended, * if false, the thread will be (re)started * - * @see GLAnimCanvas#isAlive - * @see GLAnimCanvas#start + * @see gl4java.awt.GLAnimCanvas#isAlive + * @see gl4java.awt.GLAnimCanvas#start */ public void setSuspended(boolean suspend) { @@ -442,8 +499,8 @@ public class GLAnimCanvas extends GLCanvas * @param reInit if true the ReInit will be called additionally, * where the user can set additional initialisations * - * @see GLAnimCanvas#isAlive - * @see GLAnimCanvas#start + * @see gl4java.awt.GLAnimCanvas#isAlive + * @see gl4java.awt.GLAnimCanvas#start */ public synchronized void setSuspended(boolean suspend, boolean reInit) { @@ -461,17 +518,17 @@ public class GLAnimCanvas extends GLCanvas ReInit(); threadSuspended=false; - notify(); + notifyAll(); } } /** * is the thread alive, means is started and not died ? * - * @see GLAnimCanvas#run - * @see GLAnimCanvas#setSuspended - * @see GLAnimCanvas#start - * @see GLAnimCanvas#stop + * @see gl4java.awt.GLAnimCanvas#run + * @see gl4java.awt.GLAnimCanvas#setSuspended + * @see gl4java.awt.GLAnimCanvas#start + * @see gl4java.awt.GLAnimCanvas#stop */ public boolean isAlive() { @@ -483,10 +540,10 @@ public class GLAnimCanvas extends GLCanvas * is the thread suspended, means is started but waiting, * or not alive (ok :-| - but it is practical) * - * @see GLAnimCanvas#run - * @see GLAnimCanvas#setSuspended - * @see GLAnimCanvas#start - * @see GLAnimCanvas#stop + * @see gl4java.awt.GLAnimCanvas#run + * @see gl4java.awt.GLAnimCanvas#setSuspended + * @see gl4java.awt.GLAnimCanvas#start + * @see gl4java.awt.GLAnimCanvas#stop */ public boolean isSuspended() { @@ -507,14 +564,14 @@ public class GLAnimCanvas extends GLCanvas * this function is called automatically by * start and setSuspended * - * @see GLAnimCanvas#start - * @see GLAnimCanvas#setSuspended - * @see GLAnimCanvas#resetFpsCounter - * @see GLAnimCanvas#stopFpsCounter - * @see GLAnimCanvas#getFps - * @see GLAnimCanvas#getFpsDuration - * @see GLAnimCanvas#getFpsFrames - * @see GLAnimCanvas#setVerboseFps + * @see gl4java.awt.GLAnimCanvas#start + * @see gl4java.awt.GLAnimCanvas#setSuspended + * @see gl4java.awt.GLAnimCanvas#resetFpsCounter + * @see gl4java.awt.GLAnimCanvas#stopFpsCounter + * @see gl4java.awt.GLAnimCanvas#getFps + * @see gl4java.awt.GLAnimCanvas#getFpsDuration + * @see gl4java.awt.GLAnimCanvas#getFpsFrames + * @see gl4java.awt.GLAnimCanvas#setVerboseFps */ public void resetFpsCounter() { @@ -535,14 +592,14 @@ public class GLAnimCanvas extends GLCanvas * All data's are print out on System.out * if verboseFps is set ! * - * @see GLAnimCanvas#run - * @see GLAnimCanvas#shallWeRender - * @see GLAnimCanvas#resetFpsCounter - * @see GLAnimCanvas#stopFpsCounter - * @see GLAnimCanvas#getFps - * @see GLAnimCanvas#getFpsDuration - * @see GLAnimCanvas#getFpsFrames - * @see GLAnimCanvas#setVerboseFps + * @see gl4java.awt.GLAnimCanvas#run + * @see gl4java.awt.GLAnimCanvas#shallWeRender + * @see gl4java.awt.GLAnimCanvas#resetFpsCounter + * @see gl4java.awt.GLAnimCanvas#stopFpsCounter + * @see gl4java.awt.GLAnimCanvas#getFps + * @see gl4java.awt.GLAnimCanvas#getFpsDuration + * @see gl4java.awt.GLAnimCanvas#getFpsFrames + * @see gl4java.awt.GLAnimCanvas#setVerboseFps */ public void stopFpsCounter() { @@ -571,14 +628,14 @@ public class GLAnimCanvas extends GLCanvas *

    * verboseFps is set to true by default ! * - * @see GLAnimCanvas#run - * @see GLAnimCanvas#shallWeRender - * @see GLAnimCanvas#resetFpsCounter - * @see GLAnimCanvas#stopFpsCounter - * @see GLAnimCanvas#getFps - * @see GLAnimCanvas#getFpsDuration - * @see GLAnimCanvas#getFpsFrames - * @see GLAnimCanvas#setVerboseFps + * @see gl4java.awt.GLAnimCanvas#run + * @see gl4java.awt.GLAnimCanvas#shallWeRender + * @see gl4java.awt.GLAnimCanvas#resetFpsCounter + * @see gl4java.awt.GLAnimCanvas#stopFpsCounter + * @see gl4java.awt.GLAnimCanvas#getFps + * @see gl4java.awt.GLAnimCanvas#getFpsDuration + * @see gl4java.awt.GLAnimCanvas#getFpsFrames + * @see gl4java.awt.GLAnimCanvas#setVerboseFps */ public void setVerboseFps(boolean v) { @@ -590,12 +647,12 @@ public class GLAnimCanvas extends GLCanvas *

    * this data is avaiable after calling stopFpsCounter * - * @see GLAnimCanvas#resetFpsCounter - * @see GLAnimCanvas#stopFpsCounter - * @see GLAnimCanvas#getFps - * @see GLAnimCanvas#getFpsDuration - * @see GLAnimCanvas#getFpsFrames - * @see GLAnimCanvas#setVerboseFps + * @see gl4java.awt.GLAnimCanvas#resetFpsCounter + * @see gl4java.awt.GLAnimCanvas#stopFpsCounter + * @see gl4java.awt.GLAnimCanvas#getFps + * @see gl4java.awt.GLAnimCanvas#getFpsDuration + * @see gl4java.awt.GLAnimCanvas#getFpsFrames + * @see gl4java.awt.GLAnimCanvas#setVerboseFps */ public double getFps() { @@ -607,12 +664,12 @@ public class GLAnimCanvas extends GLCanvas *

    * this data is avaiable after calling stopFpsCounter * - * @see GLAnimCanvas#resetFpsCounter - * @see GLAnimCanvas#stopFpsCounter - * @see GLAnimCanvas#getFps - * @see GLAnimCanvas#getFpsDuration - * @see GLAnimCanvas#getFpsFrames - * @see GLAnimCanvas#setVerboseFps + * @see gl4java.awt.GLAnimCanvas#resetFpsCounter + * @see gl4java.awt.GLAnimCanvas#stopFpsCounter + * @see gl4java.awt.GLAnimCanvas#getFps + * @see gl4java.awt.GLAnimCanvas#getFpsDuration + * @see gl4java.awt.GLAnimCanvas#getFpsFrames + * @see gl4java.awt.GLAnimCanvas#setVerboseFps */ public long getFpsDuration() { @@ -624,12 +681,12 @@ public class GLAnimCanvas extends GLCanvas *

    * this data is avaiable after calling stopFpsCounter * - * @see GLAnimCanvas#resetFpsCounter - * @see GLAnimCanvas#stopFpsCounter - * @see GLAnimCanvas#getFps - * @see GLAnimCanvas#getFpsDuration - * @see GLAnimCanvas#getFpsFrames - * @see GLAnimCanvas#setVerboseFps + * @see gl4java.awt.GLAnimCanvas#resetFpsCounter + * @see gl4java.awt.GLAnimCanvas#stopFpsCounter + * @see gl4java.awt.GLAnimCanvas#getFps + * @see gl4java.awt.GLAnimCanvas#getFpsDuration + * @see gl4java.awt.GLAnimCanvas#getFpsFrames + * @see gl4java.awt.GLAnimCanvas#setVerboseFps */ public long getFpsFrames() { @@ -651,7 +708,7 @@ public class GLAnimCanvas extends GLCanvas /** * Just set the FramePerSecounds for Animation * - * @see GLAnimCanvas#getMaxFps + * @see gl4java.awt.GLAnimCanvas#getMaxFps */ public void setAnimateFps(double fps) { @@ -675,7 +732,7 @@ public class GLAnimCanvas extends GLCanvas * this value is avaiable after the thread is started * and the first frames are rendered ! * - * @see GLAnimCanvas#setAnimateFps + * @see gl4java.awt.GLAnimCanvas#setAnimateFps */ public double getMaxFps() { diff --git a/gl4java/awt/GLCanvas.java b/gl4java/awt/GLCanvas.java index 4a537f9..78775b6 100644 --- a/gl4java/awt/GLCanvas.java +++ b/gl4java/awt/GLCanvas.java @@ -62,7 +62,7 @@ import java.awt.event.*; * *

    * - * @see GLAnimCanvas + * @see gl4java.awt.GLAnimCanvas * @version 2.0, 21. April 1999 * @author Sven Goethel * @@ -87,8 +87,8 @@ public class GLCanvas extends Canvas * This value is updated after a GLContext is created with the * original updated value of GLContext ! * - * @see GLCanvas#preInit - * @see GLCanvas#paint + * @see gl4java.awt.GLCanvas#preInit + * @see gl4java.awt.GLCanvas#paint */ protected boolean doubleBuffer = true; @@ -97,8 +97,8 @@ public class GLCanvas extends Canvas * This value is updated after a GLContext is created with the * original updated value of GLContext ! * - * @see GLCanvas#preInit - * @see GLCanvas#paint + * @see gl4java.awt.GLCanvas#preInit + * @see gl4java.awt.GLCanvas#paint */ protected int stencilBits = 0; @@ -114,8 +114,8 @@ public class GLCanvas extends Canvas * The output value, after the constructor returns, * it is the summary of all accumulation bits of all components ! * - * @see GLCanvas#preInit - * @see GLCanvas#paint + * @see gl4java.awt.GLCanvas#preInit + * @see gl4java.awt.GLCanvas#paint */ protected int accumSize = 0; @@ -124,8 +124,8 @@ public class GLCanvas extends Canvas * This value is updated after a GLContext is created with the * original updated value of GLContext ! * - * @see GLCanvas#preInit - * @see GLCanvas#paint + * @see gl4java.awt.GLCanvas#preInit + * @see gl4java.awt.GLCanvas#paint */ protected boolean stereoView = false; @@ -134,8 +134,8 @@ public class GLCanvas extends Canvas * This value is updated after a GLContext is created with the * original updated value of GLContext ! * - * @see GLCanvas#preInit - * @see GLCanvas#paint + * @see gl4java.awt.GLCanvas#preInit + * @see gl4java.awt.GLCanvas#paint */ protected boolean rgba = true; @@ -144,16 +144,16 @@ public class GLCanvas extends Canvas * This value is updated after a GLContext is created with the * original updated value of GLContext ! * - * @see GLCanvas#preInit - * @see GLCanvas#paint + * @see gl4java.awt.GLCanvas#preInit + * @see gl4java.awt.GLCanvas#paint */ protected boolean createOwnWindow = false; /** - * The context with witch display lists and textures will be shared. + * The context with wich display lists and textures will be shared. * - * @see GLCanvas#preInit - * @see GLCanvas#paint + * @see gl4java.awt.GLCanvas#preInit + * @see gl4java.awt.GLCanvas#paint */ protected GLContext sharedGLContext; @@ -240,7 +240,7 @@ public class GLCanvas extends Canvas * @param g the Graphics Context * @return void * - * @see GLCanvas#paint + * @see gl4java.awt.GLCanvas#paint */ public void update(Graphics g) { @@ -260,7 +260,7 @@ public class GLCanvas extends Canvas * * @return void * - * @see GLCanvas#paint + * @see gl4java.awt.GLCanvas#paint */ public final Window getTopLevelWindow() { return topLevelWindow; } @@ -283,11 +283,11 @@ public class GLCanvas extends Canvas * in your derivation. * * @see gl4java.GLContext#GLContext - * @see GLCanvas#cvsIsInit - * @see GLCanvas#sDisplay - * @see GLCanvas#display - * @see GLCanvas#preInit - * @see GLCanvas#init + * @see gl4java.awt.GLCanvas#cvsIsInit + * @see gl4java.awt.GLCanvas#sDisplay + * @see gl4java.awt.GLCanvas#display + * @see gl4java.awt.GLCanvas#preInit + * @see gl4java.awt.GLCanvas#init */ public synchronized final void paint( Graphics g ) { @@ -342,10 +342,6 @@ public class GLCanvas extends Canvas if(glj!=null && glj.gljIsInit()) cvsInitialized=true; } - /* - if( mustResize ) size = getSize(); - g.setClip(0, 0, size.width, size.height ) ; - */ sDisplay(); } @@ -358,12 +354,12 @@ public class GLCanvas extends Canvas * * @return void * - * @see GLCanvas#paint - * @see GLCanvas#doubleBuffer - * @see GLCanvas#stereoView - * @see GLCanvas#rgba - * @see GLCanvas#stencilBits - * @see GLCanvas#accumSize + * @see gl4java.awt.GLCanvas#paint + * @see gl4java.awt.GLCanvas#doubleBuffer + * @see gl4java.awt.GLCanvas#stereoView + * @see gl4java.awt.GLCanvas#rgba + * @see gl4java.awt.GLCanvas#stencilBits + * @see gl4java.awt.GLCanvas#accumSize */ public void preInit() { @@ -378,7 +374,7 @@ public class GLCanvas extends Canvas * * @return void * - * @see GLCanvas#paint + * @see gl4java.awt.GLCanvas#paint */ public void init() { @@ -393,7 +389,7 @@ public class GLCanvas extends Canvas * * @return void * - * @see GLCanvas#cvsDispose + * @see gl4java.awt.GLCanvas#cvsDispose */ public void doCleanup() { @@ -406,8 +402,8 @@ public class GLCanvas extends Canvas * * @return boolean * - * @see GLCanvas#paint - * @see GLCanvas#init + * @see gl4java.awt.GLCanvas#paint + * @see gl4java.awt.GLCanvas#init */ public boolean cvsIsInit() { @@ -433,8 +429,8 @@ public class GLCanvas extends Canvas * * @return void * - * @see GLCanvas#paint - * @see GLCanvas#display + * @see gl4java.awt.GLCanvas#paint + * @see gl4java.awt.GLCanvas#display */ public synchronized final void sDisplay() { @@ -447,7 +443,7 @@ public class GLCanvas extends Canvas if( mustResize ) { - if( (ok = glj.gljMakeCurrent()) == true ) + if( glj.gljMakeCurrent() == true ) { size = getSize(); glj.gljResize( size.width, size.height ) ; @@ -455,6 +451,7 @@ public class GLCanvas extends Canvas mustResize = false; invalidate(); repaint(100); + glj.gljFree(); } } if(ok) @@ -471,6 +468,15 @@ public class GLCanvas extends Canvas * (and sDisplay is called by paint !). * The derived-class (Your Subclass) will redefine this, to draw it's own... * + *

    + * + * You MUST encapsulate your OpenGL call's within: + *

    +    	- glj.gljMakeCurrent()
    +		YOUR OpenGL commands here !
    +    	- glj.gljFree()
    +     * 
    + * * BE SURE, if you want to call 'display' by yourself * (e.g. in the run method for animation) * YOU HAVE TO CALL sDisplay ! @@ -480,8 +486,10 @@ public class GLCanvas extends Canvas * * @return void * - * @see GLCanvas#sDisplay - * @see GLCanvas#paint + * @see gl4java.awt.GLCanvas#sDisplay + * @see gl4java.awt.GLCanvas#paint + * @see gl4java.GLContext#gljMakeCurrent + * @see gl4java.GLContext#gljSwap */ public void display() { @@ -508,8 +516,8 @@ public class GLCanvas extends Canvas * @param height the new height * @return void * - * @see GLCanvas#paint - * @see GLCanvas#sDisplay + * @see gl4java.awt.GLCanvas#paint + * @see gl4java.awt.GLCanvas#sDisplay */ public void reshape( int width, int height ) { @@ -533,8 +541,8 @@ public class GLCanvas extends Canvas * @param e the element, which is resized * @return void * - * @see GLCanvas#paint - * @see GLCanvas#reshape + * @see gl4java.awt.GLCanvas#paint + * @see gl4java.awt.GLCanvas#reshape */ public void componentResized(ComponentEvent e) { @@ -644,7 +652,7 @@ public class GLCanvas extends Canvas * This function calls gljDestroy of GLContext ! * * @see gl4java.GLContext#gljDestroy - * @see GLCanvas#doCleanup + * @see gl4java.awt.GLCanvas#doCleanup */ public void cvsDispose() { @@ -664,11 +672,13 @@ public class GLCanvas extends Canvas context, so it all works out fine. */ try { - glj.gljFree(); - doCleanup(); - //locks and free's GLContext glj.setEnabled(false); + + setVisible(false); + doCleanup(); + glj.gljDestroy(); + glj = null; needCvsDispose = false; } catch (Exception ex) diff --git a/gl4java/jau/awt/WinHandleAccess.java b/gl4java/jau/awt/WinHandleAccess.java index b6e8c87..1a491ce 100644 --- a/gl4java/jau/awt/WinHandleAccess.java +++ b/gl4java/jau/awt/WinHandleAccess.java @@ -14,8 +14,8 @@ import java.awt.Graphics; */ public interface WinHandleAccess { - public abstract int getWinHandle(Component component, Graphics g); + public abstract long getWinHandle(Component component, Graphics g); - public abstract int getWinDepth(Component component, Graphics g); + public abstract int getWinDepth(Component component, Graphics g); } diff --git a/gl4java/jau/awt/macintosh/MacHandleAccess.java b/gl4java/jau/awt/macintosh/MacHandleAccess.java index db1c3ef..853662d 100644 --- a/gl4java/jau/awt/macintosh/MacHandleAccess.java +++ b/gl4java/jau/awt/macintosh/MacHandleAccess.java @@ -29,8 +29,8 @@ public class MacHandleAccess implements gl4java.jau.awt.WinHandleAccess protected DrawingSurface ds; protected DrawingSurfaceInfo dsi; protected MacDrawingSurface mds; - protected int window, - depth; + protected long window; + protected int depth; protected void achieveData(java.awt.Component c, java.awt.Graphics g) @@ -55,7 +55,7 @@ public class MacHandleAccess implements gl4java.jau.awt.WinHandleAccess { dsi.lock(); - window = mds.getPort(); + window = (long) mds.getPort(); depth = c.getColorModel().getPixelSize(); dsi.unlock(); @@ -71,7 +71,7 @@ public class MacHandleAccess implements gl4java.jau.awt.WinHandleAccess * * gets some structure for windows, and drawable on Mac */ - public int getWinHandle(java.awt.Component c, java.awt.Graphics g) + public long getWinHandle(java.awt.Component c, java.awt.Graphics g) { achieveData(c, g); return window; diff --git a/gl4java/jau/awt/motif/X11HandleAccess.java b/gl4java/jau/awt/motif/X11HandleAccess.java index f07e111..8d6b27e 100644 --- a/gl4java/jau/awt/motif/X11HandleAccess.java +++ b/gl4java/jau/awt/motif/X11HandleAccess.java @@ -27,7 +27,8 @@ public class X11HandleAccess { protected DrawingSurfaceInfo dsi; protected X11DrawingSurface wds; - protected int window, depth; + protected long window; + protected int depth; protected void achieveData(java.awt.Component c, java.awt.Graphics g) { @@ -46,7 +47,7 @@ public class X11HandleAccess if(wds!=null) { dsi.lock(); - window = wds.getDrawable(); + window = (long) wds.getDrawable(); depth = wds.getDepth(); /* @@ -67,7 +68,7 @@ public class X11HandleAccess * * gets some structure for windows, and drawable on X11 */ - public int getWinHandle(java.awt.Component c, java.awt.Graphics g) + public long getWinHandle(java.awt.Component c, java.awt.Graphics g) { achieveData(c, g); return window; diff --git a/gl4java/jau/awt/windows/MSWin32HandleAccess.java b/gl4java/jau/awt/windows/MSWin32HandleAccess.java index 1dd4d93..76809f3 100644 --- a/gl4java/jau/awt/windows/MSWin32HandleAccess.java +++ b/gl4java/jau/awt/windows/MSWin32HandleAccess.java @@ -24,7 +24,8 @@ import com.ms.awt.GraphicsX; public class MSWin32HandleAccess implements gl4java.jau.awt.WinHandleAccess { - protected int window, depth; + protected long window; + protected int depth; /** * @dll.import("USER32",auto) @@ -33,7 +34,7 @@ public class MSWin32HandleAccess protected void achieveData(java.awt.Component c, java.awt.Graphics g) { - window = WindowFromDC(((GraphicsX)g).gdc.pGetDC()); + window = (long) WindowFromDC(((GraphicsX)g).gdc.pGetDC()); depth = c.getColorModel().getPixelSize(); } @@ -41,7 +42,7 @@ public class MSWin32HandleAccess * * get the window handle */ - public int getWinHandle(java.awt.Component c, java.awt.Graphics g) + public long getWinHandle(java.awt.Component c, java.awt.Graphics g) { achieveData(c, g); return window; diff --git a/gl4java/jau/awt/windows/Win32HandleAccess.java b/gl4java/jau/awt/windows/Win32HandleAccess.java index 38b5c93..d4a698f 100644 --- a/gl4java/jau/awt/windows/Win32HandleAccess.java +++ b/gl4java/jau/awt/windows/Win32HandleAccess.java @@ -28,7 +28,8 @@ public class Win32HandleAccess protected DrawingSurfaceInfo dsi; protected Win32DrawingSurface wds; - protected int window, depth; + protected long window; + protected int depth; protected void achieveData(java.awt.Component c, java.awt.Graphics g) { @@ -47,7 +48,7 @@ public class Win32HandleAccess if(wds!=null) { dsi.lock(); - window = wds.getHDC(); + window = (long) wds.getHDC(); depth = wds.getDepth(); /* System.out.println("wds ="+wds); @@ -65,7 +66,7 @@ public class Win32HandleAccess * * gets some structure for windows, and drawable on Win32 */ - public int getWinHandle(java.awt.Component c, java.awt.Graphics g) + public long getWinHandle(java.awt.Component c, java.awt.Graphics g) { achieveData(c, g); return window; diff --git a/gl4java/swing/GLAnimJPanel.java b/gl4java/swing/GLAnimJPanel.java index e9bdbdf..a7af76a 100644 --- a/gl4java/swing/GLAnimJPanel.java +++ b/gl4java/swing/GLAnimJPanel.java @@ -102,7 +102,7 @@ import java.lang.Math; ReInit - ReInitialisation after stop for setSuspended(false) * * - * @see GLCanvas + * @see gl4java.awt.GLCanvas * @version 2.0, 21. April 1999 * @author Sven Goethel * @@ -116,7 +116,7 @@ public class GLAnimJPanel extends GLJPanel * * A little GUI is supported ! * - * @see GLAnimJPanel#run + * @see gl4java.swing.GLAnimJPanel#run */ protected double FramesPerSec=20; protected long mSecPerFrame=0; @@ -129,16 +129,16 @@ public class GLAnimJPanel extends GLJPanel /** * The thread for referencing Thread (Animation) * - * @see GLAnimJPanel#stop - * @see GLAnimJPanel#start - * @see GLAnimJPanel#run + * @see gl4java.swing.GLAnimJPanel#stop + * @see gl4java.swing.GLAnimJPanel#start + * @see gl4java.swing.GLAnimJPanel#run */ protected Thread killme = null; /** * Instead of using suspend (JAVA2) * - * @see GLAnimJPanel#run + * @see gl4java.swing.GLAnimJPanel#run */ protected boolean threadSuspended = false; @@ -222,7 +222,7 @@ public class GLAnimJPanel extends GLJPanel * * Uses the default GLFunc and GLUFunc implementation ! * - * @see GLCanvas#GLCanvas + * @see gl4java.awt.GLCanvas#GLCanvas * */ public GLAnimJPanel( ) @@ -264,11 +264,11 @@ public class GLAnimJPanel extends GLJPanel *

    * To restart the thread, just call setSuspended(false) * - * @see GLAnimJPanel#shallWeRender - * @see GLAnimJPanel#run - * @see GLAnimJPanel#setSuspended - * @see GLCanvas#sDisplay - * @see GLCanvas#paint + * @see gl4java.swing.GLAnimJPanel#shallWeRender + * @see gl4java.swing.GLAnimJPanel#run + * @see gl4java.swing.GLAnimJPanel#setSuspended + * @see gl4java.awt.GLAnimCanvas#sDisplay + * @see gl4java.awt.GLAnimCanvas#paint */ public void display() { @@ -282,7 +282,7 @@ public class GLAnimJPanel extends GLJPanel * ReInit should be overwritten by you, * to enter your re-initialisation within setSuspended(false) * - * @see GLAnimJPanel#setSuspended + * @see gl4java.swing.GLAnimJPanel#setSuspended */ public void ReInit() { @@ -305,8 +305,8 @@ public class GLAnimJPanel extends GLJPanel *

    * * @param b if true, uses repaint (default), otherwise directly sDisplay - * @see GLCanvas#sDisplay - * @see GLAnimJPanel#setUseFpsSleep + * @see gl4java.awt.GLAnimCanvas#sDisplay + * @see gl4java.swing.GLAnimJPanel#setUseFpsSleep */ public void setUseRepaint(boolean b) { @@ -322,8 +322,8 @@ public class GLAnimJPanel extends GLJPanel *

    * * @param b if true, uses Fps sleeping, else not ! - * @see GLCanvas#sDisplay - * @see GLAnimJPanel#setUseRepaint + * @see gl4java.awt.GLAnimCanvas#sDisplay + * @see gl4java.swing.GLAnimJPanel#setUseRepaint */ public void setUseFpsSleep(boolean b) { @@ -369,8 +369,8 @@ public class GLAnimJPanel extends GLJPanel * If shallWeRender is false, * this thread will suspend ! * - * @see GLAnimJPanel#display - * @see GLAnimJPanel#run + * @see gl4java.swing.GLAnimJPanel#display + * @see gl4java.swing.GLAnimJPanel#run */ protected boolean shallWeRender = true; @@ -383,9 +383,8 @@ public class GLAnimJPanel extends GLJPanel * The running loop for animations * which initiates the call of display * - * @see GLAnimJPanel#shallWeRender - * @see GLAnimJPanel#display - * @see GLAnimJPanel#diplay + * @see gl4java.swing.GLAnimJPanel#shallWeRender + * @see gl4java.swing.GLAnimJPanel#display */ public void run() { @@ -456,8 +455,8 @@ public class GLAnimJPanel extends GLJPanel * @param suspend if true the thread will be suspended, * if false, the thread will be (re)started * - * @see GLAnimJPanel#isAlive - * @see GLAnimJPanel#start + * @see gl4java.swing.GLAnimJPanel#isAlive + * @see gl4java.swing.GLAnimJPanel#start */ public void setSuspended(boolean suspend) { @@ -476,8 +475,8 @@ public class GLAnimJPanel extends GLJPanel * @param reInit if true the ReInit will be called additionally, * where the user can set additional initialisations * - * @see GLAnimJPanel#isAlive - * @see GLAnimJPanel#start + * @see gl4java.swing.GLAnimJPanel#isAlive + * @see gl4java.swing.GLAnimJPanel#start */ public synchronized void setSuspended(boolean suspend, boolean reInit) { @@ -502,10 +501,10 @@ public class GLAnimJPanel extends GLJPanel /** * is the thread alive, means is started and not died ? * - * @see GLAnimJPanel#run - * @see GLAnimJPanel#setSuspended - * @see GLAnimJPanel#start - * @see GLAnimJPanel#stop + * @see gl4java.swing.GLAnimJPanel#run + * @see gl4java.swing.GLAnimJPanel#setSuspended + * @see gl4java.swing.GLAnimJPanel#start + * @see gl4java.swing.GLAnimJPanel#stop */ public boolean isAlive() { @@ -517,10 +516,10 @@ public class GLAnimJPanel extends GLJPanel * is the thread suspended, means is started but waiting, * or not alive (ok :-| - but it is practical) * - * @see GLAnimJPanel#run - * @see GLAnimJPanel#setSuspended - * @see GLAnimJPanel#start - * @see GLAnimJPanel#stop + * @see gl4java.swing.GLAnimJPanel#run + * @see gl4java.swing.GLAnimJPanel#setSuspended + * @see gl4java.swing.GLAnimJPanel#start + * @see gl4java.swing.GLAnimJPanel#stop */ public boolean isSuspended() { @@ -541,14 +540,14 @@ public class GLAnimJPanel extends GLJPanel * this function is called automatically by * start and setSuspended * - * @see GLAnimJPanel#start - * @see GLAnimJPanel#setSuspended - * @see GLAnimJPanel#resetFpsCounter - * @see GLAnimJPanel#stopFpsCounter - * @see GLAnimJPanel#getFps - * @see GLAnimJPanel#getFpsDuration - * @see GLAnimJPanel#getFpsFrames - * @see GLAnimJPanel#setVerboseFps + * @see gl4java.swing.GLAnimJPanel#start + * @see gl4java.swing.GLAnimJPanel#setSuspended + * @see gl4java.swing.GLAnimJPanel#resetFpsCounter + * @see gl4java.swing.GLAnimJPanel#stopFpsCounter + * @see gl4java.swing.GLAnimJPanel#getFps + * @see gl4java.swing.GLAnimJPanel#getFpsDuration + * @see gl4java.swing.GLAnimJPanel#getFpsFrames + * @see gl4java.swing.GLAnimJPanel#setVerboseFps */ public void resetFpsCounter() { @@ -569,14 +568,14 @@ public class GLAnimJPanel extends GLJPanel * All data's are print out on System.out * if verboseFps is set ! * - * @see GLAnimJPanel#run - * @see GLAnimJPanel#shallWeRender - * @see GLAnimJPanel#resetFpsCounter - * @see GLAnimJPanel#stopFpsCounter - * @see GLAnimJPanel#getFps - * @see GLAnimJPanel#getFpsDuration - * @see GLAnimJPanel#getFpsFrames - * @see GLAnimJPanel#setVerboseFps + * @see gl4java.swing.GLAnimJPanel#run + * @see gl4java.swing.GLAnimJPanel#shallWeRender + * @see gl4java.swing.GLAnimJPanel#resetFpsCounter + * @see gl4java.swing.GLAnimJPanel#stopFpsCounter + * @see gl4java.swing.GLAnimJPanel#getFps + * @see gl4java.swing.GLAnimJPanel#getFpsDuration + * @see gl4java.swing.GLAnimJPanel#getFpsFrames + * @see gl4java.swing.GLAnimJPanel#setVerboseFps */ public void stopFpsCounter() { @@ -605,14 +604,14 @@ public class GLAnimJPanel extends GLJPanel *

    * verboseFps is set to true by default ! * - * @see GLAnimJPanel#run - * @see GLAnimJPanel#shallWeRender - * @see GLAnimJPanel#resetFpsCounter - * @see GLAnimJPanel#stopFpsCounter - * @see GLAnimJPanel#getFps - * @see GLAnimJPanel#getFpsDuration - * @see GLAnimJPanel#getFpsFrames - * @see GLAnimJPanel#setVerboseFps + * @see gl4java.swing.GLAnimJPanel#run + * @see gl4java.swing.GLAnimJPanel#shallWeRender + * @see gl4java.swing.GLAnimJPanel#resetFpsCounter + * @see gl4java.swing.GLAnimJPanel#stopFpsCounter + * @see gl4java.swing.GLAnimJPanel#getFps + * @see gl4java.swing.GLAnimJPanel#getFpsDuration + * @see gl4java.swing.GLAnimJPanel#getFpsFrames + * @see gl4java.swing.GLAnimJPanel#setVerboseFps */ public void setVerboseFps(boolean v) { @@ -624,12 +623,12 @@ public class GLAnimJPanel extends GLJPanel *

    * this data is avaiable after calling stopFpsCounter * - * @see GLAnimJPanel#resetFpsCounter - * @see GLAnimJPanel#stopFpsCounter - * @see GLAnimJPanel#getFps - * @see GLAnimJPanel#getFpsDuration - * @see GLAnimJPanel#getFpsFrames - * @see GLAnimJPanel#setVerboseFps + * @see gl4java.swing.GLAnimJPanel#resetFpsCounter + * @see gl4java.swing.GLAnimJPanel#stopFpsCounter + * @see gl4java.swing.GLAnimJPanel#getFps + * @see gl4java.swing.GLAnimJPanel#getFpsDuration + * @see gl4java.swing.GLAnimJPanel#getFpsFrames + * @see gl4java.swing.GLAnimJPanel#setVerboseFps */ public double getFps() { @@ -641,12 +640,12 @@ public class GLAnimJPanel extends GLJPanel *

    * this data is avaiable after calling stopFpsCounter * - * @see GLAnimJPanel#resetFpsCounter - * @see GLAnimJPanel#stopFpsCounter - * @see GLAnimJPanel#getFps - * @see GLAnimJPanel#getFpsDuration - * @see GLAnimJPanel#getFpsFrames - * @see GLAnimJPanel#setVerboseFps + * @see gl4java.swing.GLAnimJPanel#resetFpsCounter + * @see gl4java.swing.GLAnimJPanel#stopFpsCounter + * @see gl4java.swing.GLAnimJPanel#getFps + * @see gl4java.swing.GLAnimJPanel#getFpsDuration + * @see gl4java.swing.GLAnimJPanel#getFpsFrames + * @see gl4java.swing.GLAnimJPanel#setVerboseFps */ public long getFpsDuration() { @@ -658,12 +657,12 @@ public class GLAnimJPanel extends GLJPanel *

    * this data is avaiable after calling stopFpsCounter * - * @see GLAnimJPanel#resetFpsCounter - * @see GLAnimJPanel#stopFpsCounter - * @see GLAnimJPanel#getFps - * @see GLAnimJPanel#getFpsDuration - * @see GLAnimJPanel#getFpsFrames - * @see GLAnimJPanel#setVerboseFps + * @see gl4java.swing.GLAnimJPanel#resetFpsCounter + * @see gl4java.swing.GLAnimJPanel#stopFpsCounter + * @see gl4java.swing.GLAnimJPanel#getFps + * @see gl4java.swing.GLAnimJPanel#getFpsDuration + * @see gl4java.swing.GLAnimJPanel#getFpsFrames + * @see gl4java.swing.GLAnimJPanel#setVerboseFps */ public long getFpsFrames() { @@ -685,7 +684,7 @@ public class GLAnimJPanel extends GLJPanel /** * Just set the FramePerSecounds for Animation * - * @see GLAnimJPanel#getMaxFps + * @see gl4java.swing.GLAnimJPanel#getMaxFps */ public void setAnimateFps(double fps) { @@ -709,7 +708,7 @@ public class GLAnimJPanel extends GLJPanel * this value is avaiable after the thread is started * and the first frames are rendered ! * - * @see GLAnimJPanel#setAnimateFps + * @see gl4java.swing.GLAnimJPanel#setAnimateFps */ public double getMaxFps() { diff --git a/gl4java/swing/GLJPanel.java b/gl4java/swing/GLJPanel.java index 21beb39..1e23110 100644 --- a/gl4java/swing/GLJPanel.java +++ b/gl4java/swing/GLJPanel.java @@ -59,7 +59,9 @@ import javax.swing.*; * *

    * - * @see GLAnimJPanel + * @see gl4java.swing.GLAnimJPanel + * @see gl4java.awt.GLCanvas + * * @version 2.0, 21. April 1999 * @author Sven Goethel * @@ -83,8 +85,8 @@ public class GLJPanel extends JPanel * This value is updated after a GLContext is created with the * original updated value of GLContext ! * - * @see GLJPanel#preInit - * @see GLJPanel#paint + * @see gl4java.swing.GLJPanel#preInit + * @see gl4java.swing.GLJPanel#paint */ protected int stencilBits = 0; @@ -93,8 +95,8 @@ public class GLJPanel extends JPanel * This value is updated after a GLContext is created with the * original updated value of GLContext ! * - * @see GLJPanel#preInit - * @see GLJPanel#paint + * @see gl4java.swing.GLJPanel#preInit + * @see gl4java.swing.GLJPanel#paint */ protected int accumSize = 0; @@ -103,8 +105,8 @@ public class GLJPanel extends JPanel * This value is updated after a GLContext is created with the * original updated value of GLContext ! * - * @see GLJPanel#preInit - * @see GLJPanel#paint + * @see gl4java.swing.GLJPanel#preInit + * @see gl4java.swing.GLJPanel#paint */ protected boolean stereoView = false; @@ -113,32 +115,32 @@ public class GLJPanel extends JPanel * This value is updated after a GLContext is created with the * original updated value of GLContext ! * - * @see GLJPanel#preInit - * @see GLJPanel#paint + * @see gl4java.swing.GLJPanel#preInit + * @see gl4java.swing.GLJPanel#paint */ protected boolean rgba = true; /** * The context with witch display lists and textures will be shared. * - * @see GLJPanel#preInit - * @see GLJPanel#paint + * @see gl4java.swing.GLJPanel#preInit + * @see gl4java.swing.GLJPanel#paint */ protected GLContext sharedGLContext; /** * The data to hold the offscreen pixels on the java side ! * - * @see GLJPanel#offImagePixels - * @see GLJPanel#paint + * @see gl4java.swing.GLJPanel#offImagePixels + * @see gl4java.swing.GLJPanel#paint */ protected BufferedImage offImage = null; /** * The data to hold the offscreen pixels on the GL side ! * - * @see GLJPanel#offImage - * @see GLJPanel#paint + * @see gl4java.swing.GLJPanel#offImage + * @see gl4java.swing.GLJPanel#paint */ protected byte[] offImagePixels = null; @@ -149,9 +151,9 @@ public class GLJPanel extends JPanel * the offscreen pixmap is used in this size, * not in the components-size (-> faster if smaller) * - * @see GLJPanel#paint - * @see GLJPanel#setOffScreenSize - * @see GLJPanel#getOffScreenSize + * @see gl4java.swing.GLJPanel#paint + * @see gl4java.swing.GLJPanel#setOffScreenSize + * @see gl4java.swing.GLJPanel#getOffScreenSize */ protected Dimension offScrnSize = null; protected boolean customOffScrnSize=false; @@ -269,7 +271,7 @@ public class GLJPanel extends JPanel * * @return void * - * @see GLJPanel#paint + * @see gl4java.swing.GLJPanel#paint */ public final Window getTopLevelWindow() { return topLevelWindow; } @@ -281,8 +283,8 @@ public class GLJPanel extends JPanel * the offscreen pixmap is used in this size, * not in the components-size (-> faster if smaller) * - * @see GLJPanel#offScrnSize - * @see GLJPanel#setOffScreenSize + * @see gl4java.swing.GLJPanel#offScrnSize + * @see gl4java.swing.GLJPanel#setOffScreenSize */ public Dimension getOffScreenSize() { return offScrnSize; } @@ -294,8 +296,8 @@ public class GLJPanel extends JPanel * the offscreen pixmap is used in this size, * not in the components-size (-> faster if smaller) * - * @see GLJPanel#offScrnSize - * @see GLJPanel#getOffScreenSize + * @see gl4java.swing.GLJPanel#offScrnSize + * @see gl4java.swing.GLJPanel#getOffScreenSize */ public void setOffScreenSize(Dimension size) { @@ -327,11 +329,11 @@ public class GLJPanel extends JPanel * in your derivation. * * @see gl4java.GLContext#GLContext - * @see GLJPanel#cvsIsInit - * @see GLJPanel#sDisplay - * @see GLJPanel#display - * @see GLJPanel#preInit - * @see GLJPanel#init + * @see gl4java.swing.GLJPanel#cvsIsInit + * @see gl4java.swing.GLJPanel#sDisplay + * @see gl4java.swing.GLJPanel#display + * @see gl4java.swing.GLJPanel#preInit + * @see gl4java.swing.GLJPanel#init */ public synchronized final void paintComponent(Graphics g) { @@ -430,8 +432,8 @@ public class GLJPanel extends JPanel * * @return void * - * @see GLJPanel#paint - * @see GLJPanel#display + * @see gl4java.swing.GLJPanel#paint + * @see gl4java.swing.GLJPanel#display */ public synchronized final void sDisplay() { @@ -562,8 +564,8 @@ public class GLJPanel extends JPanel * * @return void * - * @see GLJPanel#sDisplay - * @see GLJPanel#paint + * @see gl4java.swing.GLJPanel#sDisplay + * @see gl4java.swing.GLJPanel#paint */ public void display() { @@ -578,12 +580,11 @@ public class GLJPanel extends JPanel * * @return void * - * @see GLJPanel#paint - * @see GLJPanel#doubleBuffer - * @see GLJPanel#stereoView - * @see GLJPanel#rgba - * @see GLJPanel#stencilBits - * @see GLJPanel#accumSize + * @see gl4java.swing.GLJPanel#paint + * @see gl4java.swing.GLJPanel#stereoView + * @see gl4java.swing.GLJPanel#rgba + * @see gl4java.swing.GLJPanel#stencilBits + * @see gl4java.swing.GLJPanel#accumSize */ public void preInit() { @@ -598,7 +599,7 @@ public class GLJPanel extends JPanel * * @return void * - * @see GLJPanel#paint + * @see gl4java.swing.GLJPanel#paint */ public void init() { @@ -613,7 +614,7 @@ public class GLJPanel extends JPanel * * @return void * - * @see GLJPanel#cvsDispose + * @see gl4java.swing.GLJPanel#cvsDispose */ public void doCleanup() { @@ -626,8 +627,8 @@ public class GLJPanel extends JPanel * * @return boolean * - * @see GLJPanel#paint - * @see GLJPanel#init + * @see gl4java.swing.GLJPanel#paint + * @see gl4java.swing.GLJPanel#init */ public boolean cvsIsInit() { @@ -662,8 +663,8 @@ public class GLJPanel extends JPanel * @param height the new height * @return void * - * @see GLJPanel#paint - * @see GLJPanel#sDisplay + * @see gl4java.swing.GLJPanel#paint + * @see gl4java.swing.GLJPanel#sDisplay */ public void reshape( int width, int height ) { @@ -689,8 +690,8 @@ public class GLJPanel extends JPanel * @param e the element, which is resized * @return void * - * @see GLJPanel#paint - * @see GLJPanel#reshape + * @see gl4java.swing.GLJPanel#paint + * @see gl4java.swing.GLJPanel#reshape */ public void componentResized(ComponentEvent e) { @@ -807,7 +808,7 @@ public class GLJPanel extends JPanel * This function calls gljDestroy of GLContext ! * * @see gl4java.GLContext#gljDestroy - * @see GLJPanel#doCleanup + * @see gl4java.swing.GLJPanel#doCleanup */ public void cvsDispose() { diff --git a/gl4java/system/GljMSJDirect.java b/gl4java/system/GljMSJDirect.java index 125d5c0..ef5986c 100644 --- a/gl4java/system/GljMSJDirect.java +++ b/gl4java/system/GljMSJDirect.java @@ -43,7 +43,7 @@ public class GljMSJDirect extends Object */ private static native void OGLWindowMsgPumpJDirect(); - public static final int createOGLWindowNative(int hwndParent, + public static final long createOGLWindowNative(long hwndParent, int x, int y, int width, int height) @@ -52,26 +52,26 @@ public class GljMSJDirect extends Object /** * @dll.import("GL4JavaGljMSJDirect", auto) */ - private static native int createOGLWindowNativeJDirect(int hwndParent, + private static native long createOGLWindowNativeJDirect(long hwndParent, int x, int y, int width, int height); - public static final void destroyOGLWindowNative(int hdc) + public static final void destroyOGLWindowNative(long hdc) { destroyOGLWindowNativeJDirect(hdc); } /** * @dll.import("GL4JavaGljMSJDirect") */ - private static native void destroyOGLWindowNativeJDirect(int hdc); + private static native void destroyOGLWindowNativeJDirect(long hdc); - public static final void moveOGLWindowNative(int hdc, int x, int y, int width, int height) + public static final void moveOGLWindowNative(long hdc, int x, int y, int width, int height) { moveOGLWindowNativeJDirect(hdc, x, y, width, height); } /** * @dll.import("GL4JavaGljMSJDirect") */ - private static native void moveOGLWindowNativeJDirect(int hdc, int x, int y, int width, int height); + private static native void moveOGLWindowNativeJDirect(long hdc, int x, int y, int width, int height); } diff --git a/gl4java/utils/Test.java b/gl4java/utils/Test.java index addc706..a430de5 100644 --- a/gl4java/utils/Test.java +++ b/gl4java/utils/Test.java @@ -55,7 +55,7 @@ public class Test Dimension ps = glSAnimApplet.getPreferredSize(); f.setBounds(-100,-100,99,99); f.setVisible(true); - f.setVisible(false); + //f.setVisible(false); Insets i = f.getInsets(); f.setBounds(0,0, ps.width+i.left+i.right, diff --git a/gl4java/utils/glut/GLUTFuncLightImpl.java b/gl4java/utils/glut/GLUTFuncLightImpl.java index 0d75311..6f546aa 100644 --- a/gl4java/utils/glut/GLUTFuncLightImpl.java +++ b/gl4java/utils/glut/GLUTFuncLightImpl.java @@ -267,7 +267,7 @@ implements GLUTFunc, GLEnum, GLUEnum protected GLFunc gl = null; protected GLUFunc glu = null; - protected int quadObj=0; + protected long quadObj=0; protected final void initQuadObj() { diff --git a/makefile b/makefile index 2f29713..1031d12 100644 --- a/makefile +++ b/makefile @@ -97,7 +97,7 @@ CNATIVEDIR = CNativeCode LIBMAJOR = 2 LIBMINOR = 5 -LIBBUGFIX = 1 +LIBBUGFIX = 2 RELEASE = 0 # @@ -105,6 +105,11 @@ RELEASE = 0 # DEMORELEASE = 3 +#lib GLContext +LIBBASENAME1c = GL4JavaJauGljJNI13 +LIBNAME1c = lib$(LIBBASENAME1c) +LIBRARY1c = $(LIBNAME1c).so + #lib GLContext LIBBASENAME1b = GL4JavaJauGljJNI12 LIBNAME1b = lib$(LIBBASENAME1b) @@ -274,11 +279,11 @@ FILES.java = $(PACKAGEDIR)/GL4JavaInitException.java \ FILES.class = ${FILES.java:.java=.class} -FILES_mac.java = gl4java/jau/awt/macintosh/MacHandleAccess.java +FILES_mac.java = gl4java/jau/awt/macintosh/MacHandleAccess.java FILES_mac.class = ${FILES_mac.java:.java=.class} -FILES_w32.java = gl4java/jau/awt/windows/Win32HandleAccess.java +FILES_w32.java = gl4java/jau/awt/windows/Win32HandleAccess.java FILES_w32.class = ${FILES_w32.java:.java=.class} @@ -294,15 +299,24 @@ FILES_x11.class = ${FILES_x11.java:.java=.class} #lib GLContext FILES1.c = $(CNATIVEDIR)/OpenGL_X11.c \ + $(CNATIVEDIR)/OpenGL_X11_common.c \ $(CNATIVEDIR)/OpenGL_misc.c \ $(CNATIVEDIR)/jnitools.c \ $(CNATIVEDIR)/GLCallbackHelperJNI.c FILES1b.c = $(CNATIVEDIR)/OpenGL_X11.c \ + $(CNATIVEDIR)/OpenGL_X11_common.c \ $(CNATIVEDIR)/OpenGL_misc.c \ $(CNATIVEDIR)/jni12tools.c \ $(CNATIVEDIR)/GLCallbackHelperJNI.c +FILES1c.c = $(CNATIVEDIR)/OpenGL_X11_jawt.c \ + $(CNATIVEDIR)/OpenGL_X11_common.c \ + $(CNATIVEDIR)/jawt_misc.c \ + $(CNATIVEDIR)/OpenGL_misc.c \ + $(CNATIVEDIR)/jni12tools.c \ + $(CNATIVEDIR)/GLCallbackHelperJNI.c + #lib GLFunc - 1 FILES2.c = $(CNATIVEDIR)/OpenGL_JauJNI_dynfuncs.c @@ -341,6 +355,7 @@ FILES7b.c = $(CNATIVEDIR)/OpenGLU_JauJNI12tst_funcs.c \ #lib GLFunc - 3 FILES1.o = ${FILES1.c:.c=.o} FILES1b.o = ${FILES1b.c:.c=.o} +FILES1c.o = ${FILES1c.c:.c=.o} FILES2.o = ${FILES2.c:.c=.o} FILES2b.o = ${FILES2b.c:.c=.o} FILES3.o = ${FILES3.c:.c=.o} @@ -401,6 +416,7 @@ x11 : cleanup gljni \ makeJar \ $(HOME_LIB_DIR)/$(LIBRARY1) \ $(HOME_LIB_DIR)/$(LIBRARY1b) \ + $(HOME_LIB_DIR)/$(LIBRARY1c) \ $(HOME_LIB_DIR)/$(LIBRARY2) \ $(HOME_LIB_DIR)/$(LIBRARY2b) \ $(HOME_LIB_DIR)/$(LIBRARY3) \ @@ -452,75 +468,93 @@ $(HOME_LIB_DIR)/$(LIBRARY1b): $(FILES1b.o) $(LIBNAME1b) $(LIBMAJOR) $(LIBMINOR) $(LIBBUGFIX) \ $(FILES1b.o) $(LIBS) +$(HOME_LIB_DIR)/$(LIBRARY1c): $(FILES1c.o) + rm -f ${HOME_LIB_DIR}/${LIBNAME1c}.* + $(MKEXP) $(LIBNAME1c) $(FILES1c.o) + $(MKLIB) $(HOME_LIB_DIR) \ + $(LIBNAME1c) $(LIBMAJOR) $(LIBMINOR) $(LIBBUGFIX) \ + $(FILES1c.o) $(LIBS) -L$(JAVAOSLIB) \ + -ljawt + $(HOME_LIB_DIR)/$(LIBRARY2): $(FILES2.o) rm -f ${HOME_LIB_DIR}/${LIBNAME2}.* $(MKEXP) $(LIBNAME2) $(FILES2.o) $(MKLIB) $(HOME_LIB_DIR) \ $(LIBNAME2) $(LIBMAJOR) $(LIBMINOR) $(LIBBUGFIX) \ - $(FILES2.o) $(LIBS) -L$(HOME_LIB_DIR) -l$(LIBBASENAME1) + $(FILES2.o) $(LIBS) -L$(HOME_LIB_DIR) \ + -l$(LIBBASENAME1) $(HOME_LIB_DIR)/$(LIBRARY2b): $(FILES2b.o) rm -f ${HOME_LIB_DIR}/${LIBNAME2b}.* $(MKEXP) $(LIBNAME2b) $(FILES2b.o) $(MKLIB) $(HOME_LIB_DIR) \ $(LIBNAME2b) $(LIBMAJOR) $(LIBMINOR) $(LIBBUGFIX) \ - $(FILES2b.o) $(LIBS) -L$(HOME_LIB_DIR) -l$(LIBBASENAME1b) + $(FILES2b.o) $(LIBS) -L$(HOME_LIB_DIR) \ + -l$(LIBBASENAME1b) $(HOME_LIB_DIR)/$(LIBRARY3): $(FILES3.o) rm -f ${HOME_LIB_DIR}/${LIBNAME3}.* $(MKEXP) $(LIBNAME3) $(FILES3.o) $(MKLIB) $(HOME_LIB_DIR) \ $(LIBNAME3) $(LIBMAJOR) $(LIBMINOR) $(LIBBUGFIX) \ - $(FILES3.o) $(LIBS) -L$(HOME_LIB_DIR) -l$(LIBBASENAME1) + $(FILES3.o) $(LIBS) -L$(HOME_LIB_DIR) \ + -l$(LIBBASENAME1) $(HOME_LIB_DIR)/$(LIBRARY3b): $(FILES3b.o) rm -f ${HOME_LIB_DIR}/${LIBNAME3b}.* $(MKEXP) $(LIBNAME3b) $(FILES3b.o) $(MKLIB) $(HOME_LIB_DIR) \ $(LIBNAME3b) $(LIBMAJOR) $(LIBMINOR) $(LIBBUGFIX) \ - $(FILES3b.o) $(LIBS) -L$(HOME_LIB_DIR) -l$(LIBBASENAME1b) + $(FILES3b.o) $(LIBS) -L$(HOME_LIB_DIR) \ + -l$(LIBBASENAME1b) $(HOME_LIB_DIR)/$(LIBRARY4): $(FILES4.o) rm -f ${HOME_LIB_DIR}/${LIBNAME4}.* $(MKEXP) $(LIBNAME4) $(FILES4.o) $(MKLIB) $(HOME_LIB_DIR) \ $(LIBNAME4) $(LIBMAJOR) $(LIBMINOR) $(LIBBUGFIX) \ - $(FILES4.o) $(LIBS) -L$(HOME_LIB_DIR) -l$(LIBBASENAME1) + $(FILES4.o) $(LIBS) -L$(HOME_LIB_DIR) \ + -l$(LIBBASENAME1) $(HOME_LIB_DIR)/$(LIBRARY5): $(FILES5.o) rm -f ${HOME_LIB_DIR}/${LIBNAME5}.* $(MKEXP) $(LIBNAME5) $(FILES5.o) $(MKLIB) $(HOME_LIB_DIR) \ $(LIBNAME5) $(LIBMAJOR) $(LIBMINOR) $(LIBBUGFIX) \ - $(FILES5.o) $(LIBS) -L$(HOME_LIB_DIR) -l$(LIBBASENAME1) + $(FILES5.o) $(LIBS) -L$(HOME_LIB_DIR) \ + -l$(LIBBASENAME1) $(HOME_LIB_DIR)/$(LIBRARY6): $(FILES6.o) rm -f ${HOME_LIB_DIR}/${LIBNAME6}.* $(MKEXP) $(LIBNAME6) $(FILES6.o) $(MKLIB) $(HOME_LIB_DIR) \ $(LIBNAME6) $(LIBMAJOR) $(LIBMINOR) $(LIBBUGFIX) \ - $(FILES6.o) $(LIBS) -L$(HOME_LIB_DIR) -l$(LIBBASENAME1) + $(FILES6.o) $(LIBS) -L$(HOME_LIB_DIR) \ + -l$(LIBBASENAME1) $(HOME_LIB_DIR)/$(LIBRARY6b): $(FILES6b.o) rm -f ${HOME_LIB_DIR}/${LIBNAME6b}.* $(MKEXP) $(LIBNAME6b) $(FILES6b.o) $(MKLIB) $(HOME_LIB_DIR) \ $(LIBNAME6b) $(LIBMAJOR) $(LIBMINOR) $(LIBBUGFIX) \ - $(FILES6b.o) $(LIBS) -L$(HOME_LIB_DIR) -l$(LIBBASENAME1b) + $(FILES6b.o) $(LIBS) -L$(HOME_LIB_DIR) \ + -l$(LIBBASENAME1b) $(HOME_LIB_DIR)/$(LIBRARY7): $(FILES7.o) rm -f ${HOME_LIB_DIR}/${LIBNAME7}.* $(MKEXP) $(LIBNAME7) $(FILES7.o) $(MKLIB) $(HOME_LIB_DIR) \ $(LIBNAME7) $(LIBMAJOR) $(LIBMINOR) $(LIBBUGFIX) \ - $(FILES7.o) $(LIBS) -L$(HOME_LIB_DIR) -l$(LIBBASENAME1) + $(FILES7.o) $(LIBS) -L$(HOME_LIB_DIR) \ + -l$(LIBBASENAME1) $(HOME_LIB_DIR)/$(LIBRARY7b): $(FILES7b.o) rm -f ${HOME_LIB_DIR}/${LIBNAME7b}.* $(MKEXP) $(LIBNAME7b) $(FILES7b.o) $(MKLIB) $(HOME_LIB_DIR) \ $(LIBNAME7b) $(LIBMAJOR) $(LIBMINOR) $(LIBBUGFIX) \ - $(FILES7b.o) $(LIBS) -L$(HOME_LIB_DIR) -l$(LIBBASENAME1b) + $(FILES7b.o) $(LIBS) -L$(HOME_LIB_DIR) \ + -l$(LIBBASENAME1b) ###################################################################### # NEEDED DEPENDENCYs FOR GENERATED FILES ... @@ -795,12 +829,14 @@ unix2binpkg: pbinpkg java2binpkg cd $(HOME_LIB_DIR) ; \ zip -9 $(THISDIR)/binpkg/libGL4Java$(LIBMAJOR).$(LIBMINOR).$(LIBBUGFIX).$(RELEASE)-$(UNIXTYPE).zip \ $(LIBRARY1) $(LIBRARY2) $(LIBRARY3) \ - $(LIBRARY1b) $(LIBRARY2b) $(LIBRARY3b) + $(LIBRARY1b) $(LIBRARY2b) $(LIBRARY3b) \ + $(LIBRARY1c) rm -f binpkg/libGL4Java$(LIBMAJOR).$(LIBMINOR).$(LIBBUGFIX).$(RELEASE)-$(UNIXTYPE).tar.gz cd $(HOME_LIB_DIR) ; \ tar cf $(THISDIR)/binpkg/libGL4Java$(LIBMAJOR).$(LIBMINOR).$(LIBBUGFIX).$(RELEASE)-$(UNIXTYPE).tar \ $(LIBNAME1).* $(LIBNAME2).* \ $(LIBNAME1b).* $(LIBNAME2b).* \ + $(LIBNAME1c).* \ $(LIBNAME3).* $(LIBNAME3b).* \ $(LIBNAME4).* $(LIBNAME5).* \ $(LIBNAME6).* $(LIBNAME7).* \ -- cgit v1.2.3