diff options
6 files changed, 25 insertions, 12 deletions
diff --git a/intern/SoundSystem/openal/SND_OpenALDevice.cpp b/intern/SoundSystem/openal/SND_OpenALDevice.cpp index 75dbd3ee33b..98eed6bb104 100644 --- a/intern/SoundSystem/openal/SND_OpenALDevice.cpp +++ b/intern/SoundSystem/openal/SND_OpenALDevice.cpp @@ -231,8 +231,12 @@ SND_OpenALDevice::SND_OpenALDevice() m_context = alcCreateContext(dev, NULL); if (m_context) { - alcMakeContextCurrent((ALCcontext*)m_context); - m_audio = true; +#ifdef AL_VERSION_1_1 + alcMakeContextCurrent((ALCcontext*)m_context); +#else + alcMakeContextCurrent(m_context); +#endif + m_audio = true; m_device = dev; #ifdef __linux__ /* @@ -339,7 +343,11 @@ SND_OpenALDevice::~SND_OpenALDevice() if (m_context) { MakeCurrent(); +#ifdef AL_VERSION_1_1 alcDestroyContext((ALCcontext*)m_context); +#else + alcDestroyContext(m_context); +#endif m_context = NULL; } @@ -421,7 +429,12 @@ SND_WaveSlot* SND_OpenALDevice::LoadSample(const STR_String& name, #if defined(OUDE_OPENAL) || defined (__APPLE__) alutLoadWAVMemory((char*)memlocation, &sampleformat, &data, &numberofsamples, &samplerate); // openal_2.12 #else +#ifdef AL_VERSION_1_1 alutLoadWAVMemory((ALbyte*)memlocation, &sampleformat, &data, &numberofsamples, &samplerate, &loop);// openal_2.14+ +#else + alutLoadWAVMemory((signed char*)memlocation, &sampleformat, &data, &numberofsamples, &samplerate, &loop);// openal_2.14+ + +#endif #endif /* put it in the buffer */ alBufferData(m_buffers[buffer], sampleformat, data, numberofsamples, samplerate); diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp index 8884e82e2f5..ab2b9c63b21 100644 --- a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp +++ b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp @@ -1,7 +1,7 @@ + // ------------------------------------ // ... // ------------------------------------ -#ifdef WIN32 #ifdef HAVE_CONFIG_H #include <config.h> #endif @@ -973,4 +973,3 @@ KX_PYMETHODDEF_DOC( KX_BlenderMaterial, setTexture , "setTexture( index, tex)") return NULL; } -#endif //WIN32 diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/ARB_multitexture.h b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/ARB_multitexture.h index 0c68673ffb3..0730c632b82 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/ARB_multitexture.h +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/ARB_multitexture.h @@ -11,9 +11,7 @@ GL_ARB_multitexture ---------------------------------------------------------------------------- */ #ifndef GL_ARB_multitexture -#ifdef WIN32 #define GL_ARB_multitexture 1 -#endif //WIN32 #endif #ifdef GL_ARB_multitexture diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.cpp index 71b68815c15..dee75662236 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.cpp +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.cpp @@ -322,7 +322,6 @@ BL_EXTInfo RAS_EXT_support; #if defined(GL_ARB_multitexture) int max_texture_units = 2; - PFNGLACTIVETEXTUREARBPROC glActiveTextureARB; PFNGLCLIENTACTIVETEXTUREARBPROC glClientActiveTextureARB; PFNGLMULTITEXCOORD1DARBPROC glMultiTexCoord1dARB; @@ -466,10 +465,12 @@ static void LinkExtensions() } #endif +#ifdef WIN32 #ifdef GL_ARB_multitexture if (QueryExtension("GL_ARB_multitexture")) { - glActiveTextureARB = reinterpret_cast<PFNGLACTIVETEXTUREARBPROC>(bglGetProcAddress((const GLubyte *) "glActiveTextureARB")); + void* ptr=0; + glActiveTextureARB = reinterpret_cast<PFNGLACTIVETEXTUREARBPROC>(ptr);//bglGetProcAddress((const GLubyte *) "glActiveTextureARB")); glClientActiveTextureARB = reinterpret_cast<PFNGLCLIENTACTIVETEXTUREARBPROC>(bglGetProcAddress((const GLubyte *) "glClientActiveTextureARB")); glMultiTexCoord1dARB = reinterpret_cast<PFNGLMULTITEXCOORD1DARBPROC>(bglGetProcAddress((const GLubyte *) "glMultiTexCoord1dARB")); glMultiTexCoord1dvARB = reinterpret_cast<PFNGLMULTITEXCOORD1DVARBPROC>(bglGetProcAddress((const GLubyte *) "glMultiTexCoord1dvARB")); @@ -513,9 +514,9 @@ static void LinkExtensions() } } #endif +#endif// WIN32 - - +#ifdef WIN32 #ifdef GL_EXT_blend_color if (QueryExtension("GL_EXT_blend_color")) { @@ -530,7 +531,7 @@ static void LinkExtensions() } } #endif - +#endif #ifdef GL_ARB_shader_objects if (QueryExtension("GL_ARB_shader_objects")) { diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.h b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.h index 119eda3b5bb..5009691d3f5 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.h +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.h @@ -44,7 +44,6 @@ #include "EXT_separate_specular_color.h" #include "ARB_multitexture.h" - namespace bgl { /** @@ -409,6 +408,7 @@ extern PFNGLBLENDCOLOREXTPROC glBlendColorEXT; #endif #ifdef GL_ARB_multitexture + extern int max_texture_units; typedef void (APIENTRY * PFNGLACTIVETEXTUREARBPROC) (GLenum texture); typedef void (APIENTRY * PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); diff --git a/source/nan_definitions.mk b/source/nan_definitions.mk index ade60584382..93a0557ab78 100644 --- a/source/nan_definitions.mk +++ b/source/nan_definitions.mk @@ -47,6 +47,8 @@ all debug:: # First generic defaults for all platforms which should be constant. # Note: ?= lets these defaults be overruled by environment variables, export NAN_NO_KETSJI=true + export NAN_JUST_BLENDERDYNAMIC=true + export NAN_NO_OPENAL=true export SRCHOME ?= $(NANBLENDERHOME)/source export CONFIG_GUESS := $(shell ${SRCHOME}/tools/guess/guessconfig) export OS := $(shell echo ${CONFIG_GUESS} | sed -e 's/-.*//') |