Added initialization to all global symbols, to please MacOSX
This commit is contained in:
parent
0f95034fd3
commit
8b5e85a72e
|
@ -65,10 +65,10 @@ void* handleOAL;
|
|||
#include <mach-o/dyld.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
const struct mach_header* handleOAL;
|
||||
const struct mach_header* handleOAL = NULL;
|
||||
#endif
|
||||
|
||||
alGetProcAddressPROC alGetProcAddress;
|
||||
alGetProcAddressPROC alGetProcAddress = NULL;
|
||||
|
||||
/* Loads OpenAL */
|
||||
static bool LoadOpenAL(JNIEnv *env, jobjectArray oalPaths);
|
||||
|
|
|
@ -46,8 +46,8 @@
|
|||
#include <alctypes.h>
|
||||
#endif
|
||||
#ifdef _MACOSX
|
||||
#include <OpenAL/alctypes.h>
|
||||
#include <OpenAL/altypes.h>
|
||||
#include <AL/alctypes.h>
|
||||
#include <AL/altypes.h>
|
||||
#endif
|
||||
|
||||
#include <jni.h>
|
||||
|
@ -59,7 +59,7 @@ void extal_InitializeClass(JNIEnv *env, jclass clazz, int num_functions, JavaMet
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32)
|
||||
#ifdef _OPENAL32LIB
|
||||
#define ALCAPI __declspec(dllexport)
|
||||
#else
|
||||
|
@ -71,49 +71,43 @@ extern "C" {
|
|||
|
||||
#define ALCAPIENTRY __cdecl
|
||||
#else
|
||||
#ifdef _MACOSX
|
||||
#if _MACOSX
|
||||
typedef struct ALCdevice_struct ALCdevice;
|
||||
typedef struct ALCcontext_struct ALCcontext;
|
||||
|
||||
#define ALCAPI
|
||||
#define ALCAPIENTRY
|
||||
|
||||
#ifdef _X11
|
||||
/** ALC boolean type. */
|
||||
typedef char ALCboolean;
|
||||
|
||||
/** ALC 8bit signed byte. */
|
||||
typedef char ALCbyte;
|
||||
|
||||
/** ALC 8bit unsigned byte. */
|
||||
typedef unsigned char ALCubyte;
|
||||
|
||||
/** ALC 16bit signed short integer type. */
|
||||
typedef short ALCshort;
|
||||
|
||||
/** ALC 16bit unsigned short integer type. */
|
||||
typedef unsigned short ALCushort;
|
||||
|
||||
/** ALC 32bit unsigned integer type. */
|
||||
typedef unsigned ALCuint;
|
||||
|
||||
/** ALC 32bit signed integer type. */
|
||||
typedef int ALCint;
|
||||
|
||||
/** ALC 32bit floating point type. */
|
||||
typedef float ALCfloat;
|
||||
|
||||
/** ALC 64bit double point type. */
|
||||
typedef double ALCdouble;
|
||||
|
||||
/** ALC 32bit type. */
|
||||
typedef unsigned int ALCsizei;
|
||||
|
||||
/** ALC void type */
|
||||
typedef void ALCvoid;
|
||||
#endif
|
||||
#endif
|
||||
#define ALCAPI
|
||||
#define ALCAPIENTRY
|
||||
|
||||
/** ALC boolean type. */
|
||||
typedef char ALCboolean;
|
||||
|
||||
/** ALC 8bit signed byte. */
|
||||
typedef char ALCbyte;
|
||||
|
||||
/** ALC 8bit unsigned byte. */
|
||||
typedef unsigned char ALCubyte;
|
||||
|
||||
/** ALC 16bit signed short integer type. */
|
||||
typedef short ALCshort;
|
||||
|
||||
/** ALC 16bit unsigned short integer type. */
|
||||
typedef unsigned short ALCushort;
|
||||
|
||||
/** ALC 32bit unsigned integer type. */
|
||||
typedef unsigned ALCuint;
|
||||
|
||||
/** ALC 32bit signed integer type. */
|
||||
typedef int ALCint;
|
||||
|
||||
/** ALC 32bit floating point type. */
|
||||
typedef float ALCfloat;
|
||||
|
||||
/** ALC 64bit double point type. */
|
||||
typedef double ALCdouble;
|
||||
|
||||
/** ALC 32bit type. */
|
||||
typedef unsigned int ALCsizei;
|
||||
|
||||
/** ALC void type */
|
||||
typedef void ALCvoid;
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
|
@ -85,7 +85,6 @@ aglResetLibraryPROC aglResetLibrary = NULL;
|
|||
aglSurfaceTexturePROC aglSurfaceTexture = NULL;
|
||||
#endif
|
||||
|
||||
|
||||
struct ExtensionTypes extgl_Extensions;
|
||||
|
||||
#ifdef _WIN32
|
||||
|
@ -269,7 +268,8 @@ bool extgl_QueryExtension(JNIEnv *env, const GLubyte*extensions, const char *nam
|
|||
/*-----------------------------------------------------*/
|
||||
#ifdef _MACOSX
|
||||
|
||||
bool extgl_InitAGL(JNIEnv *env)
|
||||
// Commecnted out as AGL is not needed
|
||||
/*bool extgl_InitAGL(JNIEnv *env)
|
||||
{
|
||||
aglChoosePixelFormat = (aglChoosePixelFormatPROC)extgl_GetProcAddress("aglChoosePixelFormat");
|
||||
aglDestroyPixelFormat = (aglDestroyPixelFormatPROC)extgl_GetProcAddress("aglDestroyPixelFormat");
|
||||
|
@ -306,7 +306,7 @@ bool extgl_InitAGL(JNIEnv *env)
|
|||
aglSurfaceTexture = (aglSurfaceTexturePROC)extgl_GetProcAddress("aglSurfaceTexture");
|
||||
return !extgl_error; // Split out AGL into extgl_agl.cpp like wgl and glx and replace with InitializeFunctions
|
||||
}
|
||||
|
||||
*/
|
||||
#endif
|
||||
/*-----------------------------------------------------*/
|
||||
/* AGL stuff END*/
|
||||
|
|
|
@ -98,11 +98,11 @@ typedef ALvoid (ALAPIENTRY *alDistanceModelPROC)( ALenum value );
|
|||
typedef ALvoid (ALAPIENTRY *alDopplerFactorPROC)( ALfloat value );
|
||||
typedef ALvoid (ALAPIENTRY *alDopplerVelocityPROC)( ALfloat value );
|
||||
|
||||
alIsExtensionPresentPROC alIsExtensionPresent;
|
||||
alGetStringPROC alGetString;
|
||||
alGetErrorPROC alGetError;
|
||||
alIsExtensionPresentPROC alIsExtensionPresent = NULL;
|
||||
alGetStringPROC alGetString = NULL;
|
||||
alGetErrorPROC alGetError = NULL;
|
||||
|
||||
alEnablePROC alEnable;
|
||||
alEnablePROC alEnable = NULL;
|
||||
static alDisablePROC alDisable;
|
||||
static alIsEnabledPROC alIsEnabled;
|
||||
//static alHintPROC alHint;
|
||||
|
|
|
@ -59,7 +59,7 @@ typedef ALCboolean (ALCAPIENTRY *alcIsExtensionPresentPROC)(ALCdevice *device,A
|
|||
//typedef ALCvoid* (ALCAPIENTRY *alcGetProcAddressPROC)(ALCdevice *device,ALCubyte *funcName);
|
||||
typedef ALCenum (ALCAPIENTRY *alcGetEnumValuePROC)(ALCdevice *device,ALCubyte *enumName);
|
||||
|
||||
alcGetCurrentContextPROC alcGetCurrentContext;
|
||||
alcGetCurrentContextPROC alcGetCurrentContext = NULL;
|
||||
static alcGetStringPROC alcGetString;
|
||||
static alcGetIntegervPROC alcGetIntegerv;
|
||||
static alcOpenDevicePROC alcOpenDevice;
|
||||
|
|
Loading…
Reference in New Issue