more work to get armatures/blender materials to work under non-windows platforms
authorErwin Coumans <blender@erwincoumans.com>
Sat, 7 Jan 2006 00:14:37 +0000 (00:14 +0000)
committerErwin Coumans <blender@erwincoumans.com>
Sat, 7 Jan 2006 00:14:37 +0000 (00:14 +0000)
intern/SoundSystem/openal/SND_OpenALDevice.cpp
source/gameengine/Ketsji/KX_BlenderMaterial.cpp
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/ARB_multitexture.h
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.cpp
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.h
source/nan_definitions.mk

index 75dbd3ee33baeea7981b0032273fa674de1310ba..98eed6bb1040839ba978618e610b12618c9942b3 100644 (file)
@@ -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);
index 8884e82e2f56c5a0c8075a4bd1426f3849b7bc0e..ab2b9c63b211c303cf0209d7f4ac17a1b733584c 100644 (file)
@@ -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
index 0c68673ffb3851b68dba30ad4da4245aaba6685c..0730c632b8225b7a5aa94c2b31dce7a3b6a6742b 100644 (file)
@@ -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
index 71b68815c1573c57a372807e8abe8df8ad60213a..dee75662236d86739debcd479fb16e90bd437aea 100644 (file)
@@ -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"))
        {
index 119eda3b5bb9e1b576bcb28c224f937471030c1e..5009691d3f5fadfc24212c0e9473adbe39f0b16e 100644 (file)
@@ -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);
index ade6058438236ef9abacda7f674dfa327d098e3a..93a0557ab783b1339c1016b77593d84b1407269c 100644 (file)
@@ -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/-.*//')