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 <mach-o/dyld.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
const struct mach_header* handleOAL;
|
const struct mach_header* handleOAL = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
alGetProcAddressPROC alGetProcAddress;
|
alGetProcAddressPROC alGetProcAddress = NULL;
|
||||||
|
|
||||||
/* Loads OpenAL */
|
/* Loads OpenAL */
|
||||||
static bool LoadOpenAL(JNIEnv *env, jobjectArray oalPaths);
|
static bool LoadOpenAL(JNIEnv *env, jobjectArray oalPaths);
|
||||||
|
|
|
@ -46,8 +46,8 @@
|
||||||
#include <alctypes.h>
|
#include <alctypes.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef _MACOSX
|
#ifdef _MACOSX
|
||||||
#include <OpenAL/alctypes.h>
|
#include <AL/alctypes.h>
|
||||||
#include <OpenAL/altypes.h>
|
#include <AL/altypes.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <jni.h>
|
#include <jni.h>
|
||||||
|
@ -59,7 +59,7 @@ void extal_InitializeClass(JNIEnv *env, jclass clazz, int num_functions, JavaMet
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if defined(_WIN32)
|
||||||
#ifdef _OPENAL32LIB
|
#ifdef _OPENAL32LIB
|
||||||
#define ALCAPI __declspec(dllexport)
|
#define ALCAPI __declspec(dllexport)
|
||||||
#else
|
#else
|
||||||
|
@ -71,49 +71,43 @@ extern "C" {
|
||||||
|
|
||||||
#define ALCAPIENTRY __cdecl
|
#define ALCAPIENTRY __cdecl
|
||||||
#else
|
#else
|
||||||
#ifdef _MACOSX
|
#define ALCAPI
|
||||||
#if _MACOSX
|
#define ALCAPIENTRY
|
||||||
typedef struct ALCdevice_struct ALCdevice;
|
|
||||||
typedef struct ALCcontext_struct ALCcontext;
|
|
||||||
|
|
||||||
|
#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
|
||||||
#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
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
|
@ -85,7 +85,6 @@ aglResetLibraryPROC aglResetLibrary = NULL;
|
||||||
aglSurfaceTexturePROC aglSurfaceTexture = NULL;
|
aglSurfaceTexturePROC aglSurfaceTexture = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
struct ExtensionTypes extgl_Extensions;
|
struct ExtensionTypes extgl_Extensions;
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@ -269,7 +268,8 @@ bool extgl_QueryExtension(JNIEnv *env, const GLubyte*extensions, const char *nam
|
||||||
/*-----------------------------------------------------*/
|
/*-----------------------------------------------------*/
|
||||||
#ifdef _MACOSX
|
#ifdef _MACOSX
|
||||||
|
|
||||||
bool extgl_InitAGL(JNIEnv *env)
|
// Commecnted out as AGL is not needed
|
||||||
|
/*bool extgl_InitAGL(JNIEnv *env)
|
||||||
{
|
{
|
||||||
aglChoosePixelFormat = (aglChoosePixelFormatPROC)extgl_GetProcAddress("aglChoosePixelFormat");
|
aglChoosePixelFormat = (aglChoosePixelFormatPROC)extgl_GetProcAddress("aglChoosePixelFormat");
|
||||||
aglDestroyPixelFormat = (aglDestroyPixelFormatPROC)extgl_GetProcAddress("aglDestroyPixelFormat");
|
aglDestroyPixelFormat = (aglDestroyPixelFormatPROC)extgl_GetProcAddress("aglDestroyPixelFormat");
|
||||||
|
@ -306,7 +306,7 @@ bool extgl_InitAGL(JNIEnv *env)
|
||||||
aglSurfaceTexture = (aglSurfaceTexturePROC)extgl_GetProcAddress("aglSurfaceTexture");
|
aglSurfaceTexture = (aglSurfaceTexturePROC)extgl_GetProcAddress("aglSurfaceTexture");
|
||||||
return !extgl_error; // Split out AGL into extgl_agl.cpp like wgl and glx and replace with InitializeFunctions
|
return !extgl_error; // Split out AGL into extgl_agl.cpp like wgl and glx and replace with InitializeFunctions
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
#endif
|
#endif
|
||||||
/*-----------------------------------------------------*/
|
/*-----------------------------------------------------*/
|
||||||
/* AGL stuff END*/
|
/* AGL stuff END*/
|
||||||
|
|
|
@ -98,11 +98,11 @@ typedef ALvoid (ALAPIENTRY *alDistanceModelPROC)( ALenum value );
|
||||||
typedef ALvoid (ALAPIENTRY *alDopplerFactorPROC)( ALfloat value );
|
typedef ALvoid (ALAPIENTRY *alDopplerFactorPROC)( ALfloat value );
|
||||||
typedef ALvoid (ALAPIENTRY *alDopplerVelocityPROC)( ALfloat value );
|
typedef ALvoid (ALAPIENTRY *alDopplerVelocityPROC)( ALfloat value );
|
||||||
|
|
||||||
alIsExtensionPresentPROC alIsExtensionPresent;
|
alIsExtensionPresentPROC alIsExtensionPresent = NULL;
|
||||||
alGetStringPROC alGetString;
|
alGetStringPROC alGetString = NULL;
|
||||||
alGetErrorPROC alGetError;
|
alGetErrorPROC alGetError = NULL;
|
||||||
|
|
||||||
alEnablePROC alEnable;
|
alEnablePROC alEnable = NULL;
|
||||||
static alDisablePROC alDisable;
|
static alDisablePROC alDisable;
|
||||||
static alIsEnabledPROC alIsEnabled;
|
static alIsEnabledPROC alIsEnabled;
|
||||||
//static alHintPROC alHint;
|
//static alHintPROC alHint;
|
||||||
|
|
|
@ -59,7 +59,7 @@ typedef ALCboolean (ALCAPIENTRY *alcIsExtensionPresentPROC)(ALCdevice *device,A
|
||||||
//typedef ALCvoid* (ALCAPIENTRY *alcGetProcAddressPROC)(ALCdevice *device,ALCubyte *funcName);
|
//typedef ALCvoid* (ALCAPIENTRY *alcGetProcAddressPROC)(ALCdevice *device,ALCubyte *funcName);
|
||||||
typedef ALCenum (ALCAPIENTRY *alcGetEnumValuePROC)(ALCdevice *device,ALCubyte *enumName);
|
typedef ALCenum (ALCAPIENTRY *alcGetEnumValuePROC)(ALCdevice *device,ALCubyte *enumName);
|
||||||
|
|
||||||
alcGetCurrentContextPROC alcGetCurrentContext;
|
alcGetCurrentContextPROC alcGetCurrentContext = NULL;
|
||||||
static alcGetStringPROC alcGetString;
|
static alcGetStringPROC alcGetString;
|
||||||
static alcGetIntegervPROC alcGetIntegerv;
|
static alcGetIntegervPROC alcGetIntegerv;
|
||||||
static alcOpenDevicePROC alcOpenDevice;
|
static alcOpenDevicePROC alcOpenDevice;
|
||||||
|
|
Loading…
Reference in New Issue