aboutsummaryrefslogtreecommitdiffstats
path: root/CNativeCode/OpenGL_misc.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 /CNativeCode/OpenGL_misc.c
parent91bc9d109b2d16e6d42f1fbcc9d3dbca51c40b69 (diff)
JAWT Support JDK >=1.3
Diffstat (limited to 'CNativeCode/OpenGL_misc.c')
-rw-r--r--CNativeCode/OpenGL_misc.c38
1 files changed, 12 insertions, 26 deletions
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 !