diff options
author | Sven Gothel <[email protected]> | 2002-04-25 03:21:58 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2002-04-25 03:21:58 +0000 |
commit | 53a0faa0cce4546b441cb6af033adaabd2f1da94 (patch) | |
tree | e92bb216d2b13269c179d4e049ec5384bca1d25e /CNativeCode/OpenGLU_JauJNI12nf_funcs.c | |
parent | 6114297dac0848d470a3211915bea64f49d584e7 (diff) |
added pepijn's bugfix (jdk <= 1.3 GC, tesselation)
SGI Irix capable code ..
correct NIO usage for tesselation ..
minor stuff ..
Diffstat (limited to 'CNativeCode/OpenGLU_JauJNI12nf_funcs.c')
-rwxr-xr-x | CNativeCode/OpenGLU_JauJNI12nf_funcs.c | 41 |
1 files changed, 36 insertions, 5 deletions
diff --git a/CNativeCode/OpenGLU_JauJNI12nf_funcs.c b/CNativeCode/OpenGLU_JauJNI12nf_funcs.c index b7c6237..705106f 100755 --- a/CNativeCode/OpenGLU_JauJNI12nf_funcs.c +++ b/CNativeCode/OpenGLU_JauJNI12nf_funcs.c @@ -33,8 +33,17 @@ * herein lies the native JAVA methods for the OpenGL functions.
*/
+/** THIS IS A MANUAL CODED PART + glu-manualCodedImplJNI14.java +*/ + static const char _glu_n_a_string[] = "GLU-String not available !"; +static const char * _glu_lib_vendor_="Jausoft - Sven Goethel Software Development"; +static const char * _glu_lib_version_="2.8.3.0"; + +/* ---------------------------------------------------------------------- */ + JNIEXPORT jstring JNICALL Java_gl4java_GLUFuncJauJNInf_gluErrorString ( JNIEnv *env, jobject obj, jint errorCode ) @@ -67,9 +76,6 @@ Java_gl4java_GLUFuncJauJNInf_gluGetString ( JNIEnv *env, jobject obj, return (*env)->NewStringUTF(env, tmpString); } -static const char * _glu_lib_vendor_="Jausoft - Sven Goethel Software Development"; -static const char * _glu_lib_version_="2.8.3.0"; - JNIEXPORT jstring JNICALL Java_gl4java_GLUFuncJauJNInf_getNativeVendor ( JNIEnv *env, jobject obj ) { @@ -106,6 +112,31 @@ static void _AddCallbackNode(JNIEnv *env, free(strMethodName); free(strSignature); } + +static void _AddCallbackNodeForCbObj(JNIEnv *env, + jlong qnt_obj, jint which, + jobject methodClassInstance, + jstring methodName, + jstring signature, + jint arrayLen1, + jint arrayLen2, + jint arrayLen3, + jint arrayLen4, + jint arrayLen5) +{ + char * strMethodName = jnitoolsGetJavaString(env, methodName); + char * strSignature = jnitoolsGetJavaString(env, signature); + jlong glx=0; + + glx = GetCurrentGLContext(); + + AddCallbackNodeForCbObj(env, methodClassInstance, strMethodName, strSignature, + arrayLen1, arrayLen2, arrayLen3, + arrayLen4, arrayLen5, + (void *)((PointerHolder)qnt_obj), which, glx); + free(strMethodName); + free(strSignature); +} JNIEXPORT void JNICALL @@ -172,7 +203,7 @@ Java_gl4java_GLUFuncJauJNInf_gluTessCallback( JNIEnv *env, jobject obj, jint arrayLen5) { if ( disp__gluTessCallback == NULL ) return; - + switch(which) { case GLU_TESS_BEGIN: @@ -239,7 +270,7 @@ Java_gl4java_GLUFuncJauJNInf_gluTessCallback( JNIEnv *env, jobject obj, jnitoolsThrowByName(env, "java/lang/IllegalArgumentException", "Wrong Callback-Function type (\"which\") !"); return; } - _AddCallbackNode(env, + _AddCallbackNodeForCbObj(env, tobj, which, methodClassInstance, methodName, signature, arrayLen1, arrayLen2, arrayLen3, |