Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3546/src/native/common Modified Files: extal.cpp extal.h extgl.cpp extgl.h org_lwjgl_openal_AL10.cpp org_lwjgl_openal_ALC.cpp Log Message: Fixed win32 building Index: extal.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extal.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- extal.cpp 9 Mar 2004 11:03:08 -0000 1.17 +++ extal.cpp 10 Mar 2004 08:42:39 -0000 1.18 @@ -68,6 +68,8 @@ const struct mach_header* handleOAL; #endif +alGetProcAddressPROC alGetProcAddress; + /* Loads OpenAL */ static bool LoadOpenAL(JNIEnv *env, jobjectArray oalPaths); @@ -230,21 +232,29 @@ if (!LoadOpenAL(env, oalPaths)) { return; } - + alGetProcAddress = (alGetProcAddressPROC)extal_GetProcAddress("alGetProcAddress"); + if (alGetProcAddress == NULL) { + DeInitializeOpenAL(); + throwOpenALException(env, "Could not load alGetProcAddress function pointer."); + return; + } //load basic OpenAL functions if(!LoadAL(env)) { + DeInitializeOpenAL(); throwOpenALException(env, "Could not load OpenAL function pointers."); return; } //load OpenAL context functions if(!LoadALC(env)) { + DeInitializeOpenAL(); throwOpenALException(env, "Could not load ALC function pointers."); return; } //load OpenAL extensions if(!LoadALExtensions()) { + DeInitializeOpenAL(); throwOpenALException(env, "Could not load AL extension function pointers."); return; } Index: extal.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extal.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- extal.h 9 Mar 2004 11:03:09 -0000 1.24 +++ extal.h 10 Mar 2004 08:42:39 -0000 1.25 @@ -154,7 +154,20 @@ #endif typedef ALvoid (ALAPIENTRY *alEnablePROC)( ALenum capability ); +typedef ALboolean (ALAPIENTRY *alIsExtensionPresentPROC)( ALubyte* fname ); +typedef ALvoid* (ALAPIENTRY *alGetProcAddressPROC)( ALubyte* fname ); +typedef ALubyte* (ALAPIENTRY *alGetStringPROC)( ALenum param ); +typedef ALenum (ALAPIENTRY *alGetErrorPROC)( ALvoid ); + extern alEnablePROC alEnable; +extern alIsExtensionPresentPROC alIsExtensionPresent; +extern alGetProcAddressPROC alGetProcAddress; +extern alGetStringPROC alGetString; +extern alGetErrorPROC alGetError; + +typedef ALCcontext* (ALCAPIENTRY *alcGetCurrentContextPROC)(ALCvoid); +extern alcGetCurrentContextPROC alcGetCurrentContext; + #ifdef __cplusplus } #endif Index: extgl.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extgl.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- extgl.cpp 9 Mar 2004 11:09:22 -0000 1.30 +++ extgl.cpp 10 Mar 2004 08:42:39 -0000 1.31 @@ -140,11 +140,11 @@ /* WGL_ARB_buffer_region */ -wglCreateBufferRegionARBPROC wglCreateBufferRegionARB = NULL; +/*wglCreateBufferRegionARBPROC wglCreateBufferRegionARB = NULL; wglDeleteBufferRegionARBPROC wglDeleteBufferRegionARB = NULL; wglSaveBufferRegionARBPROC wglSaveBufferRegionARB = NULL; wglRestoreBufferRegionARBPROC wglRestoreBufferRegionARB = NULL; - +*/ /* WGL_ARB_extension_string */ @@ -393,7 +393,7 @@ return QueryExtension(env, NULL, extensions, name); } -static void extgl_InitWGLARBBufferRegion(JNIEnv *env) +/*static void extgl_InitWGLARBBufferRegion(JNIEnv *env) { if (!extgl_Extensions.WGL_ARB_buffer_region) return; @@ -404,7 +404,7 @@ EXTGL_SANITY_CHECK(env, WGL_ARB_buffer_region); } - +*/ static void extgl_InitWGLARBPbuffer(JNIEnv *env) { if (!extgl_Extensions.WGL_ARB_pbuffer) @@ -488,7 +488,7 @@ extgl_InitWGLARBRenderTexture(env); extgl_InitWGLARBPixelFormat(env); extgl_InitWGLARBPbuffer(env); - extgl_InitWGLARBBufferRegion(env); + //extgl_InitWGLARBBufferRegion(env); } #endif /* WIN32 */ Index: extgl.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extgl.h,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- extgl.h 9 Mar 2004 11:09:23 -0000 1.32 +++ extgl.h 10 Mar 2004 08:42:39 -0000 1.33 @@ -2135,12 +2135,12 @@ /*------------WGL_ARB_BUFFER_REGION----------------------------------*/ /*-------------------------------------------------------------------*/ -#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001 +/*#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001 #define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002 #define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004 #define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008 -/*typedef HANDLE (APIENTRY * wglCreateBufferRegionARBPROC) (HDC hDC, int iLayerPlane, UINT uType); +typedef HANDLE (APIENTRY * wglCreateBufferRegionARBPROC) (HDC hDC, int iLayerPlane, UINT uType); typedef VOID (APIENTRY * wglDeleteBufferRegionARBPROC) (HANDLE hRegion); typedef BOOL (APIENTRY * wglSaveBufferRegionARBPROC) (HANDLE hRegion, int x, int y, int width, int height); typedef BOOL (APIENTRY * wglRestoreBufferRegionARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc); Index: org_lwjgl_openal_AL10.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_AL10.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- org_lwjgl_openal_AL10.cpp 9 Mar 2004 11:03:10 -0000 1.2 +++ org_lwjgl_openal_AL10.cpp 10 Mar 2004 08:42:40 -0000 1.3 @@ -54,10 +54,6 @@ //typedef ALvoid (ALAPIENTRY *alGetBooleanvPROC)( ALenum param, ALboolean* data ); typedef ALvoid (ALAPIENTRY *alGetIntegervPROC)( ALenum param, ALint* data ); typedef ALvoid (ALAPIENTRY *alGetFloatvPROC)( ALenum param, ALfloat* data ); -typedef ALubyte* (ALAPIENTRY *alGetStringPROC)( ALenum param ); -typedef ALenum (ALAPIENTRY *alGetErrorPROC)( ALvoid ); -typedef ALboolean (ALAPIENTRY *alIsExtensionPresentPROC)( ALubyte* fname ); -//typedef ALvoid* (ALAPIENTRY *alGetProcAddressPROC)( ALubyte* fname ); typedef ALenum (ALAPIENTRY *alGetEnumValuePROC)( ALubyte* ename ); typedef ALvoid (ALAPIENTRY *alListeneriPROC)( ALenum param, ALint value ); typedef ALvoid (ALAPIENTRY *alListenerfPROC)( ALenum param, ALfloat value ); @@ -102,6 +98,9 @@ typedef ALvoid (ALAPIENTRY *alDopplerFactorPROC)( ALfloat value ); typedef ALvoid (ALAPIENTRY *alDopplerVelocityPROC)( ALfloat value ); +alIsExtensionPresentPROC alIsExtensionPresent; +alGetStringPROC alGetString; +alGetErrorPROC alGetError; alEnablePROC alEnable; static alDisablePROC alDisable; @@ -113,10 +112,6 @@ //static alGetBooleanvPROC alGetBooleanv; static alGetIntegervPROC alGetIntegerv; static alGetFloatvPROC alGetFloatv; -static alGetStringPROC alGetString; -static alGetErrorPROC alGetError; -static alIsExtensionPresentPROC alIsExtensionPresent; -//static alGetProcAddressPROC alGetProcAddress; static alGetEnumValuePROC alGetEnumValue; static alListeneriPROC alListeneri; static alListenerfPROC alListenerf; Index: org_lwjgl_openal_ALC.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_ALC.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- org_lwjgl_openal_ALC.cpp 9 Mar 2004 11:03:10 -0000 1.13 +++ org_lwjgl_openal_ALC.cpp 10 Mar 2004 08:42:40 -0000 1.14 @@ -51,7 +51,6 @@ typedef ALCcontext* (ALCAPIENTRY *alcCreateContextPROC)(ALCdevice *device,ALCint *attrList); typedef ALCboolean (ALCAPIENTRY *alcMakeContextCurrentPROC)(ALCcontext *context); typedef ALCvoid (ALCAPIENTRY *alcProcessContextPROC)(ALCcontext *context); -typedef ALCcontext* (ALCAPIENTRY *alcGetCurrentContextPROC)(ALCvoid); typedef ALCdevice* (ALCAPIENTRY *alcGetContextsDevicePROC)(ALCcontext *context); typedef ALCvoid (ALCAPIENTRY *alcSuspendContextPROC)(ALCcontext *context); typedef ALCvoid (ALCAPIENTRY *alcDestroyContextPROC)(ALCcontext *context); @@ -60,6 +59,7 @@ //typedef ALCvoid* (ALCAPIENTRY *alcGetProcAddressPROC)(ALCdevice *device,ALCubyte *funcName); typedef ALCenum (ALCAPIENTRY *alcGetEnumValuePROC)(ALCdevice *device,ALCubyte *enumName); +alcGetCurrentContextPROC alcGetCurrentContext; static alcGetStringPROC alcGetString; static alcGetIntegervPROC alcGetIntegerv; static alcOpenDevicePROC alcOpenDevice; @@ -67,7 +67,6 @@ static alcCreateContextPROC alcCreateContext; static alcMakeContextCurrentPROC alcMakeContextCurrent; static alcProcessContextPROC alcProcessContext; -static alcGetCurrentContextPROC alcGetCurrentContext; static alcGetContextsDevicePROC alcGetContextsDevice; static alcSuspendContextPROC alcSuspendContext; static alcDestroyContextPROC alcDestroyContext; |