You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(134) |
Sep
(52) |
Oct
(13) |
Nov
(342) |
Dec
(163) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(44) |
Feb
(62) |
Mar
(158) |
Apr
(38) |
May
(70) |
Jun
(58) |
Jul
(104) |
Aug
(207) |
Sep
(83) |
Oct
(122) |
Nov
(23) |
Dec
(49) |
2004 |
Jan
(119) |
Feb
(132) |
Mar
(192) |
Apr
(140) |
May
(77) |
Jun
(74) |
Jul
(201) |
Aug
(63) |
Sep
(102) |
Oct
(70) |
Nov
(173) |
Dec
(78) |
2005 |
Jan
(174) |
Feb
(197) |
Mar
(105) |
Apr
(59) |
May
(77) |
Jun
(43) |
Jul
(21) |
Aug
(18) |
Sep
(47) |
Oct
(37) |
Nov
(74) |
Dec
(50) |
2006 |
Jan
(44) |
Feb
(19) |
Mar
(32) |
Apr
(24) |
May
(31) |
Jun
(55) |
Jul
(138) |
Aug
(28) |
Sep
(12) |
Oct
(41) |
Nov
(58) |
Dec
(24) |
2007 |
Jan
(28) |
Feb
(14) |
Mar
(10) |
Apr
(68) |
May
(30) |
Jun
(26) |
Jul
(18) |
Aug
(63) |
Sep
(19) |
Oct
(29) |
Nov
(20) |
Dec
(10) |
2008 |
Jan
(38) |
Feb
(7) |
Mar
(37) |
Apr
(120) |
May
(41) |
Jun
(36) |
Jul
(39) |
Aug
(24) |
Sep
(28) |
Oct
(30) |
Nov
(36) |
Dec
(75) |
2009 |
Jan
(46) |
Feb
(22) |
Mar
(50) |
Apr
(70) |
May
(134) |
Jun
(105) |
Jul
(75) |
Aug
(34) |
Sep
(38) |
Oct
(34) |
Nov
(19) |
Dec
(20) |
2010 |
Jan
(11) |
Feb
(20) |
Mar
(65) |
Apr
(83) |
May
(104) |
Jun
(73) |
Jul
(78) |
Aug
(57) |
Sep
(43) |
Oct
(35) |
Nov
(9) |
Dec
(4) |
2011 |
Jan
(21) |
Feb
(11) |
Mar
(18) |
Apr
(10) |
May
(18) |
Jun
(15) |
Jul
(48) |
Aug
(25) |
Sep
(17) |
Oct
(45) |
Nov
(15) |
Dec
(12) |
2012 |
Jan
(21) |
Feb
(9) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
(12) |
Oct
(1) |
Nov
(28) |
Dec
(5) |
2013 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Brian M. <ma...@us...> - 2002-12-14 12:49:20
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv18887 Modified Files: checkALerror.h extal.c extal.h org_lwjgl_openal_ALC.cpp org_lwjgl_openal_ALUT.cpp org_lwjgl_openal_ALUT.h org_lwjgl_openal_BaseAL.cpp org_lwjgl_openal_CoreAL.cpp org_lwjgl_openal_eax_CoreEAX.cpp Log Message: dynamic loading of openal Index: checkALerror.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/checkALerror.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/checkALerror.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- checkALerror.h 28 Nov 2002 22:06:37 -0000 1.5 +++ checkALerror.h 14 Dec 2002 12:49:16 -0000 1.6 @@ -13,7 +13,7 @@ #ifdef _DEBUG #include <jni.h> -#include <AL/al.h> +#include "extal.h" #define CHECK_AL_ERROR \ { \ Index: extal.c CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/extal.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extal.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- extal.c 27 Nov 2002 02:34:58 -0000 1.2 +++ extal.c 14 Dec 2002 12:49:16 -0000 1.3 @@ -29,6 +29,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #include "extal.h" /** @@ -39,3 +40,347 @@ * @author Brian Matzon <br...@ma...> * @version $Revision$ */ +alEnablePROC alEnable = NULL; +alDisablePROC alDisable = NULL; +alIsEnabledPROC alIsEnabled = NULL; +alHintPROC alHint = NULL; +alGetBooleanPROC alGetBoolean = NULL; +alGetIntegerPROC alGetInteger = NULL; +alGetFloatPROC alGetFloat = NULL; +alGetDoublePROC alGetDouble = NULL; +alGetBooleanvPROC alGetBooleanv = NULL; +alGetIntegervPROC alGetIntegerv = NULL; +alGetFloatvPROC alGetFloatv = NULL; +alGetDoublevPROC alGetDoublev = NULL; +alGetStringPROC alGetString = NULL; +alGetErrorPROC alGetError = NULL; +alIsExtensionPresentPROC alIsExtensionPresent = NULL; +alGetProcAddressPROC alGetProcAddress = NULL; +alGetEnumValuePROC alGetEnumValue = NULL; +alListeneriPROC alListeneri = NULL; +alListenerfPROC alListenerf = NULL; +alListener3fPROC alListener3f = NULL; +alListenerfvPROC alListenerfv = NULL; +alGetListeneriPROC alGetListeneri = NULL; +alGetListenerfPROC alGetListenerf = NULL; +alGetListener3fPROC alGetListener3f = NULL; +alGetListenerfvPROC alGetListenerfv = NULL; +alGenSourcesPROC alGenSources = NULL; +alDeleteSourcesPROC alDeleteSources = NULL; +alIsSourcePROC alIsSource = NULL; +alSourceiPROC alSourcei = NULL; +alSourcefPROC alSourcef = NULL; +alSource3fPROC alSource3f = NULL; +alSourcefvPROC alSourcefv = NULL; +alGetSourceiPROC alGetSourcei = NULL; +alGetSourcefPROC alGetSourcef = NULL; +alGetSource3fPROC alGetSource3f = NULL; +alGetSourcefvPROC alGetSourcefv = NULL; +alSourcePlayvPROC alSourcePlayv = NULL; +alSourcePausevPROC alSourcePausev = NULL; +alSourceStopvPROC alSourceStopv = NULL; +alSourceRewindvPROC alSourceRewindv = NULL; +alSourcePlayPROC alSourcePlay = NULL; +alSourcePausePROC alSourcePause = NULL; +alSourceStopPROC alSourceStop = NULL; +alSourceRewindPROC alSourceRewind = NULL; +alGenBuffersPROC alGenBuffers = NULL; +alDeleteBuffersPROC alDeleteBuffers = NULL; +alIsBufferPROC alIsBuffer = NULL; +alBufferDataPROC alBufferData = NULL; +alGetBufferiPROC alGetBufferi = NULL; +alGetBufferfPROC alGetBufferf = NULL; +alSourceQueueBuffersPROC alSourceQueueBuffers = NULL; +alSourceUnqueueBuffersPROC alSourceUnqueueBuffers = NULL; +alDistanceModelPROC alDistanceModel = NULL; +alDopplerFactorPROC alDopplerFactor = NULL; +alDopplerVelocityPROC alDopplerVelocity = NULL; +alcGetStringPROC alcGetString = NULL; +alcGetIntegervPROC alcGetIntegerv = NULL; +alcOpenDevicePROC alcOpenDevice = NULL; +alcCloseDevicePROC alcCloseDevice = NULL; +alcCreateContextPROC alcCreateContext = NULL; +alcMakeContextCurrentPROC alcMakeContextCurrent = NULL; +alcProcessContextPROC alcProcessContext = NULL; +alcGetCurrentContextPROC alcGetCurrentContext = NULL; +alcGetContextsDevicePROC alcGetContextsDevice = NULL; +alcSuspendContextPROC alcSuspendContext = NULL; +alcDestroyContextPROC alcDestroyContext = NULL; +alcGetErrorPROC alcGetError = NULL; +alcIsExtensionPresentPROC alcIsExtensionPresent = NULL; +alcGetProcAddressPROC alcGetProcAddress = NULL; +alcGetEnumValuePROC alcGetEnumValue = NULL; + +EAXSet eaxSet; // EAXSet function, ret$ +EAXGet eaxGet; // EAXGet function, ret$ + +/* Handle to OpenAL Library */ +#ifdef WIN32 +HMODULE handleOAL; +#else +void* handleOAL; +#endif + +/* Loads OpenAL */ +void LoadOpenAL(); + +/* Unloads OpenAL */ +void UnLoadOpenAL(); + +/* Gets a pointer to the named function */ +void* GetFunctionPointer(const char* function); + +/* Loads OpenAL basic functions */ +int LoadAL(); + +/* Loads OpenAL ALC functions */ +int LoadALC(); + +/* Loads any extensions to OpenAL */ +int LoadALExtensions(); + +/** + * Retrieves a pointer to the named function + * + * @param function Name of function + * @return pointer to named function, or NULL if not found + */ +void* GetFunctionPointer(const char* function) { +#ifdef _WIN32 + return GetProcAddress(handleOAL, function); +#else + return NULL; +#endif +} + +/** + * Loads the OpenAL Library + */ +void LoadOpenAL() { +#ifdef _WIN32 + handleOAL = LoadLibrary("OpenAL32.dll"); +#else + handleOAL = NULL; +#endif +} + +/** + * Unloads the OpenAL Library + */ +void UnLoadOpenAL() { +#ifdef _WIN32 + FreeLibrary(handleOAL); +#else + dlclose(handleOAL); +#endif +} + +/** + * Initializes OpenAL by loading the library + */ +int InitializeOpenAL() { + if(handleOAL != 0) { + return 1; + } + + //load our library + LoadOpenAL(); + + // if we couldn't load the library, get out + if(handleOAL == 0) { + return 0; + } + + //load basic OpenAL functions + if(!LoadAL()) { + return 0; + } + + //load OpenAL context functions + if(!LoadALC()) { + return 0; + } + + //load OpenAL extensions + if(!LoadALExtensions()) { + return 0; + } + + return 1; +} + +/** + * Called to deinitialize OpenAL + */ +void DeInitializeOpenAL() { + UnLoadOpenAL(); +} + +/** + * Loads the basic OpenAL functions + * + * @return true if all methods were loaded, false if one of the methods could not be loaded + */ +int LoadAL() { + alEnable = (alEnablePROC) GetFunctionPointer("alEnable"); + alDisable = (alDisablePROC) GetFunctionPointer("alDisable"); + alIsEnabled = (alIsEnabledPROC) GetFunctionPointer("alIsEnabled"); + //alHint = (alHintPROC) GetFunctionPointer("alHint"); + alGetBoolean = (alGetBooleanPROC) GetFunctionPointer("alGetBoolean"); + alGetInteger = (alGetIntegerPROC) GetFunctionPointer("alGetInteger"); + alGetFloat = (alGetFloatPROC) GetFunctionPointer("alGetFloat"); + alGetDouble = (alGetDoublePROC) GetFunctionPointer("alGetDouble"); + alGetBooleanv = (alGetBooleanvPROC) GetFunctionPointer("alGetBooleanv"); + alGetIntegerv = (alGetIntegervPROC) GetFunctionPointer("alGetIntegerv"); + alGetFloatv = (alGetFloatvPROC) GetFunctionPointer("alGetFloatv"); + alGetDoublev = (alGetDoublevPROC) GetFunctionPointer("alGetDoublev"); + alGetString = (alGetStringPROC) GetFunctionPointer("alGetString"); + alGetError = (alGetErrorPROC) GetFunctionPointer("alGetError"); + alIsExtensionPresent = (alIsExtensionPresentPROC) GetFunctionPointer("alIsExtensionPresent"); + alGetProcAddress = (alGetProcAddressPROC) GetFunctionPointer("alGetProcAddress"); + alGetEnumValue = (alGetEnumValuePROC) GetFunctionPointer("alGetEnumValue"); + alListeneri = (alListeneriPROC) GetFunctionPointer("alListeneri"); + alListenerf = (alListenerfPROC) GetFunctionPointer("alListenerf"); + alListener3f = (alListener3fPROC) GetFunctionPointer("alListener3f"); + alListenerfv = (alListenerfvPROC) GetFunctionPointer("alListenerfv"); + alGetListeneri = (alGetListeneriPROC) GetFunctionPointer("alGetListeneri"); + alGetListenerf = (alGetListenerfPROC) GetFunctionPointer("alGetListenerf"); + alGetListener3f = (alGetListener3fPROC) GetFunctionPointer("alGetListener3f"); + alGetListenerfv = (alGetListenerfvPROC) GetFunctionPointer("alGetListenerfv"); + alGenSources = (alGenSourcesPROC) GetFunctionPointer("alGenSources"); + alDeleteSources = (alDeleteSourcesPROC) GetFunctionPointer("alDeleteSources"); + alIsSource = (alIsSourcePROC) GetFunctionPointer("alIsSource"); + alSourcei = (alSourceiPROC) GetFunctionPointer("alSourcei"); + alSourcef = (alSourcefPROC) GetFunctionPointer("alSourcef"); + alSource3f = (alSource3fPROC) GetFunctionPointer("alSource3f"); + alSourcefv = (alSourcefvPROC) GetFunctionPointer("alSourcefv"); + alGetSourcei = (alGetSourceiPROC) GetFunctionPointer("alGetSourcei"); + alGetSourcef = (alGetSourcefPROC) GetFunctionPointer("alGetSourcef"); + alGetSource3f = (alGetSource3fPROC) GetFunctionPointer("alGetSource3f"); + alGetSourcefv = (alGetSourcefvPROC) GetFunctionPointer("alGetSourcefv"); + alSourcePlayv = (alSourcePlayvPROC) GetFunctionPointer("alSourcePlayv"); + alSourcePausev = (alSourcePausevPROC) GetFunctionPointer("alSourcePausev"); + alSourceStopv = (alSourceStopvPROC) GetFunctionPointer("alSourceStopv"); + alSourceRewindv = (alSourceRewindvPROC) GetFunctionPointer("alSourceRewindv"); + alSourcePlay = (alSourcePlayPROC) GetFunctionPointer("alSourcePlay"); + alSourcePause = (alSourcePausePROC) GetFunctionPointer("alSourcePause"); + alSourceStop = (alSourceStopPROC) GetFunctionPointer("alSourceStop"); + alSourceRewind = (alSourceRewindPROC) GetFunctionPointer("alSourceRewind"); + alGenBuffers = (alGenBuffersPROC) GetFunctionPointer("alGenBuffers"); + alDeleteBuffers = (alDeleteBuffersPROC) GetFunctionPointer("alDeleteBuffers"); + alIsBuffer = (alIsBufferPROC) GetFunctionPointer("alIsBuffer"); + alBufferData = (alBufferDataPROC) GetFunctionPointer("alBufferData"); + alGetBufferi = (alGetBufferiPROC) GetFunctionPointer("alGetBufferi"); + alGetBufferf = (alGetBufferfPROC) GetFunctionPointer("alGetBufferf"); + alSourceQueueBuffers = (alSourceQueueBuffersPROC) GetFunctionPointer("alSourceQueueBuffers"); + alSourceUnqueueBuffers = (alSourceUnqueueBuffersPROC) GetFunctionPointer("alSourceUnqueueBuffers"); + alDistanceModel = (alDistanceModelPROC) GetFunctionPointer("alDistanceModel"); + alDopplerFactor = (alDopplerFactorPROC) GetFunctionPointer("alDopplerFactor"); + alDopplerVelocity = (alDopplerVelocityPROC) GetFunctionPointer("alDopplerVelocity"); + + return + alEnable != NULL && + alDisable != NULL && + alIsEnabled != NULL && + //alHint != NULL && + alGetBoolean != NULL && + alGetInteger != NULL && + alGetFloat != NULL && + alGetDouble != NULL && + alGetBooleanv != NULL && + alGetIntegerv != NULL && + alGetFloatv != NULL && + alGetDoublev != NULL && + alGetString != NULL && + alGetError != NULL && + alIsExtensionPresent != NULL && + alGetProcAddress != NULL && + alGetEnumValue != NULL && + alListeneri != NULL && + alListenerf != NULL && + alListener3f != NULL && + alListenerfv != NULL && + alGetListeneri != NULL && + alGetListenerf != NULL && + alGetListener3f != NULL && + alGetListenerfv != NULL && + alGenSources != NULL && + alDeleteSources != NULL && + alIsSource != NULL && + alSourcei != NULL && + alSourcef != NULL && + alSource3f != NULL && + alSourcefv != NULL && + alGetSourcei != NULL && + alGetSourcef != NULL && + alGetSource3f != NULL && + alGetSourcefv != NULL && + alSourcePlayv != NULL && + alSourcePausev != NULL && + alSourceStopv != NULL && + alSourceRewindv != NULL && + alSourcePlay != NULL && + alSourcePause != NULL && + alSourceStop != NULL && + alSourceRewind != NULL && + alGenBuffers != NULL && + alDeleteBuffers != NULL && + alIsBuffer != NULL && + alBufferData != NULL && + alGetBufferi != NULL && + alGetBufferf != NULL && + alSourceQueueBuffers != NULL && + alSourceUnqueueBuffers != NULL && + alDistanceModel != NULL && + alDopplerFactor != NULL && + alDopplerVelocity != NULL; +} + +/** + * Loads the context OpenAL functions + * + * @return true if all methods were loaded, false if one of the methods could not be loaded + */ +int LoadALC() { + alcGetString = (alcGetStringPROC) GetFunctionPointer("alcGetString"); + alcGetIntegerv = (alcGetIntegervPROC) GetFunctionPointer("alcGetIntegerv"); + alcOpenDevice = (alcOpenDevicePROC) GetFunctionPointer("alcOpenDevice"); + alcCloseDevice = (alcCloseDevicePROC) GetFunctionPointer("alcCloseDevice"); + alcCreateContext = (alcCreateContextPROC) GetFunctionPointer("alcCreateContext"); + alcMakeContextCurrent = (alcMakeContextCurrentPROC) GetFunctionPointer("alcMakeContextCurrent"); + alcProcessContext = (alcProcessContextPROC) GetFunctionPointer("alcProcessContext"); + alcGetCurrentContext = (alcGetCurrentContextPROC) GetFunctionPointer("alcGetCurrentContext"); + alcGetContextsDevice = (alcGetContextsDevicePROC) GetFunctionPointer("alcGetContextsDevice"); + alcSuspendContext = (alcSuspendContextPROC) GetFunctionPointer("alcSuspendContext"); + alcDestroyContext = (alcDestroyContextPROC) GetFunctionPointer("alcDestroyContext"); + alcGetError = (alcGetErrorPROC) GetFunctionPointer("alcGetError"); + alcIsExtensionPresent = (alcIsExtensionPresentPROC) GetFunctionPointer("alcIsExtensionPresent"); + alcGetProcAddress = (alcGetProcAddressPROC) GetFunctionPointer("alcGetProcAddress"); + alcGetEnumValue = (alcGetEnumValuePROC) GetFunctionPointer("alcGetEnumValue"); + + return + alcGetString != NULL && + alcGetIntegerv != NULL && + alcOpenDevice != NULL && + alcCloseDevice != NULL && + alcCreateContext != NULL && + alcMakeContextCurrent != NULL && + alcProcessContext != NULL && + alcGetCurrentContext != NULL && + alcGetContextsDevice != NULL && + alcSuspendContext != NULL && + alcDestroyContext != NULL && + alcGetError != NULL && + alcIsExtensionPresent != NULL && + alcGetProcAddress != NULL && + alcGetEnumValue != NULL; +} + +/** + * Loads the OpenAL extensions functions + * + * @return true if all methods were loaded, false if one of the methods could not be loaded + */ +int LoadALExtensions() { + return 1; +} \ No newline at end of file Index: extal.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/extal.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extal.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- extal.h 28 Nov 2002 19:36:09 -0000 1.8 +++ extal.h 14 Dec 2002 12:49:16 -0000 1.9 @@ -32,21 +32,234 @@ #ifndef _AL_TEST_H #define _AL_TEST_H -#ifdef _WIN32 -#define INITGUID -#define OPENAL #include <windows.h> -#include <AL/al.h> -#include <AL/alc.h> -#include <AL/alut.h> -#include <eax.h> +#include <AL/altypes.h> +#include <AL/alctypes.h> -EAXSet eaxSet; // EAXSet function, ret$ -EAXGet eaxGet; // EAXGet function, ret$ +#ifdef __cplusplus +extern "C" { +#endif + +#define ALUTAPI +#define ALUTAPIENTRY __cdecl + +#ifdef _WIN32 + #ifdef _OPENAL32LIB + #define ALCAPI __declspec(dllexport) + #else + #define ALCAPI __declspec(dllimport) + #endif + + typedef struct ALCdevice_struct ALCdevice; + typedef struct ALCcontext_struct ALCcontext; + + #define ALCAPIENTRY __cdecl #else -#include <AL/al.h> -#include <AL/alc.h> -#include <AL/alut.h> + #ifdef TARGET_OS_MAC + #if TARGET_OS_MAC + #pragma export on + #endif + #endif + #define ALCAPI + #define ALCAPIENTRY __cdecl #endif + +#ifdef _WIN32 + #ifdef _OPENAL32LIB + #define ALAPI __declspec(dllexport) + #else + #define ALAPI __declspec(dllimport) + #endif + #define ALAPIENTRY __cdecl + #define AL_CALLBACK +#else + #ifdef TARGET_OS_MAC + #if TARGET_OS_MAC + #pragma export on + #endif + #endif + #define ALAPI + #define ALAPIENTRY __cdecl + #define AL_CALLBACK #endif + +DEFINE_GUID(DSPROPSETID_EAX20_ListenerProperties, + 0x306a6a8, + 0xb224, + 0x11d2, + 0x99, 0xe5, 0x0, 0x0, 0xe8, 0xd8, 0xc7, 0x22); + +DEFINE_GUID(DSPROPSETID_EAX20_BufferProperties, + 0x306a6a7, + 0xb224, + 0x11d2, + 0x99, 0xe5, 0x0, 0x0, 0xe8, 0xd8, 0xc7, 0x22); + +#define INITGUID +#define OPENAL + +int InitializeOpenAL(); +void DeInitializeOpenAL(); + +//alc +typedef ALCubyte* (ALCAPIENTRY *alcGetStringPROC)(ALCdevice *device,ALCenum param); +typedef ALCvoid (ALCAPIENTRY *alcGetIntegervPROC)(ALCdevice *device,ALCenum param,ALCsizei size,ALCint *data); +typedef ALCdevice* (ALCAPIENTRY *alcOpenDevicePROC)(ALCubyte *deviceName); +typedef ALCvoid (ALCAPIENTRY *alcCloseDevicePROC)(ALCdevice *device); +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); +typedef ALCenum (ALCAPIENTRY *alcGetErrorPROC)(ALCdevice *device); +typedef ALCboolean (ALCAPIENTRY *alcIsExtensionPresentPROC)(ALCdevice *device,ALCubyte *extName); +typedef ALCvoid* (ALCAPIENTRY *alcGetProcAddressPROC)(ALCdevice *device,ALCubyte *funcName); +typedef ALCenum (ALCAPIENTRY *alcGetEnumValuePROC)(ALCdevice *device,ALCubyte *enumName); + +//al +typedef ALvoid (ALAPIENTRY *alEnablePROC)( ALenum capability ); +typedef ALvoid (ALAPIENTRY *alDisablePROC)( ALenum capability ); +typedef ALboolean (ALAPIENTRY *alIsEnabledPROC)( ALenum capability ); +typedef ALvoid (ALAPIENTRY *alHintPROC)( ALenum target, ALenum mode ); +typedef ALboolean (ALAPIENTRY *alGetBooleanPROC)( ALenum param ); +typedef ALint (ALAPIENTRY *alGetIntegerPROC)( ALenum param ); +typedef ALfloat (ALAPIENTRY *alGetFloatPROC)( ALenum param ); +typedef ALdouble (ALAPIENTRY *alGetDoublePROC)( ALenum param ); +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 ALvoid (ALAPIENTRY *alGetDoublevPROC)( ALenum param, ALdouble* 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 ); +typedef ALvoid (ALAPIENTRY *alListener3fPROC)( ALenum param, ALfloat v1, ALfloat v2, ALfloat v3 ); +typedef ALvoid (ALAPIENTRY *alListenerfvPROC)( ALenum param, ALfloat* values ); +typedef ALvoid (ALAPIENTRY *alGetListeneriPROC)( ALenum param, ALint* value ); +typedef ALvoid (ALAPIENTRY *alGetListenerfPROC)( ALenum param, ALfloat* value ); +typedef ALvoid (ALAPIENTRY *alGetListener3fPROC)( ALenum param, ALfloat* v1, ALfloat* v2, ALfloat* v3 ); +typedef ALvoid (ALAPIENTRY *alGetListenerfvPROC)( ALenum param, ALfloat* values ); +typedef ALvoid (ALAPIENTRY *alGenSourcesPROC)( ALsizei n, ALuint* sources ); +typedef ALvoid (ALAPIENTRY *alDeleteSourcesPROC)( ALsizei n, ALuint* sources ); +typedef ALboolean (ALAPIENTRY *alIsSourcePROC)( ALuint id ); +typedef ALvoid (ALAPIENTRY *alSourceiPROC)( ALuint source, ALenum param, ALint value ); +typedef ALvoid (ALAPIENTRY *alSourcefPROC)( ALuint source, ALenum param, ALfloat value ); +typedef ALvoid (ALAPIENTRY *alSource3fPROC)( ALuint source, ALenum param, ALfloat v1, ALfloat v2, ALfloat v3 ); +typedef ALvoid (ALAPIENTRY *alSourcefvPROC)( ALuint source, ALenum param, ALfloat* values ); +typedef ALvoid (ALAPIENTRY *alGetSourceiPROC)( ALuint source, ALenum param, ALint* value ); +typedef ALvoid (ALAPIENTRY *alGetSourcefPROC)( ALuint source, ALenum param, ALfloat* value ); +typedef ALvoid (ALAPIENTRY *alGetSource3fPROC)( ALuint source, ALenum param, ALfloat* v1, ALfloat* v2, ALfloat* v3 ); +typedef ALvoid (ALAPIENTRY *alGetSourcefvPROC)( ALuint source, ALenum param, ALfloat* values ); +typedef ALvoid (ALAPIENTRY *alSourcePlayvPROC)( ALsizei n, ALuint *sources ); +typedef ALvoid (ALAPIENTRY *alSourcePausevPROC)( ALsizei n, ALuint *sources ); +typedef ALvoid (ALAPIENTRY *alSourceStopvPROC)( ALsizei n, ALuint *sources ); +typedef ALvoid (ALAPIENTRY *alSourceRewindvPROC)(ALsizei n,ALuint *sources); +typedef ALvoid (ALAPIENTRY *alSourcePlayPROC)( ALuint source ); +typedef ALvoid (ALAPIENTRY *alSourcePausePROC)( ALuint source ); +typedef ALvoid (ALAPIENTRY *alSourceStopPROC)( ALuint source ); +typedef ALvoid (ALAPIENTRY *alSourceRewindPROC)( ALuint source ); +typedef ALvoid (ALAPIENTRY *alGenBuffersPROC)( ALsizei n, ALuint* buffers ); +typedef ALvoid (ALAPIENTRY *alDeleteBuffersPROC)( ALsizei n, ALuint* buffers ); +typedef ALboolean (ALAPIENTRY *alIsBufferPROC)( ALuint buffer ); +typedef ALvoid (ALAPIENTRY *alBufferDataPROC)( ALuint buffer, + ALenum format, + ALvoid* data, + ALsizei size, + ALsizei freq ); +typedef ALvoid (ALAPIENTRY *alGetBufferiPROC)( ALuint buffer, ALenum param, ALint* value ); +typedef ALvoid (ALAPIENTRY *alGetBufferfPROC)( ALuint buffer, ALenum param, ALfloat* value ); +typedef ALvoid (ALAPIENTRY *alSourceQueueBuffersPROC)( ALuint source, ALsizei n, ALuint* buffers ); +typedef ALvoid (ALAPIENTRY *alSourceUnqueueBuffersPROC)( ALuint source, ALsizei n, ALuint* buffers ); +typedef ALvoid (ALAPIENTRY *alDistanceModelPROC)( ALenum value ); +typedef ALvoid (ALAPIENTRY *alDopplerFactorPROC)( ALfloat value ); +typedef ALvoid (ALAPIENTRY *alDopplerVelocityPROC)( ALfloat value ); + +extern alcGetStringPROC alcGetString; +extern alcGetIntegervPROC alcGetIntegerv; +extern alcOpenDevicePROC alcOpenDevice; +extern alcCloseDevicePROC alcCloseDevice; +extern alcCreateContextPROC alcCreateContext; +extern alcMakeContextCurrentPROC alcMakeContextCurrent; +extern alcProcessContextPROC alcProcessContext; +extern alcGetCurrentContextPROC alcGetCurrentContext; +extern alcGetContextsDevicePROC alcGetContextsDevice; +extern alcSuspendContextPROC alcSuspendContext; +extern alcDestroyContextPROC alcDestroyContext; +extern alcGetErrorPROC alcGetError; +extern alcIsExtensionPresentPROC alcIsExtensionPresent; +extern alcGetProcAddressPROC alcGetProcAddress; +extern alcGetEnumValuePROC alcGetEnumValue; + +extern alEnablePROC alEnable; +extern alDisablePROC alDisable; +extern alIsEnabledPROC alIsEnabled; +extern alHintPROC alHint; +extern alGetBooleanPROC alGetBoolean; +extern alGetIntegerPROC alGetInteger; +extern alGetFloatPROC alGetFloat; +extern alGetDoublePROC alGetDouble; +extern alGetBooleanvPROC alGetBooleanv; +extern alGetIntegervPROC alGetIntegerv; +extern alGetFloatvPROC alGetFloatv; +extern alGetDoublevPROC alGetDoublev; +extern alGetStringPROC alGetString; +extern alGetErrorPROC alGetError; +extern alIsExtensionPresentPROC alIsExtensionPresent; +extern alGetProcAddressPROC alGetProcAddress; +extern alGetEnumValuePROC alGetEnumValue; +extern alListeneriPROC alListeneri; +extern alListenerfPROC alListenerf; +extern alListener3fPROC alListener3f; +extern alListenerfvPROC alListenerfv; +extern alGetListeneriPROC alGetListeneri; +extern alGetListenerfPROC alGetListenerf; +extern alGetListener3fPROC alGetListener3f; +extern alGetListenerfvPROC alGetListenerfv; +extern alGenSourcesPROC alGenSources; +extern alDeleteSourcesPROC alDeleteSources; +extern alIsSourcePROC alIsSource; +extern alSourceiPROC alSourcei; +extern alSourcefPROC alSourcef; +extern alSource3fPROC alSource3f; +extern alSourcefvPROC alSourcefv; +extern alGetSourceiPROC alGetSourcei; +extern alGetSourcefPROC alGetSourcef; +extern alGetSource3fPROC alGetSource3f; +extern alGetSourcefvPROC alGetSourcefv; +extern alSourcePlayvPROC alSourcePlayv; +extern alSourcePausevPROC alSourcePausev; +extern alSourceStopvPROC alSourceStopv; +extern alSourceRewindvPROC alSourceRewindv; +extern alSourcePlayPROC alSourcePlay; +extern alSourcePausePROC alSourcePause; +extern alSourceStopPROC alSourceStop; +extern alSourceRewindPROC alSourceRewind; +extern alGenBuffersPROC alGenBuffers; +extern alDeleteBuffersPROC alDeleteBuffers; +extern alIsBufferPROC alIsBuffer; +extern alBufferDataPROC alBufferData; +extern alGetBufferiPROC alGetBufferi; +extern alGetBufferfPROC alGetBufferf; +extern alSourceQueueBuffersPROC alSourceQueueBuffers; +extern alSourceUnqueueBuffersPROC alSourceUnqueueBuffers; +extern alDistanceModelPROC alDistanceModel; +extern alDopplerFactorPROC alDopplerFactor; +extern alDopplerVelocityPROC alDopplerVelocity; + +typedef ALenum (*EAXSet)(const GUID*, ALuint, ALuint, ALvoid*, ALuint); +typedef ALenum (*EAXGet)(const GUID*, ALuint, ALuint, ALvoid*, ALuint); + +extern EAXSet eaxSet; +extern EAXGet eaxGet; + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file Index: org_lwjgl_openal_ALC.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_ALC.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_ALC.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- org_lwjgl_openal_ALC.cpp 28 Nov 2002 20:25:10 -0000 1.3 +++ org_lwjgl_openal_ALC.cpp 14 Dec 2002 12:49:16 -0000 1.4 @@ -42,7 +42,7 @@ /* OpenAL includes */ #include "checkALerror.h" -#include <AL/alc.h> +#include "extal.h" /* * Class: org_lwjgl_openal_ALC @@ -50,7 +50,14 @@ * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_ALC_nCreate (JNIEnv *env, jobject obj) { - return true; + //check that our methods have been loaded + if(alEnable == NULL) { + jclass cls = env->FindClass("org/lwjgl/openal/OpenALException"); + env->ThrowNew(cls, (const char*) "Unable to loacate OpenAL Methods. Please assert that AL was created successfully."); + env->DeleteLocalRef(cls); + return false; + } + return true; } /* @@ -378,4 +385,4 @@ CHECK_ALC_ERROR return result; -} +} \ No newline at end of file Index: org_lwjgl_openal_ALUT.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_ALUT.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_ALUT.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- org_lwjgl_openal_ALUT.cpp 28 Nov 2002 20:25:10 -0000 1.3 +++ org_lwjgl_openal_ALUT.cpp 14 Dec 2002 12:49:16 -0000 1.4 @@ -42,10 +42,11 @@ #include "org_lwjgl_openal_ALUT.h" #include <stdlib.h> +#include <windows.h> /* OpenAL includes */ #include "checkALerror.h" -#include <AL/alut.h> +#include "AL/alut.h" /* * Class: org_lwjgl_openal_ALUT @@ -53,7 +54,7 @@ * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_ALUT_nCreate (JNIEnv *env, jobject obj) { - return true; + return InitializeOpenAL(); } /* @@ -64,41 +65,6 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALUT_nDestroy (JNIEnv *env, jobject obj) { } -/** - * This function initializes OpenAL. - * - * C Specification: - * void alutInit(int *argc, char *argv[]); - */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALUT_init (JNIEnv *env, jobject obj, jobjectArray jargv) { - /* obtain the size the array */ - jsize argc = env->GetArrayLength(jargv); - - /* Declare a char array for argv */ - const char* argv[128]; - int i; - - for (i=0;i<argc;i++) { - /* obtain the current object from the object array */ - jstring string = (jstring) env->GetObjectArrayElement(jargv, i); - - /* Convert the object just obtained into a String */ - const char *str = env->GetStringUTFChars(string, 0); - - /* Build the argv array */ - argv[i] = str; - - /* Free up memory to prevent memory leaks */ - env->ReleaseStringUTFChars(string, str); - } - - /* Increment argc to adjust the difference between Java and C arguments */ - argc++; - - /* call the actual implementation */ - alutInit((ALint*) &argc,(char**) argv); - CHECK_AL_ERROR -} /* * This function loads a WAV file into memory from a file. * @@ -209,14 +175,4 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALUT_unloadWAV (JNIEnv *env, jobject obj, jint format, jint data, jint size, jint freq) { alutUnloadWAV(format, (void**) data, size, freq); CHECK_AL_ERROR -} - -/** - * This function exits OpenAL. - * - * C Specification: - * void alutExit(ALvoid); - */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALUT_exit (JNIEnv *env, jobject obj) { - alutExit(); -} +} \ No newline at end of file Index: org_lwjgl_openal_ALUT.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_ALUT.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_ALUT.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- org_lwjgl_openal_ALUT.h 3 Sep 2002 19:24:10 -0000 1.6 +++ org_lwjgl_openal_ALUT.h 14 Dec 2002 12:49:16 -0000 1.7 @@ -39,6 +39,8 @@ #ifdef __cplusplus extern "C" { #endif + +extern int InitializeOpenAL(); /* * Class: org_lwjgl_openal_ALUT * Method: nCreate @@ -54,13 +56,6 @@ */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALUT_nDestroy (JNIEnv *, jobject); -/* - * Class: org_lwjgl_openal_ALUT - * Method: init - * Signature: ([Ljava/lang/String;)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALUT_init - (JNIEnv *, jobject, jobjectArray); /* * Class: org_lwjgl_openal_ALUT @@ -85,14 +80,6 @@ */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALUT_unloadWAV (JNIEnv *, jobject, jint, jint, jint, jint); - -/* - * Class: org_lwjgl_openal_ALUT - * Method: exit - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALUT_exit - (JNIEnv *, jobject); #ifdef __cplusplus } Index: org_lwjgl_openal_BaseAL.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_BaseAL.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_BaseAL.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_openal_BaseAL.cpp 25 Nov 2002 13:52:23 -0000 1.1 +++ org_lwjgl_openal_BaseAL.cpp 14 Dec 2002 12:49:16 -0000 1.2 @@ -29,16 +29,19 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - #include "org_lwjgl_openal_BaseAL.h" +/* OpenAL includes */ +#include "checkALerror.h" +#include "extal.h" + /* * Class: org_lwjgl_openal_BaseAL * Method: nCreate * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_BaseAL_nCreate (JNIEnv *env, jobject obj) { - return true; + return InitializeOpenAL(); } /* @@ -47,4 +50,5 @@ * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_BaseAL_nDestroy(JNIEnv *env, jobject obj) { + DeInitializeOpenAL(); } Index: org_lwjgl_openal_CoreAL.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_CoreAL.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_CoreAL.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- org_lwjgl_openal_CoreAL.cpp 28 Nov 2002 20:25:10 -0000 1.3 +++ org_lwjgl_openal_CoreAL.cpp 14 Dec 2002 12:49:16 -0000 1.4 @@ -43,7 +43,7 @@ /* OpenAL includes */ #include "checkALerror.h" -#include <AL/al.h> +#include "extal.h" /** * This function enables a feature of the OpenAL driver. Index: org_lwjgl_openal_eax_CoreEAX.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_eax_CoreEAX.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_eax_CoreEAX.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- org_lwjgl_openal_eax_CoreEAX.cpp 28 Nov 2002 20:25:10 -0000 1.3 +++ org_lwjgl_openal_eax_CoreEAX.cpp 14 Dec 2002 12:49:16 -0000 1.4 @@ -41,9 +41,8 @@ #include "org_lwjgl_openal_eax_CoreEAX.h" /* OpenAL includes */ -#include "extal.h" #include "checkALerror.h" -#include <AL/alc.h> +#include "extal.h" /** * Throws an OAL exception with the specified message @@ -130,4 +129,4 @@ #else ThrowException(env, "EAX extensions not supported"); #endif -} +} \ No newline at end of file |
From: Brian M. <ma...@us...> - 2002-12-14 12:44:20
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal In directory sc8-pr-cvs1:/tmp/cvs-serv15807 Modified Files: ALCTest.java ALUTTest.java EAXTest.java PlayTest.java PlayTestMemory.java Log Message: fix: no more using alutInit or alutExit Index: ALCTest.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/ALCTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/ALCTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ALCTest.java 21 Nov 2002 22:36:03 -0000 1.2 +++ ALCTest.java 14 Dec 2002 12:44:17 -0000 1.3 @@ -133,11 +133,7 @@ //get an enumerstion value System.out.println("Value of ALC_MAJOR_VERSION: " + alc.getEnumValue(device, "ALC_MAJOR_VERSION")); - //close context again - alc.destroyContext(context); - - //close it - alc.closeDevice(device); + alExit(); } /** Index: ALUTTest.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/ALUTTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/ALUTTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ALUTTest.java 19 Nov 2002 16:48:25 -0000 1.1 +++ ALUTTest.java 14 Dec 2002 12:44:17 -0000 1.2 @@ -67,8 +67,8 @@ int lastError; - //initialize AL, using ALUT - alut.init(args); + //initialize AL + alInitialize(); //create 1 buffer and 1 source ByteBuffer buffers = ByteBuffer.allocateDirect(4); @@ -149,8 +149,8 @@ exit(lastError); } - //shutdown using ALUT - alut.exit(); + //shutdown + alExit(); } /** Index: EAXTest.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/EAXTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/EAXTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- EAXTest.java 21 Nov 2002 22:36:36 -0000 1.2 +++ EAXTest.java 14 Dec 2002 12:44:17 -0000 1.3 @@ -67,9 +67,7 @@ //no errorchecking from now on, since our context is gone. //shutdown - alc.makeContextCurrent(null); - alc.destroyContext(context); - alc.closeDevice(device); + alExit(); System.out.println("test done."); } Index: PlayTest.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/PlayTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/PlayTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- PlayTest.java 19 Nov 2002 16:48:25 -0000 1.1 +++ PlayTest.java 14 Dec 2002 12:44:17 -0000 1.2 @@ -147,9 +147,7 @@ //no errorchecking from now on, since our context is gone. //shutdown - alc.makeContextCurrent(null); - alc.destroyContext(context); - alc.closeDevice(device); + alExit(); } /** Index: PlayTestMemory.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/PlayTestMemory.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/PlayTestMemory.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- PlayTestMemory.java 19 Nov 2002 16:48:25 -0000 1.1 +++ PlayTestMemory.java 14 Dec 2002 12:44:17 -0000 1.2 @@ -159,9 +159,7 @@ //no errorchecking from now on, since our context is gone. //shutdown - alc.makeContextCurrent(null); - alc.destroyContext(context); - alc.closeDevice(device); + alExit(); } /** |
From: Brian M. <ma...@us...> - 2002-12-14 12:43:48
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal In directory sc8-pr-cvs1:/tmp/cvs-serv15478 Modified Files: BasicTest.java Log Message: add: new alExit method alutExit, which has been removed Index: BasicTest.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/BasicTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/BasicTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- BasicTest.java 19 Nov 2002 16:48:25 -0000 1.1 +++ BasicTest.java 14 Dec 2002 12:43:45 -0000 1.2 @@ -120,6 +120,27 @@ } /** + * Shutdowns OpenAL + */ + protected void alExit() { + + //Get active context + context = alc.getCurrentContext(); + + //Get device for active context + device = alc.getContextsDevice(context); + + //Disable context + alc.makeContextCurrent(null); + + //Release context(s) + alc.destroyContext(context); + + //Close device + alc.closeDevice(device); + } + + /** * Creates an integer buffer to hold specified ints * - strictly a utility method * @@ -140,7 +161,7 @@ */ protected void exit(int error) { System.out.println("OpenAL Error: " + al.getString(error)); - alut.exit(); + alExit(); System.exit(-1); } } |
From: Brian M. <ma...@us...> - 2002-12-14 12:42:22
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal In directory sc8-pr-cvs1:/tmp/cvs-serv14612 Modified Files: ALUT.java Log Message: rem: alutInit and exit gone Index: ALUT.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/openal/ALUT.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/ALUT.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ALUT.java 14 Dec 2002 12:38:39 -0000 1.8 +++ ALUT.java 14 Dec 2002 12:42:19 -0000 1.9 @@ -54,8 +54,8 @@ } /** - * Override to provide any initialization code after creation. - */ + * Override to provide any initialization code after creation. + */ protected void init() { } @@ -107,13 +107,6 @@ protected native void nDestroy(); /** - * Initializes the OpenAL engine - * - * @param args String array of arguments to engine - */ - public native void init(String[] args); - - /** * Loads a wave file into memory * * @param file name of file to load (in current working directory) @@ -138,9 +131,4 @@ * @param freq frequency of the data */ public native void unloadWAV(int format, int data, int size, int freq); - - /** - * Deinitializes the OpenAL engine - */ - public native void exit(); } |
From: Brian M. <ma...@us...> - 2002-12-14 12:38:43
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal In directory sc8-pr-cvs1:/tmp/cvs-serv11791 Modified Files: ALUT.java Log Message: no message Index: ALUT.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/openal/ALUT.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/ALUT.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ALUT.java 3 Sep 2002 18:54:40 -0000 1.7 +++ ALUT.java 14 Dec 2002 12:38:39 -0000 1.8 @@ -29,7 +29,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - package org.lwjgl.openal; +package org.lwjgl.openal; /** * $Id$ @@ -41,106 +41,106 @@ * @version $Revision$ */ public class ALUT { - + /** Has the ALUT object been created? */ - protected static boolean created; - + protected static boolean created; + static { initialize(); } - - /** Creates a new instance of ALUT */ - public ALUT() { - } - - /** - * Override to provide any initialization code after creation. - */ + + /** Creates a new instance of ALUT */ + public ALUT() { + } + + /** + * Override to provide any initialization code after creation. + */ protected void init() { } - + /** * Static initialization */ private static void initialize() { System.loadLibrary(org.lwjgl.Sys.getLibraryName()); } - - /** - * Creates the ALUT instance - * - * @throws Exception if a failiure occured in the ALUT creation process - */ + + /** + * Creates the ALUT instance + * + * @throws Exception if a failiure occured in the ALUT creation process + */ public void create() throws Exception { if (created) { return; - } - + } + if (!nCreate()) { throw new Exception("ALUT instance could not be created."); - } + } created = true; - init(); + init(); } - + /** * Native method to create ALUT instance * * @return true if the ALUT creation process succeeded */ protected native boolean nCreate(); - + /** * Calls whatever destruction rutines that are needed */ public void destroy() { if (!created) { return; - } - created = false; - nDestroy(); + } + created = false; + nDestroy(); } - + /** * Native method the destroy the ALUT */ - protected native void nDestroy(); - - /** - * Initializes the OpenAL engine - * - * @param args String array of arguments to engine - */ - public native void init(String[] args); - - /** - * Loads a wave file into memory - * - * @param file name of file to load (in current working directory) - * @return ALUTLoadWAVData object containing information regarding wave data loaded - */ - public native ALUTLoadWAVData loadWAVFile(String file); - - /** - * Loads a byte buffer into memory - * - * @param buffer buffer address containing file - * @return ALUTLoadWAVData object containing information regarding wave data loaded - */ - public native ALUTLoadWAVData loadWAVMemory(int buffer); - - /** - * Unloads the specified file from memory - * - * @param format OpenAL format specifier - * @param data address of data (pointer) - * @param size size of the data in bytes - * @param freq frequency of the data - */ - public native void unloadWAV(int format, int data, int size, int freq); - - /** - * Deinitializes the OpenAL engine - */ - public native void exit(); + protected native void nDestroy(); + + /** + * Initializes the OpenAL engine + * + * @param args String array of arguments to engine + */ + public native void init(String[] args); + + /** + * Loads a wave file into memory + * + * @param file name of file to load (in current working directory) + * @return ALUTLoadWAVData object containing information regarding wave data loaded + */ + public native ALUTLoadWAVData loadWAVFile(String file); + + /** + * Loads a byte buffer into memory + * + * @param buffer buffer address containing file + * @return ALUTLoadWAVData object containing information regarding wave data loaded + */ + public native ALUTLoadWAVData loadWAVMemory(int buffer); + + /** + * Unloads the specified file from memory + * + * @param format OpenAL format specifier + * @param data address of data (pointer) + * @param size size of the data in bytes + * @param freq frequency of the data + */ + public native void unloadWAV(int format, int data, int size, int freq); + + /** + * Deinitializes the OpenAL engine + */ + public native void exit(); } |
From: Elias N. <eli...@us...> - 2002-12-12 22:04:09
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1:/tmp/cvs-serv28973/win32 Modified Files: org_lwjgl_opengl_BaseGL.cpp Log Message: Added more pixelformat tests to win32 Index: org_lwjgl_opengl_BaseGL.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_BaseGL.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_BaseGL.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- org_lwjgl_opengl_BaseGL.cpp 12 Dec 2002 20:06:15 -0000 1.7 +++ org_lwjgl_opengl_BaseGL.cpp 12 Dec 2002 22:04:05 -0000 1.8 @@ -60,15 +60,16 @@ printf("No window handle\n"); return JNI_FALSE; } + int flags = PFD_DRAW_TO_WINDOW | // support window + PFD_SUPPORT_OPENGL | // support OpenGL + PFD_GENERIC_ACCELERATED | + PFD_DOUBLEBUFFER; // double buffered PIXELFORMATDESCRIPTOR pfd = { sizeof(PIXELFORMATDESCRIPTOR), // size of this pfd 1, // version number - PFD_DRAW_TO_WINDOW | // support window - PFD_SUPPORT_OPENGL | // support OpenGL - PFD_GENERIC_ACCELERATED | - PFD_DOUBLEBUFFER, // double buffered - PFD_TYPE_RGBA, // RGBA type + flags, // RGBA type + PFD_TYPE_RGBA, (BYTE)colorBits, 0, 0, 0, 0, 0, 0, // color bits ignored (BYTE)alphaBits, @@ -86,7 +87,7 @@ // Ensure desktop color depth is adequate int availableBitDepth = GetDeviceCaps(hdc, BITSPIXEL); if (availableBitDepth < colorBits) { - printf("This application requires a greater colour depth."); + printf("This application requires a greater colour depth.\n"); return JNI_FALSE; }; @@ -97,8 +98,34 @@ if (iPixelFormat == 0) { printf("Failed to choose pixel format.\n"); return JNI_FALSE; - } - + } + + PIXELFORMATDESCRIPTOR desc; + if (DescribePixelFormat(hdc, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &desc) == 0) { + printf("Could not describe pixel format\n"); + return JNI_FALSE; + } + + if (desc.cColorBits < colorBits) { + printf("This application requires a greater colour depth.\n"); + return JNI_FALSE; + } + + if (desc.cStencilBits < stencilBits) { + printf("This application requires a greater stencil depth.\n"); + return JNI_FALSE; + } + + if (desc.cDepthBits < depthBits) { + printf("This application requires a greater depth buffer depth.\n"); + return JNI_FALSE; + } + + if ((desc.dwFlags & flags) == 0) { + printf("Capabilities not supported.\n"); + return JNI_FALSE; + } + #ifdef _DEBUG printf("Pixel format is %d\n", iPixelFormat); #endif |
From: Elias N. <eli...@us...> - 2002-12-12 20:06:18
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1:/tmp/cvs-serv16551/win32 Modified Files: org_lwjgl_opengl_BaseGL.cpp Log Message: Moved print of extensions to debug version Index: org_lwjgl_opengl_BaseGL.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_BaseGL.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_BaseGL.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- org_lwjgl_opengl_BaseGL.cpp 11 Dec 2002 10:14:08 -0000 1.6 +++ org_lwjgl_opengl_BaseGL.cpp 12 Dec 2002 20:06:15 -0000 1.7 @@ -125,13 +125,14 @@ return JNI_FALSE; } +#ifdef _DEBUG char * p = (char *) glGetString(GL_EXTENSIONS); if (NULL == p) { printf("NO extensions available\n"); } else { printf("Available extensions:\n%s\n", p); } - +#endif return JNI_TRUE; } |
From: Elias N. <eli...@us...> - 2002-12-12 20:05:02
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1:/tmp/cvs-serv16137/win32 Modified Files: org_lwjgl_input_Mouse.cpp Log Message: Removed a printf Index: org_lwjgl_input_Mouse.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_input_Mouse.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_input_Mouse.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- org_lwjgl_input_Mouse.cpp 12 Dec 2002 19:51:20 -0000 1.3 +++ org_lwjgl_input_Mouse.cpp 12 Dec 2002 20:04:56 -0000 1.4 @@ -135,7 +135,6 @@ printf("Failed to acquire mouse\n"); #endif } - printf("Acquired mouse\n"); return JNI_TRUE; } |
From: Elias N. <eli...@us...> - 2002-12-12 19:51:23
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1:/tmp/cvs-serv11404/linux Modified Files: org_lwjgl_input_Mouse.cpp Log Message: Fixed a mouse button state array bug Index: org_lwjgl_input_Mouse.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_input_Mouse.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_input_Mouse.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- org_lwjgl_input_Mouse.cpp 30 Nov 2002 21:25:00 -0000 1.9 +++ org_lwjgl_input_Mouse.cpp 12 Dec 2002 19:51:20 -0000 1.10 @@ -233,13 +233,13 @@ case ButtonPress: switch (event.xbutton.button) { case Button1: - buttons[0] = 1; + buttons[0] = JNI_TRUE; break; case Button2: - buttons[1] = 1; + buttons[1] = JNI_TRUE; break; case Button3: - buttons[2] = 1; + buttons[2] = JNI_TRUE; break; case Button4: current_z--; @@ -253,13 +253,13 @@ case ButtonRelease: switch (event.xbutton.button) { case Button1: - buttons[0] = 0; + buttons[0] = JNI_FALSE; break; case Button2: - buttons[1] = 0; + buttons[1] = JNI_FALSE; break; case Button3: - buttons[2] = 0; + buttons[2] = JNI_FALSE; break; case Button4: /* Fall through */ case Button5: @@ -324,9 +324,7 @@ last_y = current_y; last_z = current_z; jbooleanArray buttonsArray = (jbooleanArray) env->GetStaticObjectField(clazz, fid_button); - unsigned char * class_buttons = (unsigned char *) env->GetPrimitiveArrayCritical(buttonsArray, NULL); - memcpy(class_buttons, buttons, NUM_BUTTONS*sizeof(unsigned char)); - env->ReleasePrimitiveArrayCritical(buttonsArray, class_buttons, 0); + env->SetBooleanArrayRegion(buttonsArray, 0, NUM_BUTTONS, buttons); if (current_fullscreen) warpPointer(); } |
From: Elias N. <eli...@us...> - 2002-12-12 19:51:23
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1:/tmp/cvs-serv11404/win32 Modified Files: org_lwjgl_input_Mouse.cpp Log Message: Fixed a mouse button state array bug Index: org_lwjgl_input_Mouse.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_input_Mouse.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_input_Mouse.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- org_lwjgl_input_Mouse.cpp 15 Aug 2002 15:43:02 -0000 1.2 +++ org_lwjgl_input_Mouse.cpp 12 Dec 2002 19:51:20 -0000 1.3 @@ -121,7 +121,7 @@ } // Grab non-exclusive foreground access to device - if (lpdiMouse->SetCooperativeLevel(hwnd, DISCL_NONEXCLUSIVE | DISCL_FOREGROUND) != DI_OK) { + if (lpdiMouse->SetCooperativeLevel(hwnd, DISCL_EXCLUSIVE | DISCL_FOREGROUND) != DI_OK) { printf("Failed to set mouse coop\n"); return JNI_FALSE; } @@ -134,7 +134,8 @@ #ifdef _DEBUG printf("Failed to acquire mouse\n"); #endif - } + } + printf("Acquired mouse\n"); return JNI_TRUE; } @@ -187,9 +188,12 @@ env->SetStaticIntField(clazz, fid_dy, (jint)diMouseState.lY); env->SetStaticIntField(clazz, fid_dz, (jint)diMouseState.lZ); jbooleanArray buttonsArray = (jbooleanArray) env->GetStaticObjectField(clazz, fid_button); - BYTE * buttons = (BYTE *) env->GetPrimitiveArrayCritical(buttonsArray, NULL); - memcpy(buttons, diMouseState.rgbButtons, 4); - env->ReleasePrimitiveArrayCritical(buttonsArray, buttons, 0); + for (int i = 0; i < 4; i++) + if (diMouseState.rgbButtons[i] != 0) + diMouseState.rgbButtons[i] = JNI_TRUE; + else + diMouseState.rgbButtons[i] = JNI_FALSE; + env->SetBooleanArrayRegion(buttonsArray, 0, 4, diMouseState.rgbButtons); } else { #ifdef _DEBUG printf("Failed to get mouse device state\n"); |
From: Elias N. <eli...@us...> - 2002-12-11 10:14:12
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1:/tmp/cvs-serv8821/win32 Modified Files: org_lwjgl_opengl_BaseGL.cpp Log Message: Added ReleaseContext to win32 Index: org_lwjgl_opengl_BaseGL.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_BaseGL.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_BaseGL.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- org_lwjgl_opengl_BaseGL.cpp 11 Dec 2002 07:16:31 -0000 1.5 +++ org_lwjgl_opengl_BaseGL.cpp 11 Dec 2002 10:14:08 -0000 1.6 @@ -164,6 +164,18 @@ /* * Class: org_lwjgl_opengl_BaseGL + * Method: nFreeContext + * Signature: ()V +*/ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_BaseGL_nReleaseContext + (JNIEnv *env, jobject obj) +{ + wglMakeCurrent(hdc, NULL); +} + + +/* + * Class: org_lwjgl_opengl_BaseGL * Method: nMakeCurrent * Signature: ()V */ |
From: Elias N. <eli...@us...> - 2002-12-11 07:26:51
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1:/tmp/cvs-serv26193/linux Modified Files: org_lwjgl_Display.cpp Log Message: Minor fix to Display.cpp Index: org_lwjgl_Display.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Display.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Display.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- org_lwjgl_Display.cpp 11 Dec 2002 07:16:31 -0000 1.7 +++ org_lwjgl_Display.cpp 11 Dec 2002 07:26:49 -0000 1.8 @@ -142,7 +142,12 @@ return JNI_FALSE; } root_win = RootWindow(disp, screen); - extgl_Open(); + if (extgl_Open() != 0) { +#ifdef _DEBUG + printf("Could not load gl libs\n"); +#endif + return JNI_FALSE; + } vis_info = glXChooseVisual(disp, screen, attriblist); /* might be a better way to handle not being able to set GLX_ALPHA_SIZE... */ |
From: Elias N. <eli...@us...> - 2002-12-11 07:16:36
|
Update of /cvsroot/java-game-lib/LWJGL/src/native In directory sc8-pr-cvs1:/tmp/cvs-serv22313 Modified Files: config.h.in configure.in Log Message: Switched to dynamic loading of gl functions and libs Index: config.h.in CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/config.h.in =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/config.h.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- config.h.in 28 Nov 2002 22:40:05 -0000 1.1 +++ config.h.in 11 Dec 2002 07:16:31 -0000 1.2 @@ -6,12 +6,6 @@ /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if you have the `GL' library (-lGL). */ -#undef HAVE_LIBGL - -/* Define to 1 if you have the `GLU' library (-lGLU). */ -#undef HAVE_LIBGLU - /* Define to 1 if you have the `openal' library (-lopenal). */ #undef HAVE_LIBOPENAL Index: configure.in CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/configure.in =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/configure.in,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- configure.in 30 Nov 2002 21:36:12 -0000 1.5 +++ configure.in 11 Dec 2002 07:16:31 -0000 1.6 @@ -56,12 +56,8 @@ fi dnl Checks for libraries. -dnl Replace `main' with a function in -lGL: LIBS='-L/usr/X11R6/lib' AC_PATH_X -AC_CHECK_LIB(GL, main,, AC_MSG_ERROR(GL is required)) -dnl Replace `main' with a function in -lGLU: -AC_CHECK_LIB(GLU, main,, AC_MSG_ERROR(GLU is required)) dnl Replace `main' with a function in -lX11: AC_CHECK_LIB(X11, main,, AC_MSG_ERROR(X11 is required)) dnl Replace `main' with a function in -lXext: |
From: Elias N. <eli...@us...> - 2002-12-11 07:16:36
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/callbacks In directory sc8-pr-cvs1:/tmp/cvs-serv22313/common/callbacks Modified Files: GLUQuadricCallbacks.h Log Message: Switched to dynamic loading of gl functions and libs Index: GLUQuadricCallbacks.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/callbacks/GLUQuadricCallbacks.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/callbacks/GLUQuadricCallbacks.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- GLUQuadricCallbacks.h 30 Nov 2002 03:28:30 -0000 1.3 +++ GLUQuadricCallbacks.h 11 Dec 2002 07:16:31 -0000 1.4 @@ -9,7 +9,6 @@ #define _GLUQuadricCallbacks_H #include "extgl.h" -#include <GL/glu.h> #include <stdlib.h> #include <stdio.h> |
From: Elias N. <eli...@us...> - 2002-12-11 07:16:36
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1:/tmp/cvs-serv22313/win32 Modified Files: org_lwjgl_opengl_BaseGL.cpp Log Message: Switched to dynamic loading of gl functions and libs Index: org_lwjgl_opengl_BaseGL.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_BaseGL.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_BaseGL.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- org_lwjgl_opengl_BaseGL.cpp 24 Nov 2002 17:13:33 -0000 1.4 +++ org_lwjgl_opengl_BaseGL.cpp 11 Dec 2002 07:16:31 -0000 1.5 @@ -108,7 +108,8 @@ printf("Failed to set pixel format\n"); return JNI_FALSE; } - + if (extgl_Open() != 0) + return JNI_FALSE; // Create a rendering context hglrc = wglCreateContext(hdc); if (hglrc == NULL) { @@ -119,6 +120,11 @@ // Automatically make it the current context wglMakeCurrent(hdc, hglrc); + if (extgl_Initialize() != 0) { + printf("Failed to initialize GL\n"); + return JNI_FALSE; + } + char * p = (char *) glGetString(GL_EXTENSIONS); if (NULL == p) { printf("NO extensions available\n"); @@ -126,11 +132,6 @@ printf("Available extensions:\n%s\n", p); } - if (extgl_Initialize() != 0) { - printf("Failed to initialize GL\n"); - return JNI_FALSE; - } - return JNI_TRUE; } @@ -147,7 +148,7 @@ // Delete the rendering context if (hglrc != NULL) wglDeleteContext(hglrc); - + extgl_Close(); } /* |
From: Elias N. <eli...@us...> - 2002-12-11 07:16:36
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1:/tmp/cvs-serv22313/linux Modified Files: org_lwjgl_Display.cpp Log Message: Switched to dynamic loading of gl functions and libs Index: org_lwjgl_Display.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Display.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Display.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- org_lwjgl_Display.cpp 4 Dec 2002 15:17:49 -0000 1.6 +++ org_lwjgl_Display.cpp 11 Dec 2002 07:16:31 -0000 1.7 @@ -40,13 +40,11 @@ */ +#include "extgl.h" #include <X11/X.h> #include <X11/Xlib.h> #include <X11/extensions/xf86vmode.h> -#include <GL/glx.h> #include <X11/Xutil.h> -#include <GL/gl.h> -#include <GL/glu.h> #include <stdio.h> #include <jni.h> #include "org_lwjgl_Display.h" @@ -144,7 +142,7 @@ return JNI_FALSE; } root_win = RootWindow(disp, screen); - + extgl_Open(); vis_info = glXChooseVisual(disp, screen, attriblist); /* might be a better way to handle not being able to set GLX_ALPHA_SIZE... */ @@ -213,6 +211,7 @@ XFree(avail_modes); XFree(vis_info); XCloseDisplay(disp); + extgl_Close(); #ifdef _DEBUG printf("Closed X connection\n"); #endif |
From: Elias N. <eli...@us...> - 2002-12-11 07:16:36
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv22313/common Modified Files: checkGLerror.h extgl.c extgl.h org_lwjgl_opengl_GLU.cpp Log Message: Switched to dynamic loading of gl functions and libs Index: checkGLerror.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/checkGLerror.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/checkGLerror.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- checkGLerror.h 26 Nov 2002 17:34:26 -0000 1.5 +++ checkGLerror.h 11 Dec 2002 07:16:31 -0000 1.6 @@ -14,7 +14,6 @@ #include <jni.h> #include "extgl.h" -#include <GL/glu.h> #define CHECK_GL_ERROR \ { \ Index: extgl.c CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/extgl.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extgl.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- extgl.c 19 Nov 2002 07:42:54 -0000 1.1 +++ extgl.c 11 Dec 2002 07:16:31 -0000 1.2 @@ -37,18 +37,472 @@ #include <stdio.h> #include <string.h> -#ifndef _WIN32 -#include <GL/glx.h> -#endif /* _WIN32 */ - /* turn off the warning for the borland compiler*/ #ifdef __BORLANDC__ #pragma warn -8064 #pragma warn -8065 [...1546 lines suppressed...] + lib_glu_handle = LoadLibrary("glu32.dll"); + if (lib_glu_handle == NULL) + return 1; +#endif + + return 0; +} + +void extgl_Close(void) +{ +#ifndef _WIN32 + dlclose(lib_glu_handle); + dlclose(lib_gl_handle); +#else + FreeLibrary(lib_gl_handle); + FreeLibrary(lib_glu_handle); +#endif } /* deprecated function please do not use it, use extgl_Initialize() instead */ Index: extgl.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/extgl.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extgl.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- extgl.h 19 Nov 2002 07:42:54 -0000 1.1 +++ extgl.h 11 Dec 2002 07:16:31 -0000 1.2 @@ -1,4997 +1,5673 @@ -/* Small parts were taken from glext.h, here's the lisence: */ - -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** [...10620 lines suppressed...] + int OpenGL13; + int OpenGL14; +}; + +extern struct ExtensionTypes extgl_Extensions; + +extern struct ExtensionTypes SupportedExtensions; /* deprecated, please do not use */ + +/* initializes everything, call this right after the rc is created. the function returns 0 if successful */ +int extgl_Initialize(); +int extgl_Open(void); +void extgl_Close(void); + +int glInitialize(); /* deprecated, please do not use */ + +#ifdef __cplusplus +} +#endif + +#endif /* __EXTGL_H__ */ Index: org_lwjgl_opengl_GLU.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GLU.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GLU.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- org_lwjgl_opengl_GLU.cpp 30 Nov 2002 03:40:47 -0000 1.4 +++ org_lwjgl_opengl_GLU.cpp 11 Dec 2002 07:16:31 -0000 1.5 @@ -39,14 +39,9 @@ * @version $Revision$ */ -#ifdef _WIN32 -#include <windows.h> -#endif - #include "org_lwjgl_opengl_GLU.h" #include "extgl.h" #include "checkGLerror.h" -#include "GL/glu.h" #include "callbacks/GLUQuadricCallbacks.h" |
From: Elias N. <eli...@us...> - 2002-12-04 15:17:55
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1:/tmp/cvs-serv15833/linux Modified Files: org_lwjgl_Display.cpp Log Message: Fixed a GL context creation bug Index: org_lwjgl_Display.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Display.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Display.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- org_lwjgl_Display.cpp 28 Nov 2002 21:49:11 -0000 1.5 +++ org_lwjgl_Display.cpp 4 Dec 2002 15:17:49 -0000 1.6 @@ -106,7 +106,7 @@ int bpe = bpp/4; int attriblist[] = { GLX_RGBA, GLX_DOUBLEBUFFER, - GLX_DEPTH_SIZE, 24, + GLX_DEPTH_SIZE, bpp, GLX_RED_SIZE, bpe, GLX_GREEN_SIZE, bpe, GLX_BLUE_SIZE, bpe, @@ -114,7 +114,7 @@ None }; int attriblistna[] = { GLX_RGBA, GLX_DOUBLEBUFFER, - GLX_DEPTH_SIZE, 24, + GLX_DEPTH_SIZE, bpp, GLX_RED_SIZE, bpe, GLX_GREEN_SIZE, bpe, GLX_BLUE_SIZE, bpe, |
From: Elias N. <eli...@us...> - 2002-11-30 21:43:09
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1:/tmp/cvs-serv29549/linux Removed Files: Makefile.elias_naur Log Message: Removed Makefile.elias_naur --- Makefile.elias_naur DELETED --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/Makefile.elias_naur |
From: Luke H. <lh...@us...> - 2002-11-30 21:36:14
|
Update of /cvsroot/java-game-lib/LWJGL/src/native In directory sc8-pr-cvs1:/tmp/cvs-serv25097 Modified Files: autogen.sh configure.in Log Message: ac*.m4 files are no longer in cvs Index: autogen.sh CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/autogen.sh =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/autogen.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- autogen.sh 29 Nov 2002 08:29:53 -0000 1.2 +++ autogen.sh 30 Nov 2002 21:36:12 -0000 1.3 @@ -2,7 +2,6 @@ #WANT_AUTOMAKE_1_5=1 autoheader linux -mv aclocal.m4 acinclude.m4 aclocal automake --foreign --include-deps --add-missing --copy autoconf Index: configure.in CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/configure.in =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/configure.in,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- configure.in 30 Nov 2002 00:19:59 -0000 1.4 +++ configure.in 30 Nov 2002 21:36:12 -0000 1.5 @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(acinclude.m4) +AC_INIT(dummy.cpp) dnl These should be changed =) LWJGL_MAJOR_VERSION=0 |
From: Luke H. <lh...@us...> - 2002-11-30 21:35:22
|
Update of /cvsroot/java-game-lib/LWJGL/src/native In directory sc8-pr-cvs1:/tmp/cvs-serv24600 Removed Files: acinclude.m4 aclocal.m4 stamp-h.in Log Message: Files are automatically generated --- acinclude.m4 DELETED --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/acinclude.m4 --- aclocal.m4 DELETED --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/aclocal.m4 --- stamp-h.in DELETED --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/stamp-h.in |
From: Elias N. <eli...@us...> - 2002-11-30 21:25:03
|
Update of /cvsroot/java-game-lib/LWJGL/src/native In directory sc8-pr-cvs1:/tmp/cvs-serv18783 Modified Files: acinclude.m4 aclocal.m4 Log Message: Added the XWarpointer call again - this time centering the pointer Index: acinclude.m4 CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/acinclude.m4 =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/acinclude.m4,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- acinclude.m4 30 Nov 2002 03:28:29 -0000 1.4 +++ acinclude.m4 30 Nov 2002 21:25:00 -0000 1.5 @@ -1,3 +1,28 @@ +# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*- + +# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +dnl aclocal.m4 generated automatically by aclocal 1.4-p5 + +dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without +dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A +dnl PARTICULAR PURPOSE. + dnl aclocal.m4 generated automatically by aclocal 1.4-p5 dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. @@ -3651,10 +3676,15 @@ # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) +<<<<<<< aclocal.m4 +======= + + +>>>>>>> 1.5 Index: aclocal.m4 CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/aclocal.m4 =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/aclocal.m4,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- aclocal.m4 30 Nov 2002 03:28:30 -0000 1.5 +++ aclocal.m4 30 Nov 2002 21:25:00 -0000 1.6 @@ -1,3 +1,29 @@ +# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*- + +# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*- + +# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + dnl aclocal.m4 generated automatically by aclocal 1.4-p5 dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. @@ -3663,11 +3689,16 @@ # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) +<<<<<<< aclocal.m4 +======= + + +>>>>>>> 1.5 |
From: Elias N. <eli...@us...> - 2002-11-30 21:25:03
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1:/tmp/cvs-serv18783/linux Modified Files: org_lwjgl_input_Mouse.cpp Log Message: Added the XWarpointer call again - this time centering the pointer Index: org_lwjgl_input_Mouse.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_input_Mouse.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_input_Mouse.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- org_lwjgl_input_Mouse.cpp 29 Nov 2002 11:51:10 -0000 1.8 +++ org_lwjgl_input_Mouse.cpp 30 Nov 2002 21:25:00 -0000 1.9 @@ -133,6 +133,7 @@ int mask = EnterWindowMask | LeaveWindowMask | PointerMotionMask | ButtonPressMask | ButtonReleaseMask; if (current_fullscreen) { result = XGrabPointer(disp, win, False, mask, GrabModeAsync, GrabModeAsync, win, blank_cursor, CurrentTime); + XWarpPointer(disp, None, win, 0, 0, 0, 0, current_x, current_y); XF86VidModeSetViewPort(disp, screen, 0, 0); // make sure we have a centered window } else result = XGrabPointer(disp, win, False, mask, GrabModeAsync, GrabModeAsync, None, blank_cursor, CurrentTime); |
From: Luke H. <lh...@us...> - 2002-11-30 03:40:50
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/callbacks In directory sc8-pr-cvs1:/tmp/cvs-serv16805/callbacks Modified Files: README.txt Log Message: added GLUQuadricCallbacks::clear(); to quadricDelete Index: README.txt CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/callbacks/README.txt =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/callbacks/README.txt,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- README.txt 30 Nov 2002 03:32:50 -0000 1.9 +++ README.txt 30 Nov 2002 03:40:47 -0000 1.10 @@ -49,6 +49,19 @@ } +/* + * Class: org_lwjgl_opengl_GLU + * Method: deleteQuadric + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLU_deleteQuadric(JNIEnv * env, jobject obj, jint quad) +{ + gluDeleteQuadric((GLUquadricObj *) quad); + GLUQuadricCallbacks::clear(); + CHECK_GL_ERROR +} + + + and call it from java: /* myquadric is a reference to a GLUquadricObj returned by glu.newQuadric() |
From: Luke H. <lh...@us...> - 2002-11-30 03:40:50
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv16805 Modified Files: org_lwjgl_opengl_GLU.cpp Log Message: added GLUQuadricCallbacks::clear(); to quadricDelete Index: org_lwjgl_opengl_GLU.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GLU.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GLU.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- org_lwjgl_opengl_GLU.cpp 30 Nov 2002 03:28:30 -0000 1.3 +++ org_lwjgl_opengl_GLU.cpp 30 Nov 2002 03:40:47 -0000 1.4 @@ -195,6 +195,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLU_deleteQuadric(JNIEnv * env, jobject obj, jint quad) { gluDeleteQuadric((GLUquadricObj *) quad); + GLUQuadricCallbacks::clear(); CHECK_GL_ERROR } |