aboutsummaryrefslogtreecommitdiffstats
path: root/C2J/manual/glu-manualCodedImplJNI.c
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2001-02-13 05:32:07 +0000
committerSven Gothel <[email protected]>2001-02-13 05:32:07 +0000
commit3e2b16a820bfe03f8f3837c3aaa615c8c4b7f18c (patch)
treed834a05eb37751b4c95045c3021589f2e22fcd9f /C2J/manual/glu-manualCodedImplJNI.c
parent91bc9d109b2d16e6d42f1fbcc9d3dbca51c40b69 (diff)
JAWT Support JDK >=1.3
Diffstat (limited to 'C2J/manual/glu-manualCodedImplJNI.c')
-rw-r--r--C2J/manual/glu-manualCodedImplJNI.c88
1 files changed, 59 insertions, 29 deletions
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());
}