|
From: Elias N. <eli...@us...> - 2004-11-02 15:51:20
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29520/common Modified Files: common_tools.h extal.c extal.h extgl.c extgl.h Log Message: Index: common_tools.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/common_tools.h,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- common_tools.h 2 Nov 2004 15:09:40 -0000 1.27 +++ common_tools.h 2 Nov 2004 15:51:08 -0000 1.28 @@ -58,9 +58,11 @@ int attribs[ATTRIB_LIST_SIZE]; } attrib_list_t; -#ifndef _cplusplus +#ifndef __cplusplus +#ifndef bool typedef enum {false, true} bool; #endif +#endif #ifdef _WIN32 #define inline __inline Index: extal.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extal.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- extal.c 10 Sep 2004 09:56:26 -0000 1.15 +++ extal.c 2 Nov 2004 15:51:08 -0000 1.16 @@ -61,7 +61,7 @@ void* handleVorbisFile; void* handleOAL; #endif -#ifdef _AGL +#ifdef _MACOSX #include <mach-o/dyld.h> #include <stdlib.h> #include <string.h> @@ -83,7 +83,7 @@ #ifdef _X11 return dlsym(handleOAL, function); #endif -#ifdef _AGL +#ifdef _MACOSX char *mac_symbol_name = (char *)malloc((strlen(function) + 2)*sizeof(char)); if (mac_symbol_name == NULL) return NULL; @@ -182,7 +182,7 @@ closeVorbisLibs(); } #endif -#ifdef _AGL +#ifdef _MACOSX char *lib_str = concatenate(path_str, "openal.dylib"); handleOAL = NSAddImage(lib_str, NSADDIMAGE_OPTION_RETURN_ON_ERROR); free(lib_str); @@ -211,7 +211,7 @@ } closeVorbisLibs(); #endif -#ifdef _AGL +#ifdef _MACOSX // Cannot remove the image #endif } Index: extgl.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extgl.h,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- extgl.h 4 Jul 2004 09:13:17 -0000 1.42 +++ extgl.h 2 Nov 2004 15:51:08 -0000 1.43 @@ -123,15 +123,15 @@ typedef double GLclampd; typedef void GLvoid; -#ifdef _AGL +#ifdef _MACOSX #include <Carbon/Carbon.h> #include <OpenGL/gliContext.h> #include <OpenGL/gliDispatch.h> #include <AGL/aglContext.h> -typedef struct __AGLRendererInfoRec *AGLRendererInfo; -typedef struct __AGLPixelFormatRec *AGLPixelFormat; -typedef struct __AGLContextRec *AGLContext; +typedef struct __MACOSXRendererInfoRec *AGLRendererInfo; +typedef struct __MACOSXPixelFormatRec *AGLPixelFormat; +typedef struct __MACOSXContextRec *AGLContext; typedef GDHandle AGLDevice; typedef CGrafPtr AGLDrawable; @@ -392,7 +392,7 @@ /************************************************************************/ -#endif /* _AGL */ +#endif /* _MACOSX */ #define GL_VERSION 0x1F02 #define GL_EXTENSIONS 0x1F03 @@ -434,7 +434,7 @@ /* initializes everything, call this right after the rc is created. the function returns 0 if successful */ extern bool extgl_Open(void); -#ifdef _AGL +#ifdef _MACOSX extern bool extgl_InitAGL(JNIEnv *env); #endif extern void extgl_Close(void); Index: extgl.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extgl.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- extgl.c 10 Sep 2004 08:13:47 -0000 1.25 +++ extgl.c 2 Nov 2004 15:51:08 -0000 1.26 @@ -49,7 +49,7 @@ #include <dlfcn.h> #endif -#ifdef _AGL +#ifdef _MACOSX aglChoosePixelFormatPROC aglChoosePixelFormat = NULL; aglDestroyPixelFormatPROC aglDestroyPixelFormat = NULL; aglNextPixelFormatPROC aglNextPixelFormat = NULL; @@ -100,9 +100,9 @@ static glXGetProcAddressARBPROC glXGetProcAddressARB; #endif -#ifdef _AGL +#ifdef _MACOSX CFBundleRef opengl_bundle_ref = NULL; -CFBundleRef agl_bundle_ref = NULL; +//CFBundleRef agl_bundle_ref = NULL; #endif /* getProcAddress */ @@ -135,14 +135,14 @@ return t; #endif -#ifdef _AGL +#ifdef _MACOSX CFStringRef str = CFStringCreateWithCStringNoCopy(NULL, name, kCFStringEncodingUTF8, kCFAllocatorNull); void *func_pointer = CFBundleGetFunctionPointerForName(opengl_bundle_ref, str); if (func_pointer == NULL) { - func_pointer = CFBundleGetFunctionPointerForName(agl_bundle_ref, str); - if (func_pointer == NULL) { +/* func_pointer = CFBundleGetFunctionPointerForName(agl_bundle_ref, str); + if (func_pointer == NULL) {*/ printfDebug("Could not locate symbol %s\n", name); - } +// } } CFRelease(str); return func_pointer; @@ -157,7 +157,7 @@ return ext_InitializeFunctions(&extgl_GetProcAddress, num_functions, functions); } -#ifdef _AGL +#ifdef _MACOSX // ------------------------- static CFBundleRef loadBundle(const Str255 frameworkName) { @@ -267,7 +267,7 @@ /*-----------------------------------------------------*/ /* AGL stuff BEGIN*/ /*-----------------------------------------------------*/ -#ifdef _AGL +#ifdef _MACOSX bool extgl_InitAGL(JNIEnv *env) { @@ -312,18 +312,18 @@ /* AGL stuff END*/ /*-----------------------------------------------------*/ -#ifdef _AGL +#ifdef _MACOSX bool extgl_Open(void) { if (opengl_bundle_ref != NULL) return true; opengl_bundle_ref = loadBundle("\pOpenGL.framework"); if (opengl_bundle_ref == NULL) return false; - agl_bundle_ref = loadBundle("\pAGL.framework"); +/* agl_bundle_ref = loadBundle("\pAGL.framework"); if (agl_bundle_ref == NULL) { aglUnloadFramework(opengl_bundle_ref); return false; - } + }*/ return true; } #endif @@ -371,9 +371,9 @@ FreeLibrary(lib_gl_handle); lib_gl_handle = NULL; #endif -#ifdef _AGL +#ifdef _MACOSX aglUnloadFramework(opengl_bundle_ref); - aglUnloadFramework(agl_bundle_ref); +// aglUnloadFramework(agl_bundle_ref); opengl_bundle_ref = NULL; #endif } Index: extal.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extal.h,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- extal.h 10 Sep 2004 09:56:26 -0000 1.28 +++ extal.h 2 Nov 2004 15:51:08 -0000 1.29 @@ -45,7 +45,7 @@ #include <altypes.h> #include <alctypes.h> #endif -#ifdef _AGL +#ifdef _MACOSX #include <OpenAL/alctypes.h> #include <OpenAL/altypes.h> #endif @@ -71,8 +71,8 @@ #define ALCAPIENTRY __cdecl #else - #ifdef _AGL - #if _AGL + #ifdef _MACOSX + #if _MACOSX typedef struct ALCdevice_struct ALCdevice; typedef struct ALCcontext_struct ALCcontext; |