aboutsummaryrefslogtreecommitdiffstats
path: root/C2J/manual
diff options
context:
space:
mode:
Diffstat (limited to 'C2J/manual')
-rw-r--r--C2J/manual/gl-enum-manualCoded.java20
-rw-r--r--C2J/manual/gl-manualCodedImplJNI.c34
-rw-r--r--C2J/manual/gl-manualCodedImplJNI1.java18
-rw-r--r--C2J/manual/gl-manualCodedImplJNI2.java14
-rw-r--r--C2J/manual/gl-manualCodedVirt1.java26
-rw-r--r--C2J/manual/gl-manualCodedVirt2.java2
-rw-r--r--C2J/manual/glu-enum-manualCoded.java17
-rw-r--r--C2J/manual/glu-manualCodedImplJNI.c213
-rw-r--r--C2J/manual/glu-manualCodedImplJNI.h13
-rw-r--r--C2J/manual/glu-manualCodedImplJNI1.java17
-rw-r--r--C2J/manual/glu-manualCodedImplJNI2.java117
-rw-r--r--C2J/manual/glu-manualCodedVirt.java60
12 files changed, 551 insertions, 0 deletions
diff --git a/C2J/manual/gl-enum-manualCoded.java b/C2J/manual/gl-enum-manualCoded.java
new file mode 100644
index 0000000..5ee07b0
--- /dev/null
+++ b/C2J/manual/gl-enum-manualCoded.java
@@ -0,0 +1,20 @@
+/**
+ * @(#) GLEnum.java
+ */
+
+
+package gl4java;
+
+/**
+ * The base interface for OpenGL enumerates,
+ * which provides you all the C-API style enumerates
+ *
+ * @version 2.01, 15. November 1999
+ * @author Sven Goethel
+ */
+public interface GLEnum
+{
+
+ public static final boolean GL_FALSE = false;
+ public static final boolean GL_TRUE = true;
+
diff --git a/C2J/manual/gl-manualCodedImplJNI.c b/C2J/manual/gl-manualCodedImplJNI.c
new file mode 100644
index 0000000..d0d378c
--- /dev/null
+++ b/C2J/manual/gl-manualCodedImplJNI.c
@@ -0,0 +1,34 @@
+/** THIS IS A MANUAL CODED PART
+ gl-manualCodedImplJNI.java
+*/
+
+static const char _gl_n_a_string[] = "GL-String not avaiable !";
+
+JNIEXPORT jstring JNICALL
+Java_gl4java_GLFuncJauJNI_glGetString ( JNIEnv *env, jobject obj,
+ jint name )
+{
+ const char * tmpString=0;
+
+ tmpString = glGetString ( /* jint */ name);
+ if(tmpString==NULL)
+ tmpString=_gl_n_a_string;
+
+ return (*env)->NewStringUTF(env, tmpString);
+}
+
+static const char * _gl_lib_vendor_="Jausoft - Sven Goethel Software Development";
+static const char * _gl_lib_version_="2.4.1.0";
+
+JNIEXPORT jstring JNICALL
+Java_gl4java_GLFuncJauJNI_getNativeVendor ( JNIEnv *env, jobject obj )
+{
+ return (*env)->NewStringUTF(env, _gl_lib_vendor_);
+}
+
+JNIEXPORT jstring JNICALL
+Java_gl4java_GLFuncJauJNI_getNativeVersion ( JNIEnv *env, jobject obj )
+{
+ return (*env)->NewStringUTF(env, _gl_lib_version_);
+}
+
diff --git a/C2J/manual/gl-manualCodedImplJNI1.java b/C2J/manual/gl-manualCodedImplJNI1.java
new file mode 100644
index 0000000..f52544f
--- /dev/null
+++ b/C2J/manual/gl-manualCodedImplJNI1.java
@@ -0,0 +1,18 @@
+/**
+ * @(#) GLFuncJauJNI.java
+ */
+
+
+package gl4java;
+
+/**
+ * The default implementation class for OpenGL native function mapping
+ *
+ * @version 2.00, 21. April 1999
+ * @author Sven Goethel
+ */
+public class GLFuncJauJNI
+ implements GLFunc
+{
+
+
diff --git a/C2J/manual/gl-manualCodedImplJNI2.java b/C2J/manual/gl-manualCodedImplJNI2.java
new file mode 100644
index 0000000..5b54d5d
--- /dev/null
+++ b/C2J/manual/gl-manualCodedImplJNI2.java
@@ -0,0 +1,14 @@
+
+public final native String glGetString ( int name ) ;
+
+public final native String getNativeVendor ( ) ;
+public final native String getNativeVersion ( ) ;
+
+public final String getClassVendor ( )
+{ return "Jausoft - Sven Goethel Software Development"; }
+
+public final String getClassVersion ( )
+{ return "2.4.1.0"; }
+
+
+
diff --git a/C2J/manual/gl-manualCodedVirt1.java b/C2J/manual/gl-manualCodedVirt1.java
new file mode 100644
index 0000000..7bb01dc
--- /dev/null
+++ b/C2J/manual/gl-manualCodedVirt1.java
@@ -0,0 +1,26 @@
+/**
+ * @(#) GLFunc.java
+ */
+
+
+package gl4java;
+
+/**
+ * The base interface for OpenGL native function mapping
+ *
+ * @version 2.00, 21. April 1999
+ * @author Sven Goethel
+ */
+public interface GLFunc
+ extends GLEnum
+{
+
+public String glGetString ( int name ) ;
+
+public String getNativeVendor ( ) ;
+public String getNativeVersion ( ) ;
+
+public String getClassVendor ( ) ;
+public String getClassVersion ( ) ;
+
+public static final String[] GL_PROC_NAMES = {
diff --git a/C2J/manual/gl-manualCodedVirt2.java b/C2J/manual/gl-manualCodedVirt2.java
new file mode 100644
index 0000000..aa362ef
--- /dev/null
+++ b/C2J/manual/gl-manualCodedVirt2.java
@@ -0,0 +1,2 @@
+ null
+};
diff --git a/C2J/manual/glu-enum-manualCoded.java b/C2J/manual/glu-enum-manualCoded.java
new file mode 100644
index 0000000..d8aa45f
--- /dev/null
+++ b/C2J/manual/glu-enum-manualCoded.java
@@ -0,0 +1,17 @@
+/**
+ * @(#) GLUEnum.java
+ */
+
+
+package gl4java;
+
+/**
+ * The base interface for GLU enumerates,
+ * which provides you all the C-API style enumerates
+ *
+ * @version 2.00, 21. April 1999
+ * @author Sven Goethel
+ */
+public interface GLUEnum
+{
+
diff --git a/C2J/manual/glu-manualCodedImplJNI.c b/C2J/manual/glu-manualCodedImplJNI.c
new file mode 100644
index 0000000..fcb4d00
--- /dev/null
+++ b/C2J/manual/glu-manualCodedImplJNI.c
@@ -0,0 +1,213 @@
+static const char _glu_n_a_string[] = "GLU-String not avaiable !";
+
+JNIEXPORT jstring JNICALL
+Java_gl4java_GLUFuncJauJNI_gluErrorString ( JNIEnv *env, jobject obj,
+ jint errorCode )
+{
+ const char *tmpString=0;
+
+ tmpString = gluErrorString ( /* jint */ errorCode );
+ if(tmpString==NULL)
+ tmpString=_glu_n_a_string;
+
+ return (*env)->NewStringUTF(env, tmpString);
+}
+
+JNIEXPORT jstring JNICALL
+Java_gl4java_GLUFuncJauJNI_gluGetString ( JNIEnv *env, jobject obj,
+ jint name )
+{
+ const char *tmpString=0;
+
+ tmpString = gluGetString ( /* jint */ name);
+ if(tmpString==NULL)
+ tmpString=_glu_n_a_string;
+
+ return (*env)->NewStringUTF(env, tmpString);
+}
+
+static const char * _glu_lib_vendor_="Jausoft - Sven Goethel Software Development";
+static const char * _glu_lib_version_="2.4.1.0";
+
+JNIEXPORT jstring JNICALL
+Java_gl4java_GLUFuncJauJNI_getNativeVendor ( JNIEnv *env, jobject obj )
+{
+ return (*env)->NewStringUTF(env, _glu_lib_vendor_);
+}
+
+JNIEXPORT jstring JNICALL
+Java_gl4java_GLUFuncJauJNI_getNativeVersion ( JNIEnv *env, jobject obj )
+{
+ return (*env)->NewStringUTF(env, _glu_lib_version_);
+}
+
+static void _AddCallbackNode(JNIEnv *env,
+ jint qnt_obj, jint which,
+ jobject methodClassInstance,
+ jstring methodName,
+ jstring signature,
+ jint arrayLen1,
+ jint arrayLen2,
+ jint arrayLen3,
+ jint arrayLen4,
+ jint arrayLen5)
+{
+ char * strMethodName = jnitoolsGetJavaString(env, methodName);
+ char * strSignature = jnitoolsGetJavaString(env, signature);
+ jlong glx=0;
+
+ glx = GetCurrentGLContext();
+
+ AddCallbackNode(env, methodClassInstance, strMethodName, strSignature,
+ arrayLen1, arrayLen2, arrayLen3,
+ arrayLen4, arrayLen5,
+ (void *)qnt_obj, which, glx);
+ free(strMethodName);
+ free(strSignature);
+}
+
+
+JNIEXPORT void JNICALL
+Java_gl4java_GLUFuncJauJNI_gluQuadricCallback( JNIEnv *env, jobject obj,
+ jint qobj, jint which,
+ jobject methodClassInstance,
+ jstring methodName,
+ jstring signature)
+{
+ switch(which)
+ {
+ case GLU_ERROR:
+ gluQuadricCallback((void *)qobj, which,
+ cbf_GLU_ERROR );
+ break;
+ default:
+ jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !");
+ return;
+ }
+ _AddCallbackNode(env,
+ qobj, which, methodClassInstance, methodName,
+ signature,
+ 0, 0, 0, 0, 0);
+}
+
+
+JNIEXPORT void JNICALL
+Java_gl4java_GLUFuncJauJNI_gluNurbsCallback( JNIEnv *env, jobject obj,
+ jint nobj, jint which,
+ jobject methodClassInstance,
+ jstring methodName,
+ jstring signature)
+{
+ switch(which)
+ {
+ case GLU_ERROR:
+ gluNurbsCallback((void *)nobj, which,
+ cbf_GLU_ERROR );
+ break;
+ default:
+ jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !");
+ return;
+ }
+ _AddCallbackNode(env,
+ nobj, which, methodClassInstance, methodName,
+ signature,
+ 0, 0, 0, 0, 0);
+}
+
+JNIEXPORT void JNICALL
+Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj,
+ jint tobj, jint which,
+ jobject methodClassInstance,
+ jstring methodName,
+ jstring signature,
+ jint arrayLen1,
+ jint arrayLen2,
+ jint arrayLen3,
+ jint arrayLen4,
+ jint arrayLen5)
+{
+ switch(which)
+ {
+ case GLU_TESS_BEGIN:
+ gluTessCallback((GLUtesselator *)tobj, which,
+ cbf_GLU_TESS_BEGIN );
+ break;
+ case GLU_TESS_BEGIN_DATA:
+ gluTessCallback((GLUtesselator *)tobj, which,
+ cbf_GLU_TESS_BEGIN_DATA );
+ break;
+ case GLU_TESS_EDGE_FLAG:
+ gluTessCallback((GLUtesselator *)tobj, which,
+ cbf_GLU_TESS_EDGE_FLAG );
+ break;
+ case GLU_TESS_EDGE_FLAG_DATA:
+ gluTessCallback((GLUtesselator *)tobj, which,
+ cbf_GLU_TESS_EDGE_FLAG_DATA );
+ break;
+ case GLU_TESS_VERTEX:
+ gluTessCallback((GLUtesselator *)tobj, which,
+ cbf_GLU_TESS_VERTEX );
+ break;
+ case GLU_TESS_VERTEX_DATA:
+ gluTessCallback((GLUtesselator *)tobj, which,
+ cbf_GLU_TESS_VERTEX_DATA );
+ break;
+ case GLU_TESS_END:
+ gluTessCallback((GLUtesselator *)tobj, which,
+ cbf_GLU_TESS_END );
+ break;
+ case GLU_TESS_END_DATA:
+ gluTessCallback((GLUtesselator *)tobj, which,
+ cbf_GLU_TESS_END_DATA );
+ break;
+ case GLU_TESS_ERROR:
+ gluTessCallback((GLUtesselator *)tobj, which,
+ cbf_GLU_TESS_ERROR );
+ break;
+ case GLU_TESS_ERROR_DATA:
+ gluTessCallback((GLUtesselator *)tobj, which,
+ cbf_GLU_TESS_ERROR_DATA );
+ break;
+ case GLU_TESS_COMBINE:
+ gluTessCallback((GLUtesselator *)tobj, which,
+ cbf_GLU_TESS_COMBINE );
+ break;
+ case GLU_TESS_COMBINE_DATA:
+ gluTessCallback((GLUtesselator *)tobj, which,
+ cbf_GLU_TESS_COMBINE_DATA );
+ break;
+ default:
+ jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !");
+ return;
+ }
+ _AddCallbackNode(env,
+ tobj, which, methodClassInstance, methodName,
+ signature,
+ arrayLen1, arrayLen2, arrayLen3,
+ arrayLen4, arrayLen5);
+}
+
+JNIEXPORT void JNICALL
+Java_gl4java_GLUFuncJauJNI_gluDeleteQuadric( JNIEnv *env, jobject obj,
+ jint qobj )
+{
+ gluDeleteQuadric((void *)qobj);
+ RemoveCallbackNodes((void *)qobj);
+}
+
+JNIEXPORT void JNICALL
+Java_gl4java_GLUFuncJauJNI_gluDeleteNurbsRenderer( JNIEnv *env, jobject obj,
+ jint nobj )
+{
+ gluDeleteNurbsRenderer((void *)nobj);
+ RemoveCallbackNodes((void *)nobj);
+}
+
+JNIEXPORT void JNICALL
+Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
+ jint tobj )
+{
+ gluDeleteTess((GLUtesselator *)tobj);
+ RemoveCallbackNodes((void *)tobj);
+}
+
diff --git a/C2J/manual/glu-manualCodedImplJNI.h b/C2J/manual/glu-manualCodedImplJNI.h
new file mode 100644
index 0000000..bfb8a40
--- /dev/null
+++ b/C2J/manual/glu-manualCodedImplJNI.h
@@ -0,0 +1,13 @@
+
+
+public native byte gluErrorString[] ( int errorCode ) ;
+
+
+public native void gluNurbsCallback ( long nobj , int which , void ( fn[] ) ( ) ) ;
+
+
+public native void gluTessCallback ( long tobj , int which , void ( fn[] ) ( ) ) ;
+
+
+public native byte gluGetString[] ( int name ) ;
+
diff --git a/C2J/manual/glu-manualCodedImplJNI1.java b/C2J/manual/glu-manualCodedImplJNI1.java
new file mode 100644
index 0000000..155a50e
--- /dev/null
+++ b/C2J/manual/glu-manualCodedImplJNI1.java
@@ -0,0 +1,17 @@
+/**
+ * @(#) GLUFuncJauJNI.java
+ */
+
+
+package gl4java;
+
+/**
+ * The default implementation class for GLU native function mapping
+ *
+ * @version 2.00, 21. April 1999
+ * @author Sven Goethel
+ */
+public class GLUFuncJauJNI
+ implements GLUFunc
+{
+
diff --git a/C2J/manual/glu-manualCodedImplJNI2.java b/C2J/manual/glu-manualCodedImplJNI2.java
new file mode 100644
index 0000000..7559354
--- /dev/null
+++ b/C2J/manual/glu-manualCodedImplJNI2.java
@@ -0,0 +1,117 @@
+
+public final native String gluErrorString ( int errorCode ) ;
+public final native String gluGetString ( int name ) ;
+
+public final native String getNativeVendor ( ) ;
+public final native String getNativeVersion ( ) ;
+
+public final String getClassVendor ( )
+{ return "Jausoft - Sven Goethel Software Development"; }
+
+public final String getClassVersion ( )
+{ return "2.4.1.0"; }
+
+
+/**
+ * The Callback registry function.
+ * To achieve the signature (internal argument signature)
+ * you can use the "javap -s <classname>" toolkit of the JDK !
+ *
+ * @param qobj the quadratic id, fetch with gluNewQuadric
+ * @param which the id for the callback type
+ * @param methodClassInstance the class instance,
+ * which implements the callback-method
+ * @param methodName the name of the callback-method
+ * @param signature the signature of the callback-method.
+ *
+ * @see GLUFunc#gluNewQuadric
+ */
+public final native void gluQuadricCallback(
+ int qobj, int which,
+ Object methodClassInstance,
+ String methodName,
+ String signature
+ );
+
+/**
+ * The Callback registry function.
+ * To achieve the signature (internal argument signature)
+ * you can use the "javap -s <classname>" toolkit of the JDK !
+ *
+ * @param nobj the nurbs id, fetch with gluNewNurbsRenderer
+ * @param which the id for the callback type
+ * @param methodClassInstance the class instance,
+ * which implements the callback-method
+ * @param methodName the name of the callback-method
+ * @param signature the signature of the callback-method.
+ *
+ * @see GLUFunc#gluNewNurbsRenderer
+ */
+public final native void gluNurbsCallback(
+ int nobj, int which,
+ Object methodClassInstance,
+ String methodName,
+ String signature
+ );
+
+
+/**
+ * The Callback registry function.
+ * To achieve the signature (internal argument signature)
+ * you can use the "javap -s <classname>" toolkit of the JDK !
+ *
+ * @param tobj the tesselation id, fetch with gluNewTess
+ * @param which the id for the callback type
+ * @param methodClassInstance the class instance,
+ * which implements the callback-method
+ * @param methodName the name of the callback-method
+ * @param signature the signature of the callback-method.
+ * @param voidArrayLen1 the optional length of the 1st array
+ * in the callback-methods argument-list
+ * @param voidArrayLen2 the optional length of the 2nd array
+ * in the callback-methods argument-list
+ * @param voidArrayLen3 the optional length of the 3rd array
+ * in the callback-methods argument-list
+ * @param voidArrayLen4 the optional length of the 4th array
+ * in the callback-methods argument-list
+ * @param voidArrayLen5 the optional length of the 5th array
+ * in the callback-methods argument-list
+ *
+ * @see GLUFunc#gluNewTess
+ */
+public final native void gluTessCallback(
+ int tobj, int which,
+ Object methodClassInstance,
+ String methodName,
+ String signature,
+ int voidArrayLen1,
+ int voidArrayLen2,
+ int voidArrayLen3,
+ int voidArrayLen4,
+ int voidArrayLen5
+ );
+
+/**
+ * The Callback de-registry function.
+ *
+ * @param qobj the quadratic id, for which all callback-methods
+ * should be de-registered
+ */
+public final native void gluDeleteQuadric( int qobj );
+
+/**
+ * The Callback de-registry function.
+ *
+ * @param nobj the nurbs id, for which all callback-methods
+ * should be de-registered
+ */
+public final native void gluDeleteNurbsRenderer( int nobj );
+
+/**
+ * The Callback de-registry function.
+ *
+ * @param tobj the tesselation id, for which all callback-methods
+ * should be de-registered
+ */
+public final native void gluDeleteTess( int tobj );
+
diff --git a/C2J/manual/glu-manualCodedVirt.java b/C2J/manual/glu-manualCodedVirt.java
new file mode 100644
index 0000000..2f77551
--- /dev/null
+++ b/C2J/manual/glu-manualCodedVirt.java
@@ -0,0 +1,60 @@
+/**
+ * @(#) GLUFunc.java
+ */
+
+
+package gl4java;
+
+/**
+ * The base interface for GLU native function mapping
+ *
+ * @version 2.00, 21. April 1999
+ * @author Sven Goethel
+ */
+public interface GLUFunc
+ extends GLUEnum
+{
+
+public String gluErrorString ( int errorCode ) ;
+
+public String gluGetString ( int name ) ;
+
+public String getNativeVendor ( ) ;
+public String getNativeVersion ( ) ;
+
+public String getClassVendor ( ) ;
+public String getClassVersion ( ) ;
+
+public void gluQuadricCallback(
+ int qobj, int which,
+ Object methodClassInstance,
+ String methodName,
+ String signature
+ );
+
+public void gluNurbsCallback(
+ int nobj, int which,
+ Object methodClassInstance,
+ String methodName,
+ String signature
+ );
+
+
+public void gluTessCallback(
+ int tobj, int which,
+ Object methodClassInstance,
+ String methodName,
+ String signature,
+ int voidArrayLen1,
+ int voidArrayLen2,
+ int voidArrayLen3,
+ int voidArrayLen4,
+ int voidArrayLen5
+ );
+
+public void gluDeleteQuadric( int qobj );
+
+public void gluDeleteNurbsRenderer( int nobj );
+
+public void gluDeleteTess( int tobj );
+