From e2e8e5258f79a25fdc6dad9392e290a843fe3627 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Fri, 7 Dec 2001 08:30:31 +0000 Subject: Removed link-time dependency on JAWT to solve PATH problems --- CNativeCode/OpenGL_Win32.c | 1177 ++++++++++---------- CNativeCode/OpenGL_Win32_jawt.c | 16 +- CNativeCode/OpenGL_X11.c | 13 +- CNativeCode/OpenGL_X11_jawt.c | 16 +- CNativeCode/jawt_misc.c | 42 +- CNativeCode/jawt_misc.h | 3 + Win32VC6/GL4JavaJauGljJNI13/GL4JavaJauGljJNI13.dsp | 244 ++-- .../GL4JavaJauGljJNI13nf/GL4JavaJauGljJNI13nf.dsp | 246 ++-- .../GL4JavaJauGljJNI13tst.dsp | 246 ++-- Win32VC6/GL4JavaJauGljJNI14/GL4JavaJauGljJNI14.dsp | 254 ++--- gl4java/GLContext.java.skel | 73 +- makefile | 12 +- 12 files changed, 1233 insertions(+), 1109 deletions(-) diff --git a/CNativeCode/OpenGL_Win32.c b/CNativeCode/OpenGL_Win32.c index 8e888e3..a4c22b3 100755 --- a/CNativeCode/OpenGL_Win32.c +++ b/CNativeCode/OpenGL_Win32.c @@ -1,584 +1,593 @@ -/* - * Original Author: Leo Chan -- 1995 - * - * Adam King 1997 - * Ported to Win32 from X - * - * This file takes care of the C implementation of finding the correct - * Win32 window, assigning an OpenGL graphics context to it, storing that - * graphics context in the java class data structure. - * - * also contains the use() and swap() functions for double buffering - * - * September 12, 1997 - Adam King - * - Added support for rendering directly into a Canvas ( BIG rewrite ) - */ - -/** - * 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 ! - - "sharedGLContextNative" := (HGLRC) - This is the optional shared GLContext ! - - "glContext" := (HGLRC) - This is THE used GLContext ! - */ - -#include "OpenGL_Win32_common.h" - -static jboolean verbose = JNI_FALSE; - -JNIEXPORT jboolean JNICALL -Java_gl4java_GLContext_useJAWT( JNIEnv *env, jobject obj ) -{ - (void)env; - (void)obj; - return JNI_FALSE; -} - -JNIEXPORT jboolean JNICALL -Java_gl4java_GLContext_hasJAWTSurfaceChanged( JNIEnv *env, jobject obj, - jlong thisWin ) -{ - (void)env; - (void)obj; - (void)thisWin; - return JNI_FALSE; -} - -JNIEXPORT jboolean JNICALL -Java_gl4java_GLContext_lockJAWT( JNIEnv *env, jobject obj, - jobject canvas, - jlong thisWin, jboolean verbose - ) -{ - (void) env; - (void) obj; - (void) canvas; - (void) thisWin; - (void) verbose; - return JNI_TRUE; -} - -JNIEXPORT jboolean JNICALL -Java_gl4java_GLContext_unlockJAWT( JNIEnv *env, jobject obj, - jlong thisWin, jboolean verbose - ) -{ - (void) env; - (void) obj; - (void) thisWin; - (void) verbose; - return JNI_TRUE; -} - -JNIEXPORT jboolean JNICALL -Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj, - jobject canvas) -{ - jboolean ret = JNI_TRUE; - - jclass cls = 0; - jfieldID fpixmapHandle=0; - jfieldID foffScreenRenderer=0; - jfieldID faccumSize=0; - jfieldID fwindowHandle=0, fpData=0; - jfieldID fverbose=0; - jfieldID fglContext=0; - jfieldID fshareWith=0; - jfieldID fcreatewinw = 0, fcreatewinh = 0; - jfieldID fglCaps=0; - - /* these variables will be mapped in the java-object ! */ - jboolean joffScreenRenderer=JNI_FALSE; - HDC thisWin=0; - HGLRC gc=0; - PIXELFORMATDESCRIPTOR pfd; - HDC pData=0; - HGLRC shareWith=NULL; - jint jcreatewinw = 0, jcreatewinh = 0; - HBITMAP pix=0; - GLCapabilities glCaps; - jobject jglCaps=0; - jthrowable exc; - jclass _GLCapabilities= 0; - - (void) canvas; - - cls = (*env)->GetObjectClass(env, obj); - if(cls==0) - { - fprintf(stderr,"oo0.0 cls==0\n"); - fflush(stderr); - return JNI_FALSE; - } - - if(ret==JNI_TRUE) - { - fverbose =(*env)->GetStaticFieldID(env, cls, "gljNativeDebug", "Z"); - if (fverbose == 0) - { - fprintf(stderr,"oo0.2 fverbose==0\n"); - fflush(stderr); - return JNI_FALSE; - } else { - verbose = (*env)->GetStaticBooleanField(env, cls, fverbose); - } - } - - if(JNI_TRUE==verbose) - { - 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 ´jlong´ */ - ret = testWin32Java(); - - ret = testJavaGLTypes(verbose); - - if(ret==JNI_TRUE) { - fpData = (*env)->GetFieldID(env, cls, "pData", "J"); - if (fpData == 0) { - fprintf(stderr, "pData not accessible !\n"); - fflush(stderr); - ret= JNI_FALSE; - } else pData = (HDC) - ( (PointerHolder)(*env)->GetLongField(env, obj, fpData)); - } - if(JNI_TRUE==verbose) - { - fprintf(stderr, "received pData : %d\n", (int)pData); - } - - if(ret==JNI_TRUE) { - fwindowHandle = (*env)->GetFieldID(env, cls, "windowHandle", "J"); - if (fwindowHandle == 0) { - fprintf(stderr, "windowHandle not accessible !\n"); - fflush(stderr); - ret= JNI_FALSE; - } - } - - if(ret==JNI_TRUE) { - fglContext=(*env)->GetFieldID(env, cls, "glContext", "J"); - if (fglContext == 0) - { - fprintf(stderr, "fglContext not accessible !\n"); - fflush(stderr); - ret= JNI_FALSE; - } - } - - if(ret==JNI_TRUE) { - foffScreenRenderer = - (*env)->GetFieldID(env, cls, "offScreenRenderer", "Z"); - if (foffScreenRenderer == 0) - { - fprintf(stderr, "foffScreenRenderer not accessible !\n"); - fflush(stderr); - ret= JNI_FALSE; - } - else joffScreenRenderer =(*env)->GetBooleanField(env, obj, foffScreenRenderer); - } - - if(ret==JNI_TRUE) { - fglCaps = (*env)->GetFieldID(env, cls, "glCaps", "Lgl4java/GLCapabilities;"); - if (fglCaps == 0) - { - fprintf(stderr, "fglCaps not accessible !\n"); - fflush(stderr); - ret= JNI_FALSE; - } - else jglCaps =(*env)->GetObjectField(env, obj, fglCaps); - } - - if( jglCaps==0 ) - { - fprintf(stderr,"\nGL4Java openOpenGL ERROR: ZERO capsObj was fetched by GetObjectField !\n"); - fflush(stderr); - return JNI_FALSE; - } - - _GLCapabilities= (*env)->FindClass(env, "Lgl4java/GLCapabilities;"); - exc = (*env)->ExceptionOccurred(env); - if(exc) { - if(JNI_TRUE==verbose) - { - fprintf(stderr, "GL4Java: openOpen FindClass gl4java/GLCapabilities failed, cannot check glCaps object\n"); - (*env)->ExceptionDescribe(env); - fflush(stderr); - } - (*env)->ExceptionClear(env); - _GLCapabilities=0; - } - exc=0; - - if( _GLCapabilities!=0 && - (*env)->IsInstanceOf(env, jglCaps, _GLCapabilities)==JNI_FALSE ) - { - fprintf(stderr,"\nGL4Java openOpenGL ERROR: glCaps is not instanceof gl4java/GLCapabilities !\n"); - fflush(stderr); - return JNI_FALSE; - } - - if( JNI_TRUE != javaGLCapabilities2NativeGLCapabilities ( env, jglCaps, &glCaps ) ) - { - fprintf(stderr,"\nGL4Java ERROR: glCaps Object is not valid !\n"); - fflush(stderr); - return JNI_FALSE; - } - - if(ret==JNI_TRUE) { - fcreatewinw = (*env)->GetFieldID(env, cls, "createwinw", "I"); - if (fcreatewinw == 0) ret= JNI_FALSE; - else jcreatewinw =(*env)->GetIntField(env, obj, fcreatewinw); - } - - if(ret==JNI_TRUE) { - fcreatewinh = (*env)->GetFieldID(env, cls, "createwinh", "I"); - if (fcreatewinh == 0) ret= JNI_FALSE; - else jcreatewinh =(*env)->GetIntField(env, obj, fcreatewinh); - } - - if(ret==JNI_TRUE) { - fshareWith = (*env)->GetFieldID(env, cls, "sharedGLContextNative", "J"); - if (fshareWith == 0) ret= JNI_FALSE; - else shareWith = (HGLRC) - ( (PointerHolder)(*env)->GetLongField(env, obj, fshareWith)); - } - - if(ret==JNI_TRUE) { - fpixmapHandle = (*env)->GetFieldID(env, cls, "pixmapHandle", "J"); - if (fpixmapHandle == 0) ret= JNI_FALSE; - } - - if(joffScreenRenderer==JNI_TRUE) - { - glCaps.buffer=BUFFER_SINGLE; - } - - if(JNI_TRUE==verbose && joffScreenRenderer==JNI_TRUE) - { - fprintf(stderr,"\nGL4Java: (USING OFFSCREEN GLPIXMAP BUFFER,\n\t forced: !doubleBuffer)\n"); - fflush(stderr); - } - - disp__wglMakeCurrent(NULL, NULL); - - /** - * with version jdk1.1.6 and later, we are able to use - * the java-function straight to achieve the native window - * handle .... - * - * this handle is saved to pData for the windows version ! - */ - if( pData == 0) - { - printf( "get_GC: Error, pData is zero\n"); - return JNI_FALSE; - } - if( pData != 0 ) - thisWin = (HDC)pData; - - /* get the graphics context for this widget */ - if( (gc = get_GC( &thisWin, &glCaps, shareWith, - joffScreenRenderer, jcreatewinw, jcreatewinh, - &pix, verbose)) == 0 - ) - { - printf( "getGC error" ); - return JNI_FALSE; - } - - /* fetch the states of doubleBuffer and stereo */ - (void) PixelFormatDescriptorFromDc( thisWin, &pfd); - - if(JNI_TRUE==verbose) - { - fprintf(stdout,"\nGL4Java: writing capabilities to GLContext's java object\n"); - fflush(stdout); - } - - if(jglCaps!=0) - (void) nativeGLCapabilities2JavaGLCapabilities (env, jglCaps, &glCaps); - - if(ret==JNI_TRUE && fglCaps && jglCaps) { - (*env)->SetObjectField(env, obj, fglCaps, jglCaps); - } - - if(ret==JNI_TRUE && fwindowHandle!=0) { - (*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)->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)->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); - } - - /* - gl4java_bind_ext(JNI_TRUE==verbose); - */ - - return ret; -} - -JNIEXPORT jboolean JNICALL -Java_gl4java_GLContext_gljMakeCurrentNative( JNIEnv *env, jobject obj, - jobject canvas, - jlong disp, - jlong thisWin, - jlong glContext) -{ - jboolean ret = JNI_TRUE; - - (void)canvas; - - if( !thisWin ) - { - return JNI_FALSE; - } - - if( !glContext ) - { - return JNI_FALSE; - } - - if ( ret==JNI_TRUE && !disp__wglMakeCurrent((HDC)((PointerHolder)thisWin), - (HGLRC)((PointerHolder)glContext)) ) - { - return JNI_FALSE; - } - return JNI_TRUE; -} - -JNIEXPORT jboolean JNICALL -Java_gl4java_GLContext_gljFreeNative( JNIEnv *env, jobject obj, - jobject canvas, - jlong disp, - jlong thisWin, - jlong glContext - ) -{ - (void)thisWin; - (void)glContext; - (void)disp; - (void)canvas; - - if ( ! disp__wglMakeCurrent( NULL, NULL ) ) - { - fprintf(stderr, "gljFree failed\n"); - fflush(stderr); - return JNI_FALSE; - } - return JNI_TRUE; -} - -JNIEXPORT jboolean JNICALL -Java_gl4java_GLContext_gljDestroyNative( JNIEnv *env, jobject obj, - jobject canvas) -{ - jboolean ret = JNI_TRUE; - - jclass cls = 0; - jfieldID fwindowHandle=0, fpixmapHandle=0; - jfieldID fglContext=0; - jfieldID foffScreenRenderer=0; - jfieldID fownwind=0; - - jboolean jownwind = JNI_FALSE ; - jboolean joffScreenRenderer=JNI_FALSE; - HBITMAP pix=0; - HDC thisWin=0; - HGLRC gc=0; - - - (void)canvas; - - cls = (*env)->GetObjectClass(env, obj); - if(cls==0) - { - ret=JNI_FALSE; - } - - if(ret==JNI_TRUE) { - fwindowHandle = (*env)->GetFieldID(env, cls, "windowHandle", "J"); - if (fwindowHandle == 0) ret= JNI_FALSE; - else thisWin =(HDC) - ((PointerHolder)(*env)->GetLongField(env, obj, fwindowHandle)); - } - - if(ret==JNI_TRUE) { - fglContext=(*env)->GetFieldID(env, cls, "glContext", "J"); - if (fglContext == 0) ret= JNI_FALSE; - else gc =(HGLRC) - ((PointerHolder)(*env)->GetLongField(env, obj, fglContext)); - } - - - if(ret==JNI_TRUE) { - fpixmapHandle = (*env)->GetFieldID(env, cls, "pixmapHandle", "J"); - if (fpixmapHandle == 0) ret= JNI_FALSE; - else pix =(HBITMAP) - ((PointerHolder)(*env)->GetLongField(env, obj, fpixmapHandle)); - } - - if(ret==JNI_TRUE) { - foffScreenRenderer = - (*env)->GetFieldID(env, cls, "offScreenRenderer", "Z"); - if (foffScreenRenderer == 0) ret= JNI_FALSE; - 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) - { - if ( gc == 0 ) - { - if(JNI_TRUE==verbose) - { - fprintf(stderr, "gljDestroy error, GL context is 0\n"); - fflush(stderr); - } - } - - if ( ! disp__wglMakeCurrent( NULL, NULL ) ) - { - fprintf(stderr, "gljDestroy failed (free)\n"); - fflush(stderr); - } - - if(ret==JNI_TRUE) - { - if(gc!=0) - disp__wglDeleteContext(gc); - - if(pix!=0) - { - if(thisWin!=0) - DeleteDC(thisWin); - thisWin=0; - DeleteObject(pix); - pix=0; - } - if(jownwind && thisWin!=0) - { - DeleteDC(thisWin); - thisWin=0; - jownwind=JNI_FALSE; - } - } - } - - gc = 0; - thisWin = 0; - - ret=JNI_TRUE; - - if(ret==JNI_TRUE && fwindowHandle!=0) { - (*env)->SetLongField(env, obj, fwindowHandle, (jlong)((PointerHolder)thisWin)); - } - - if(ret==JNI_TRUE && fglContext) { - (*env)->SetLongField(env, obj, fglContext, (jlong)((PointerHolder)gc)); - } - - - if(ret==JNI_TRUE && fpixmapHandle!=0) { - (*env)->SetLongField(env, obj, fpixmapHandle, (jlong)((PointerHolder)pix)); - } - - if(ret==JNI_TRUE && fownwind) { - (*env)->SetBooleanField(env, obj, fownwind, jownwind); - } - - return ret; -} - -JNIEXPORT jboolean JNICALL -Java_gl4java_GLContext_gljSwapNative( JNIEnv *env, jobject obj, - jlong disp, - jlong thisWin, - jlong glContext, - jboolean doubleBuffer - ) -{ - jboolean ret = JNI_TRUE; - - (void)glContext; - (void)disp; - - if( !thisWin ) - { - fprintf(stderr,"Swap does not got the window ...\n"); - return JNI_FALSE; - } - - if( doubleBuffer==JNI_TRUE ) - { - if( SwapBuffers( (HDC)((PointerHolder)thisWin) ) == FALSE ) - { - /* Error in Win2000 implementation :o) - * printf( "Error in swap buffer!\n" ); - */ - return JNI_FALSE; - } - } else { - disp__glFlush(); - } - return ret; -} - -JNIEXPORT void JNICALL -Java_gl4java_GLContext_gljResizeNative( JNIEnv *env, jobject obj, - jboolean isOwnWindow, - jlong disp, jlong thisWin, - jint width, jint height) -{ - (void)isOwnWindow; - (void)disp; - (void)thisWin; - (void)width; - (void)height; - - return; -} - +/* + * Original Author: Leo Chan -- 1995 + * + * Adam King 1997 + * Ported to Win32 from X + * + * This file takes care of the C implementation of finding the correct + * Win32 window, assigning an OpenGL graphics context to it, storing that + * graphics context in the java class data structure. + * + * also contains the use() and swap() functions for double buffering + * + * September 12, 1997 - Adam King + * - Added support for rendering directly into a Canvas ( BIG rewrite ) + */ + +/** + * 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 ! + + "sharedGLContextNative" := (HGLRC) + This is the optional shared GLContext ! + + "glContext" := (HGLRC) + This is THE used GLContext ! + */ + +#include "OpenGL_Win32_common.h" + +static jboolean verbose = JNI_FALSE; + +JNIEXPORT jboolean JNICALL Java_gl4java_GLContext_loadJAWT0 +(JNIEnv *env, jclass unused, jstring str) +{ + (void)env; + (void)unused; + (void)str; + return JNI_FALSE; +} + +JNIEXPORT jboolean JNICALL +Java_gl4java_GLContext_useJAWT( JNIEnv *env, jclass unused ) +{ + (void)env; + (void)unused; + return JNI_FALSE; +} + +JNIEXPORT jboolean JNICALL +Java_gl4java_GLContext_hasJAWTSurfaceChanged( JNIEnv *env, jobject obj, + jlong thisWin ) +{ + (void)env; + (void)obj; + (void)thisWin; + return JNI_FALSE; +} + +JNIEXPORT jboolean JNICALL +Java_gl4java_GLContext_lockJAWT( JNIEnv *env, jobject obj, + jobject canvas, + jlong thisWin, jboolean verbose + ) +{ + (void) env; + (void) obj; + (void) canvas; + (void) thisWin; + (void) verbose; + return JNI_TRUE; +} + +JNIEXPORT jboolean JNICALL +Java_gl4java_GLContext_unlockJAWT( JNIEnv *env, jobject obj, + jlong thisWin, jboolean verbose + ) +{ + (void) env; + (void) obj; + (void) thisWin; + (void) verbose; + return JNI_TRUE; +} + +JNIEXPORT jboolean JNICALL +Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj, + jobject canvas) +{ + jboolean ret = JNI_TRUE; + + jclass cls = 0; + jfieldID fpixmapHandle=0; + jfieldID foffScreenRenderer=0; + jfieldID faccumSize=0; + jfieldID fwindowHandle=0, fpData=0; + jfieldID fverbose=0; + jfieldID fglContext=0; + jfieldID fshareWith=0; + jfieldID fcreatewinw = 0, fcreatewinh = 0; + jfieldID fglCaps=0; + + /* these variables will be mapped in the java-object ! */ + jboolean joffScreenRenderer=JNI_FALSE; + HDC thisWin=0; + HGLRC gc=0; + PIXELFORMATDESCRIPTOR pfd; + HDC pData=0; + HGLRC shareWith=NULL; + jint jcreatewinw = 0, jcreatewinh = 0; + HBITMAP pix=0; + GLCapabilities glCaps; + jobject jglCaps=0; + jthrowable exc; + jclass _GLCapabilities= 0; + + (void) canvas; + + cls = (*env)->GetObjectClass(env, obj); + if(cls==0) + { + fprintf(stderr,"oo0.0 cls==0\n"); + fflush(stderr); + return JNI_FALSE; + } + + if(ret==JNI_TRUE) + { + fverbose =(*env)->GetStaticFieldID(env, cls, "gljNativeDebug", "Z"); + if (fverbose == 0) + { + fprintf(stderr,"oo0.2 fverbose==0\n"); + fflush(stderr); + return JNI_FALSE; + } else { + verbose = (*env)->GetStaticBooleanField(env, cls, fverbose); + } + } + + if(JNI_TRUE==verbose) + { + 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 ´jlong´ */ + ret = testWin32Java(); + + ret = testJavaGLTypes(verbose); + + if(ret==JNI_TRUE) { + fpData = (*env)->GetFieldID(env, cls, "pData", "J"); + if (fpData == 0) { + fprintf(stderr, "pData not accessible !\n"); + fflush(stderr); + ret= JNI_FALSE; + } else pData = (HDC) + ( (PointerHolder)(*env)->GetLongField(env, obj, fpData)); + } + if(JNI_TRUE==verbose) + { + fprintf(stderr, "received pData : %d\n", (int)pData); + } + + if(ret==JNI_TRUE) { + fwindowHandle = (*env)->GetFieldID(env, cls, "windowHandle", "J"); + if (fwindowHandle == 0) { + fprintf(stderr, "windowHandle not accessible !\n"); + fflush(stderr); + ret= JNI_FALSE; + } + } + + if(ret==JNI_TRUE) { + fglContext=(*env)->GetFieldID(env, cls, "glContext", "J"); + if (fglContext == 0) + { + fprintf(stderr, "fglContext not accessible !\n"); + fflush(stderr); + ret= JNI_FALSE; + } + } + + if(ret==JNI_TRUE) { + foffScreenRenderer = + (*env)->GetFieldID(env, cls, "offScreenRenderer", "Z"); + if (foffScreenRenderer == 0) + { + fprintf(stderr, "foffScreenRenderer not accessible !\n"); + fflush(stderr); + ret= JNI_FALSE; + } + else joffScreenRenderer =(*env)->GetBooleanField(env, obj, foffScreenRenderer); + } + + if(ret==JNI_TRUE) { + fglCaps = (*env)->GetFieldID(env, cls, "glCaps", "Lgl4java/GLCapabilities;"); + if (fglCaps == 0) + { + fprintf(stderr, "fglCaps not accessible !\n"); + fflush(stderr); + ret= JNI_FALSE; + } + else jglCaps =(*env)->GetObjectField(env, obj, fglCaps); + } + + if( jglCaps==0 ) + { + fprintf(stderr,"\nGL4Java openOpenGL ERROR: ZERO capsObj was fetched by GetObjectField !\n"); + fflush(stderr); + return JNI_FALSE; + } + + _GLCapabilities= (*env)->FindClass(env, "Lgl4java/GLCapabilities;"); + exc = (*env)->ExceptionOccurred(env); + if(exc) { + if(JNI_TRUE==verbose) + { + fprintf(stderr, "GL4Java: openOpen FindClass gl4java/GLCapabilities failed, cannot check glCaps object\n"); + (*env)->ExceptionDescribe(env); + fflush(stderr); + } + (*env)->ExceptionClear(env); + _GLCapabilities=0; + } + exc=0; + + if( _GLCapabilities!=0 && + (*env)->IsInstanceOf(env, jglCaps, _GLCapabilities)==JNI_FALSE ) + { + fprintf(stderr,"\nGL4Java openOpenGL ERROR: glCaps is not instanceof gl4java/GLCapabilities !\n"); + fflush(stderr); + return JNI_FALSE; + } + + if( JNI_TRUE != javaGLCapabilities2NativeGLCapabilities ( env, jglCaps, &glCaps ) ) + { + fprintf(stderr,"\nGL4Java ERROR: glCaps Object is not valid !\n"); + fflush(stderr); + return JNI_FALSE; + } + + if(ret==JNI_TRUE) { + fcreatewinw = (*env)->GetFieldID(env, cls, "createwinw", "I"); + if (fcreatewinw == 0) ret= JNI_FALSE; + else jcreatewinw =(*env)->GetIntField(env, obj, fcreatewinw); + } + + if(ret==JNI_TRUE) { + fcreatewinh = (*env)->GetFieldID(env, cls, "createwinh", "I"); + if (fcreatewinh == 0) ret= JNI_FALSE; + else jcreatewinh =(*env)->GetIntField(env, obj, fcreatewinh); + } + + if(ret==JNI_TRUE) { + fshareWith = (*env)->GetFieldID(env, cls, "sharedGLContextNative", "J"); + if (fshareWith == 0) ret= JNI_FALSE; + else shareWith = (HGLRC) + ( (PointerHolder)(*env)->GetLongField(env, obj, fshareWith)); + } + + if(ret==JNI_TRUE) { + fpixmapHandle = (*env)->GetFieldID(env, cls, "pixmapHandle", "J"); + if (fpixmapHandle == 0) ret= JNI_FALSE; + } + + if(joffScreenRenderer==JNI_TRUE) + { + glCaps.buffer=BUFFER_SINGLE; + } + + if(JNI_TRUE==verbose && joffScreenRenderer==JNI_TRUE) + { + fprintf(stderr,"\nGL4Java: (USING OFFSCREEN GLPIXMAP BUFFER,\n\t forced: !doubleBuffer)\n"); + fflush(stderr); + } + + disp__wglMakeCurrent(NULL, NULL); + + /** + * with version jdk1.1.6 and later, we are able to use + * the java-function straight to achieve the native window + * handle .... + * + * this handle is saved to pData for the windows version ! + */ + if( pData == 0) + { + printf( "get_GC: Error, pData is zero\n"); + return JNI_FALSE; + } + if( pData != 0 ) + thisWin = (HDC)pData; + + /* get the graphics context for this widget */ + if( (gc = get_GC( &thisWin, &glCaps, shareWith, + joffScreenRenderer, jcreatewinw, jcreatewinh, + &pix, verbose)) == 0 + ) + { + printf( "getGC error" ); + return JNI_FALSE; + } + + /* fetch the states of doubleBuffer and stereo */ + (void) PixelFormatDescriptorFromDc( thisWin, &pfd); + + if(JNI_TRUE==verbose) + { + fprintf(stdout,"\nGL4Java: writing capabilities to GLContext's java object\n"); + fflush(stdout); + } + + if(jglCaps!=0) + (void) nativeGLCapabilities2JavaGLCapabilities (env, jglCaps, &glCaps); + + if(ret==JNI_TRUE && fglCaps && jglCaps) { + (*env)->SetObjectField(env, obj, fglCaps, jglCaps); + } + + if(ret==JNI_TRUE && fwindowHandle!=0) { + (*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)->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)->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); + } + + /* + gl4java_bind_ext(JNI_TRUE==verbose); + */ + + return ret; +} + +JNIEXPORT jboolean JNICALL +Java_gl4java_GLContext_gljMakeCurrentNative( JNIEnv *env, jobject obj, + jobject canvas, + jlong disp, + jlong thisWin, + jlong glContext) +{ + jboolean ret = JNI_TRUE; + + (void)canvas; + + if( !thisWin ) + { + return JNI_FALSE; + } + + if( !glContext ) + { + return JNI_FALSE; + } + + if ( ret==JNI_TRUE && !disp__wglMakeCurrent((HDC)((PointerHolder)thisWin), + (HGLRC)((PointerHolder)glContext)) ) + { + return JNI_FALSE; + } + return JNI_TRUE; +} + +JNIEXPORT jboolean JNICALL +Java_gl4java_GLContext_gljFreeNative( JNIEnv *env, jobject obj, + jobject canvas, + jlong disp, + jlong thisWin, + jlong glContext + ) +{ + (void)thisWin; + (void)glContext; + (void)disp; + (void)canvas; + + if ( ! disp__wglMakeCurrent( NULL, NULL ) ) + { + fprintf(stderr, "gljFree failed\n"); + fflush(stderr); + return JNI_FALSE; + } + return JNI_TRUE; +} + +JNIEXPORT jboolean JNICALL +Java_gl4java_GLContext_gljDestroyNative( JNIEnv *env, jobject obj, + jobject canvas) +{ + jboolean ret = JNI_TRUE; + + jclass cls = 0; + jfieldID fwindowHandle=0, fpixmapHandle=0; + jfieldID fglContext=0; + jfieldID foffScreenRenderer=0; + jfieldID fownwind=0; + + jboolean jownwind = JNI_FALSE ; + jboolean joffScreenRenderer=JNI_FALSE; + HBITMAP pix=0; + HDC thisWin=0; + HGLRC gc=0; + + + (void)canvas; + + cls = (*env)->GetObjectClass(env, obj); + if(cls==0) + { + ret=JNI_FALSE; + } + + if(ret==JNI_TRUE) { + fwindowHandle = (*env)->GetFieldID(env, cls, "windowHandle", "J"); + if (fwindowHandle == 0) ret= JNI_FALSE; + else thisWin =(HDC) + ((PointerHolder)(*env)->GetLongField(env, obj, fwindowHandle)); + } + + if(ret==JNI_TRUE) { + fglContext=(*env)->GetFieldID(env, cls, "glContext", "J"); + if (fglContext == 0) ret= JNI_FALSE; + else gc =(HGLRC) + ((PointerHolder)(*env)->GetLongField(env, obj, fglContext)); + } + + + if(ret==JNI_TRUE) { + fpixmapHandle = (*env)->GetFieldID(env, cls, "pixmapHandle", "J"); + if (fpixmapHandle == 0) ret= JNI_FALSE; + else pix =(HBITMAP) + ((PointerHolder)(*env)->GetLongField(env, obj, fpixmapHandle)); + } + + if(ret==JNI_TRUE) { + foffScreenRenderer = + (*env)->GetFieldID(env, cls, "offScreenRenderer", "Z"); + if (foffScreenRenderer == 0) ret= JNI_FALSE; + 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) + { + if ( gc == 0 ) + { + if(JNI_TRUE==verbose) + { + fprintf(stderr, "gljDestroy error, GL context is 0\n"); + fflush(stderr); + } + } + + if ( ! disp__wglMakeCurrent( NULL, NULL ) ) + { + fprintf(stderr, "gljDestroy failed (free)\n"); + fflush(stderr); + } + + if(ret==JNI_TRUE) + { + if(gc!=0) + disp__wglDeleteContext(gc); + + if(pix!=0) + { + if(thisWin!=0) + DeleteDC(thisWin); + thisWin=0; + DeleteObject(pix); + pix=0; + } + if(jownwind && thisWin!=0) + { + DeleteDC(thisWin); + thisWin=0; + jownwind=JNI_FALSE; + } + } + } + + gc = 0; + thisWin = 0; + + ret=JNI_TRUE; + + if(ret==JNI_TRUE && fwindowHandle!=0) { + (*env)->SetLongField(env, obj, fwindowHandle, (jlong)((PointerHolder)thisWin)); + } + + if(ret==JNI_TRUE && fglContext) { + (*env)->SetLongField(env, obj, fglContext, (jlong)((PointerHolder)gc)); + } + + + if(ret==JNI_TRUE && fpixmapHandle!=0) { + (*env)->SetLongField(env, obj, fpixmapHandle, (jlong)((PointerHolder)pix)); + } + + if(ret==JNI_TRUE && fownwind) { + (*env)->SetBooleanField(env, obj, fownwind, jownwind); + } + + return ret; +} + +JNIEXPORT jboolean JNICALL +Java_gl4java_GLContext_gljSwapNative( JNIEnv *env, jobject obj, + jlong disp, + jlong thisWin, + jlong glContext, + jboolean doubleBuffer + ) +{ + jboolean ret = JNI_TRUE; + + (void)glContext; + (void)disp; + + if( !thisWin ) + { + fprintf(stderr,"Swap does not got the window ...\n"); + return JNI_FALSE; + } + + if( doubleBuffer==JNI_TRUE ) + { + if( SwapBuffers( (HDC)((PointerHolder)thisWin) ) == FALSE ) + { + /* Error in Win2000 implementation :o) + * printf( "Error in swap buffer!\n" ); + */ + return JNI_FALSE; + } + } else { + disp__glFlush(); + } + return ret; +} + +JNIEXPORT void JNICALL +Java_gl4java_GLContext_gljResizeNative( JNIEnv *env, jobject obj, + jboolean isOwnWindow, + jlong disp, jlong thisWin, + jint width, jint height) +{ + (void)isOwnWindow; + (void)disp; + (void)thisWin; + (void)width; + (void)height; + + return; +} + diff --git a/CNativeCode/OpenGL_Win32_jawt.c b/CNativeCode/OpenGL_Win32_jawt.c index c3daae7..59e80ca 100755 --- a/CNativeCode/OpenGL_Win32_jawt.c +++ b/CNativeCode/OpenGL_Win32_jawt.c @@ -69,11 +69,23 @@ static jboolean verbose = JNI_FALSE; +JNIEXPORT jboolean JNICALL Java_gl4java_GLContext_loadJAWT0 +(JNIEnv *env, jclass unused, jstring str) +{ + char* chars; + jboolean res; + + chars = (*env)->GetStringUTFChars(env, str, NULL); + res = jawt_init(chars); + (*env)->ReleaseStringUTFChars(env, str, chars); + return res; +} + JNIEXPORT jboolean JNICALL -Java_gl4java_GLContext_useJAWT( JNIEnv *env, jobject obj ) +Java_gl4java_GLContext_useJAWT( JNIEnv *env, jclass unused ) { (void)env; - (void)obj; + (void)unused; return JNI_TRUE; } diff --git a/CNativeCode/OpenGL_X11.c b/CNativeCode/OpenGL_X11.c index f7e0795..6d0dec5 100644 --- a/CNativeCode/OpenGL_X11.c +++ b/CNativeCode/OpenGL_X11.c @@ -84,11 +84,20 @@ static jboolean verbose = JNI_FALSE; +JNIEXPORT jboolean JNICALL Java_gl4java_GLContext_loadJAWT0 +(JNIEnv *env, jclass unused, jstring str) +{ + (void)env; + (void)unused; + (void)str; + return JNI_FALSE; +} + JNIEXPORT jboolean JNICALL -Java_gl4java_GLContext_useJAWT( JNIEnv *env, jobject obj ) +Java_gl4java_GLContext_useJAWT( JNIEnv *env, jclass unused ) { (void)env; - (void)obj; + (void)unused; return JNI_FALSE; } diff --git a/CNativeCode/OpenGL_X11_jawt.c b/CNativeCode/OpenGL_X11_jawt.c index 946e6d6..28f3f44 100644 --- a/CNativeCode/OpenGL_X11_jawt.c +++ b/CNativeCode/OpenGL_X11_jawt.c @@ -117,11 +117,23 @@ */ static jboolean verbose = JNI_FALSE; +JNIEXPORT jboolean JNICALL Java_gl4java_GLContext_loadJAWT0 +(JNIEnv *env, jclass unused, jstring str) +{ + char* chars; + jboolean res; + + chars = (*env)->GetStringUTFChars(env, str, NULL); + res = jawt_init(chars); + (*env)->ReleaseStringUTFChars(env, str, chars); + return res; +} + JNIEXPORT jboolean JNICALL -Java_gl4java_GLContext_useJAWT( JNIEnv *env, jobject obj ) +Java_gl4java_GLContext_useJAWT( JNIEnv *env, jclass unused ) { (void)env; - (void)obj; + (void)unused; return JNI_TRUE; } diff --git a/CNativeCode/jawt_misc.c b/CNativeCode/jawt_misc.c index ec71954..f906ba4 100644 --- a/CNativeCode/jawt_misc.c +++ b/CNativeCode/jawt_misc.c @@ -4,6 +4,9 @@ #include "jawt_misc.h" +typedef jboolean JNICALL JAWT_GetAWT_fn_t(JNIEnv* env, JAWT* awt); +static JAWT_GetAWT_fn_t *JAWT_GetAWT_fn = NULL; + static JAWT _awt ; static jboolean _awt_init = JNI_FALSE ; @@ -13,6 +16,40 @@ static int gds = 0; static jboolean jawtdebug = JNI_FALSE; +jboolean LIBAPIENTRY +jawt_init (char* jawtLibName) +{ +#ifdef _WIN32_ + HMODULE lib = LoadLibrary(jawtLibName); + if (lib == NULL) { + printf(" jawt_init: LoadLibrary failed\n"); + return JNI_FALSE; + } + JAWT_GetAWT_fn = (JAWT_GetAWT_fn_t*) GetProcAddress(lib, "_JAWT_GetAWT@8"); + if (JAWT_GetAWT_fn == NULL) { + printf(" jawt_init: GetProcAddress failed\n"); + return JNI_FALSE; + } + return JNI_TRUE; +#endif + +#ifdef _X11_ + void* lib = dlopen(jawtLibName, RTLD_LAZY | RTLD_GLOBAL); + if (lib == NULL) { + printf(" jawt_init: dlopen failed\n"); + return JNI_FALSE; + } + JAWT_GetAWT_fn = (JAWT_GetAWT_fn_t*) dlsym(lib, "JAWT_GetAWT"); + if (JAWT_GetAWT_fn == NULL) { + printf(" jawt_init: dlsym failed\n"); + return JNI_FALSE; + } + return JNI_TRUE; +#endif + + return JNI_FALSE; +} + jboolean LIBAPIENTRY jawt_create_offscreen (JNIEnv *env, JAWTDataHolder **ppJData, jboolean verbose) { @@ -130,7 +167,10 @@ jawt_open (JNIEnv *env, jobject component, JAWTDataHolder *pJData, jboolean verb if(_awt_init==JNI_FALSE) { _awt.version = JAWT_VERSION_1_3; - pJData->result = JAWT_GetAWT(env, &_awt); + if (JAWT_GetAWT_fn == NULL) { + return JNI_FALSE; + } + pJData->result = (*JAWT_GetAWT_fn)(env, &_awt); if(pJData->result==JNI_TRUE) { if(verbose) diff --git a/CNativeCode/jawt_misc.h b/CNativeCode/jawt_misc.h index 9befce9..293ffa9 100644 --- a/CNativeCode/jawt_misc.h +++ b/CNativeCode/jawt_misc.h @@ -59,6 +59,9 @@ jboolean result; } JAWTDataHolder; + LIBAPI jboolean LIBAPIENTRY + jawt_init (char* jawtLibName); + LIBAPI jboolean LIBAPIENTRY jawt_create_offscreen (JNIEnv *env, JAWTDataHolder **ppJData, jboolean verbose); diff --git a/Win32VC6/GL4JavaJauGljJNI13/GL4JavaJauGljJNI13.dsp b/Win32VC6/GL4JavaJauGljJNI13/GL4JavaJauGljJNI13.dsp index bbcd9f8..d9c6dc3 100755 --- a/Win32VC6/GL4JavaJauGljJNI13/GL4JavaJauGljJNI13.dsp +++ b/Win32VC6/GL4JavaJauGljJNI13/GL4JavaJauGljJNI13.dsp @@ -1,122 +1,122 @@ -# Microsoft Developer Studio Project File - Name="GL4JavaJauGljJNI13" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** NICHT BEARBEITEN ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=GL4JavaJauGljJNI13 - Win32 Release -!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE -!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl -!MESSAGE -!MESSAGE NMAKE /f "GL4JavaJauGljJNI13.mak". -!MESSAGE -!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben -!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: -!MESSAGE -!MESSAGE NMAKE /f "GL4JavaJauGljJNI13.mak" CFG="GL4JavaJauGljJNI13 - Win32 Release" -!MESSAGE -!MESSAGE Für die Konfiguration stehen zur Auswahl: -!MESSAGE -!MESSAGE "GL4JavaJauGljJNI13 - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "../libs" -# PROP Intermediate_Dir "../temp" -# PROP Ignore_Export_Lib 0 -# 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:\jdk1.4\include" /I "d:\jdk1.4\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 -# 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" -# ADD RSC /l 0x407 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib jawt.lib /nologo /subsystem:windows /dll /machine:I386 /libpath:"d:\java2\lib" -# SUBTRACT LINK32 /pdb:none /debug -# Begin Target - -# Name "GL4JavaJauGljJNI13 - Win32 Release" -# Begin Source File - -SOURCE=..\..\CNativeCode\GLCallbackHelperJNI.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\glcaps.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\GLDrawableFactory_Win32_SunJDK13.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\glf.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\GLF_JNI12_funcs.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\gltool.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\GLUCallbackJNI.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\jawt_misc.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\jni12tools.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\OpenGL_JauJNI12_funcs.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\OpenGL_misc.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\OpenGL_Win32_common.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\OpenGL_Win32_jawt.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\OpenGLU_JauJNI12_funcs.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\Tool_JNI12_funcs.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\wgltool.c -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="GL4JavaJauGljJNI13" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=GL4JavaJauGljJNI13 - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "GL4JavaJauGljJNI13.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "GL4JavaJauGljJNI13.mak" CFG="GL4JavaJauGljJNI13 - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "GL4JavaJauGljJNI13 - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "../libs" +# PROP Intermediate_Dir "../temp" +# PROP Ignore_Export_Lib 0 +# 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:\jdk1.4\include" /I "d:\jdk1.4\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 +# 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" +# ADD RSC /l 0x407 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 /libpath:"d:\java2\lib" +# SUBTRACT LINK32 /pdb:none /debug +# Begin Target + +# Name "GL4JavaJauGljJNI13 - Win32 Release" +# Begin Source File + +SOURCE=..\..\CNativeCode\GLCallbackHelperJNI.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\glcaps.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\GLDrawableFactory_Win32_SunJDK13.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\glf.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\GLF_JNI12_funcs.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\gltool.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\GLUCallbackJNI.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\jawt_misc.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\jni12tools.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\OpenGL_JauJNI12_funcs.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\OpenGL_misc.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\OpenGL_Win32_common.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\OpenGL_Win32_jawt.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\OpenGLU_JauJNI12_funcs.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\Tool_JNI12_funcs.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\wgltool.c +# End Source File +# End Target +# End Project diff --git a/Win32VC6/GL4JavaJauGljJNI13nf/GL4JavaJauGljJNI13nf.dsp b/Win32VC6/GL4JavaJauGljJNI13nf/GL4JavaJauGljJNI13nf.dsp index ed9d5f0..7781467 100755 --- a/Win32VC6/GL4JavaJauGljJNI13nf/GL4JavaJauGljJNI13nf.dsp +++ b/Win32VC6/GL4JavaJauGljJNI13nf/GL4JavaJauGljJNI13nf.dsp @@ -1,123 +1,123 @@ -# Microsoft Developer Studio Project File - Name="GL4JavaJauGljJNI13nf" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** NICHT BEARBEITEN ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=GL4JavaJauGljJNI13nf - Win32 Release -!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE -!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl -!MESSAGE -!MESSAGE NMAKE /f "GL4JavaJauGljJNI13nf.mak". -!MESSAGE -!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben -!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: -!MESSAGE -!MESSAGE NMAKE /f "GL4JavaJauGljJNI13nf.mak" CFG="GL4JavaJauGljJNI13nf - Win32 Release" -!MESSAGE -!MESSAGE Für die Konfiguration stehen zur Auswahl: -!MESSAGE -!MESSAGE "GL4JavaJauGljJNI13nf - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "../libs" -# PROP Intermediate_Dir "../temp" -# PROP Ignore_Export_Lib 0 -# 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:\jdk1.4\include" /I "d:\jdk1.4\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 /YX -# 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" -# ADD RSC /l 0x407 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib jawt.lib /nologo /subsystem:windows /dll /machine:I386 /libpath:"d:\java2\lib" -# SUBTRACT LINK32 /pdb:none /incremental:yes -# Begin Target - -# Name "GL4JavaJauGljJNI13nf - Win32 Release" -# Begin Source File - -SOURCE=..\..\CNativeCode\GLCallbackHelperJNI.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\glcaps.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\GLDrawableFactory_Win32_SunJDK13.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\glf.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\GLF_JNI12_funcs.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\gltool.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\GLUCallbackJNI.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\jawt_misc.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\jni12tools.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\OpenGL_JauJNI12nf_funcs.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\OpenGL_misc.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\OpenGL_Win32_common.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\OpenGL_Win32_jawt.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\OpenGLU_JauJNI12nf_funcs.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\Tool_JNI12_funcs.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\wgltool.c -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="GL4JavaJauGljJNI13nf" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=GL4JavaJauGljJNI13nf - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "GL4JavaJauGljJNI13nf.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "GL4JavaJauGljJNI13nf.mak" CFG="GL4JavaJauGljJNI13nf - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "GL4JavaJauGljJNI13nf - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "../libs" +# PROP Intermediate_Dir "../temp" +# PROP Ignore_Export_Lib 0 +# 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:\jdk1.4\include" /I "d:\jdk1.4\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 /YX +# 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" +# ADD RSC /l 0x407 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 /libpath:"d:\java2\lib" +# SUBTRACT LINK32 /pdb:none /incremental:yes +# Begin Target + +# Name "GL4JavaJauGljJNI13nf - Win32 Release" +# Begin Source File + +SOURCE=..\..\CNativeCode\GLCallbackHelperJNI.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\glcaps.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\GLDrawableFactory_Win32_SunJDK13.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\glf.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\GLF_JNI12_funcs.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\gltool.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\GLUCallbackJNI.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\jawt_misc.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\jni12tools.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\OpenGL_JauJNI12nf_funcs.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\OpenGL_misc.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\OpenGL_Win32_common.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\OpenGL_Win32_jawt.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\OpenGLU_JauJNI12nf_funcs.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\Tool_JNI12_funcs.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\wgltool.c +# End Source File +# End Target +# End Project diff --git a/Win32VC6/GL4JavaJauGljJNI13tst/GL4JavaJauGljJNI13tst.dsp b/Win32VC6/GL4JavaJauGljJNI13tst/GL4JavaJauGljJNI13tst.dsp index 19206dd..bd64e42 100755 --- a/Win32VC6/GL4JavaJauGljJNI13tst/GL4JavaJauGljJNI13tst.dsp +++ b/Win32VC6/GL4JavaJauGljJNI13tst/GL4JavaJauGljJNI13tst.dsp @@ -1,123 +1,123 @@ -# Microsoft Developer Studio Project File - Name="GL4JavaJauGljJNI13tst" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** NICHT BEARBEITEN ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=GL4JavaJauGljJNI13tst - Win32 Release -!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE -!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl -!MESSAGE -!MESSAGE NMAKE /f "GL4JavaJauGljJNI13tst.mak". -!MESSAGE -!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben -!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: -!MESSAGE -!MESSAGE NMAKE /f "GL4JavaJauGljJNI13tst.mak" CFG="GL4JavaJauGljJNI13tst - Win32 Release" -!MESSAGE -!MESSAGE Für die Konfiguration stehen zur Auswahl: -!MESSAGE -!MESSAGE "GL4JavaJauGljJNI13tst - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "../libs" -# PROP Intermediate_Dir "../temp" -# PROP Ignore_Export_Lib 0 -# 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:\jdk1.4\include" /I "d:\jdk1.4\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 /YX -# 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" -# ADD RSC /l 0x407 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib jawt.lib /nologo /subsystem:windows /dll /machine:I386 /libpath:"d:\java2\lib" -# SUBTRACT LINK32 /pdb:none /incremental:yes /debug -# Begin Target - -# Name "GL4JavaJauGljJNI13tst - Win32 Release" -# Begin Source File - -SOURCE=..\..\CNativeCode\GLCallbackHelperJNI.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\glcaps.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\GLDrawableFactory_Win32_SunJDK13.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\glf.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\GLF_JNI12_funcs.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\gltool.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\GLUCallbackJNI.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\jawt_misc.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\jni12tools.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\OpenGL_JauJNI12_funcs.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\OpenGL_misc.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\OpenGL_Win32_common.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\OpenGL_Win32_jawt.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\OpenGLU_JauJNI12tst_funcs.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\Tool_JNI12_funcs.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\wgltool.c -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="GL4JavaJauGljJNI13tst" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=GL4JavaJauGljJNI13tst - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "GL4JavaJauGljJNI13tst.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "GL4JavaJauGljJNI13tst.mak" CFG="GL4JavaJauGljJNI13tst - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "GL4JavaJauGljJNI13tst - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "../libs" +# PROP Intermediate_Dir "../temp" +# PROP Ignore_Export_Lib 0 +# 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:\jdk1.4\include" /I "d:\jdk1.4\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 /YX +# 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" +# ADD RSC /l 0x407 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 /libpath:"d:\java2\lib" +# SUBTRACT LINK32 /pdb:none /incremental:yes /debug +# Begin Target + +# Name "GL4JavaJauGljJNI13tst - Win32 Release" +# Begin Source File + +SOURCE=..\..\CNativeCode\GLCallbackHelperJNI.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\glcaps.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\GLDrawableFactory_Win32_SunJDK13.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\glf.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\GLF_JNI12_funcs.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\gltool.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\GLUCallbackJNI.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\jawt_misc.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\jni12tools.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\OpenGL_JauJNI12_funcs.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\OpenGL_misc.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\OpenGL_Win32_common.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\OpenGL_Win32_jawt.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\OpenGLU_JauJNI12tst_funcs.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\Tool_JNI12_funcs.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\wgltool.c +# End Source File +# End Target +# End Project diff --git a/Win32VC6/GL4JavaJauGljJNI14/GL4JavaJauGljJNI14.dsp b/Win32VC6/GL4JavaJauGljJNI14/GL4JavaJauGljJNI14.dsp index 6aa8f95..abf71b1 100755 --- a/Win32VC6/GL4JavaJauGljJNI14/GL4JavaJauGljJNI14.dsp +++ b/Win32VC6/GL4JavaJauGljJNI14/GL4JavaJauGljJNI14.dsp @@ -1,127 +1,127 @@ -# Microsoft Developer Studio Project File - Name="GL4JavaJauGljJNI14" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** NICHT BEARBEITEN ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=GL4JavaJauGljJNI14 - Win32 Release -!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE -!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl -!MESSAGE -!MESSAGE NMAKE /f "GL4JavaJauGljJNI14.mak". -!MESSAGE -!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben -!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: -!MESSAGE -!MESSAGE NMAKE /f "GL4JavaJauGljJNI14.mak" CFG="GL4JavaJauGljJNI14 - Win32 Release" -!MESSAGE -!MESSAGE Für die Konfiguration stehen zur Auswahl: -!MESSAGE -!MESSAGE "GL4JavaJauGljJNI14 - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "../libs" -# PROP Intermediate_Dir "../temp" -# PROP Ignore_Export_Lib 0 -# 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:\jdk1.4\include" /I "d:\jdk1.4\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 /Fr -# 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" -# ADD RSC /l 0x407 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib jawt.lib /nologo /subsystem:windows /dll /machine:I386 -# SUBTRACT LINK32 /pdb:none /incremental:yes /debug -# Begin Target - -# Name "GL4JavaJauGljJNI14 - Win32 Release" -# Begin Source File - -SOURCE=..\..\CNativeCode\gl4java_utils_DirectBufferCleanup.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\GLCallbackHelperJNI.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\glcaps.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\GLDrawableFactory_Win32_SunJDK13.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\glf.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\GLF_JNI12_funcs.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\gltool.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\GLUCallbackJNI.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\jawt_misc.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\jni12tools.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\OpenGL_JauJNI14_funcs.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\OpenGL_misc.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\OpenGL_Win32_common.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\OpenGL_Win32_jawt.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\OpenGLU_JauJNI14_funcs.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\Tool_JNI12_funcs.c -# End Source File -# Begin Source File - -SOURCE=..\..\CNativeCode\wgltool.c -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="GL4JavaJauGljJNI14" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=GL4JavaJauGljJNI14 - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "GL4JavaJauGljJNI14.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "GL4JavaJauGljJNI14.mak" CFG="GL4JavaJauGljJNI14 - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "GL4JavaJauGljJNI14 - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "../libs" +# PROP Intermediate_Dir "../temp" +# PROP Ignore_Export_Lib 0 +# 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:\jdk1.4\include" /I "d:\jdk1.4\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 /Fr +# 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" +# ADD RSC /l 0x407 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 +# SUBTRACT LINK32 /pdb:none /incremental:yes /debug +# Begin Target + +# Name "GL4JavaJauGljJNI14 - Win32 Release" +# Begin Source File + +SOURCE=..\..\CNativeCode\gl4java_utils_DirectBufferCleanup.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\GLCallbackHelperJNI.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\glcaps.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\GLDrawableFactory_Win32_SunJDK13.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\glf.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\GLF_JNI12_funcs.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\gltool.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\GLUCallbackJNI.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\jawt_misc.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\jni12tools.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\OpenGL_JauJNI14_funcs.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\OpenGL_misc.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\OpenGL_Win32_common.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\OpenGL_Win32_jawt.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\OpenGLU_JauJNI14_funcs.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\Tool_JNI12_funcs.c +# End Source File +# Begin Source File + +SOURCE=..\..\CNativeCode\wgltool.c +# End Source File +# End Target +# End Project diff --git a/gl4java/GLContext.java.skel b/gl4java/GLContext.java.skel index 5ee7dc3..bec29b4 100644 --- a/gl4java/GLContext.java.skel +++ b/gl4java/GLContext.java.skel @@ -10,8 +10,10 @@ import gl4java.jau.awt.WinHandleAccess; import java.awt.*; import java.applet.Applet; import java.awt.event.*; +import java.io.*; import java.lang.reflect.*; import java.security.*; +import java.util.*; /** * The base manager class for the OpenGL language mapping for Java ! @@ -811,20 +813,6 @@ public class GLContext extends Object AccessController.doPrivileged(new PrivilegedAction() { public Object run() { - /* Try to load jawt.dll ahead of time to prevent - problems on Sun JDK 1.3 and greater. Loading the - version of the native library which uses JAWT - causes run-time link errors if jre/lib/ or - jre/bin are not in $PATH. A more clean solution - might be to explicitly look up the JAWT functions, - but that would require looking up the full path to - libjawt.so/jawt.dll, which is a pain as it's - automatically done by the JDK's libraries. */ - try { - System.loadLibrary("jawt"); - } catch (UnsatisfiedLinkError e) { - } - /* load libs */ int libNumber = 0; String _libName = null ; @@ -857,6 +845,12 @@ public class GLContext extends Object for(libNumber=0; libNumber