after much suffering, got GE build and work almost cleanly on Os X
authorJean-Luc Peurière <jlp@nerim.net>
Mon, 16 Jan 2006 22:27:30 +0000 (22:27 +0000)
committerJean-Luc Peurière <jlp@nerim.net>
Mon, 16 Jan 2006 22:27:30 +0000 (22:27 +0000)
(with make, need to confirm with scons)

after cleaning the changes are in fact minimal, but the situation
is still quite a bit hackish.

Game engine coders, there is also quite a number of warnings that
need to be fixed.

current situation is that everything seems to work, but GLSL shaders
spew a lot of errors on console and blender may crash on exit when
a GLSL shader was used. ARB stuff works fine.

18 files changed:
SConstruct
source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp
source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp
source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
source/gameengine/GamePlayer/ghost/GPG_Application.cpp
source/gameengine/Ketsji/BL_Shader.cpp
source/gameengine/Ketsji/BL_Texture.cpp
source/gameengine/Ketsji/KX_BlenderMaterial.cpp
source/gameengine/Ketsji/KX_PythonInit.cpp
source/gameengine/Rasterizer/Makefile
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/Makefile
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.cpp
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_GLExtensionManager.h
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp
source/nan_compile.mk
source/nan_definitions.mk

index 953234a432c437d7a7679a5ba9e14b1a36b2d985..36f6aa7b7d8efce411930d7a61ef4d481fe3b813 100644 (file)
@@ -176,7 +176,7 @@ elif sys.platform == 'darwin':
        fink_path = '/sw/'
        # TODO : try -mpowerpc -mpowerpc-gopt -mpowerpc-gfxopt optims
        #           doing actual profiling
-       extra_flags = ['-pipe', '-fPIC', '-funsigned-char', '-ffast-math', '-mpowerpc', '-mtune=G4']
+       extra_flags = ['-pipe', '-fPIC', '-funsigned-char', '-mpowerpc', '-mtune=G5']
        
        # , '-malign-natural'] malign is causing problems with jpeg lib but worth a 1-2% speedup
        #'-force_cpusubtype_ALL', '-mpowerpc-gpopt', 
index 028dcbe46012f2e786f62ba08f0f909b5d7bde75..4dbddaf2d62aa4f3bb4bb9e0c346b19f65d6b10a 100644 (file)
 #pragma warning (disable:4786)
 #endif
 
+#ifdef __APPLE__
+#define GL_GLEXT_LEGACY 1
+#endif 
+
 #include "KX_BlenderGL.h"
 #include "KX_BlenderCanvas.h"
 #include "KX_BlenderKeyboardDevice.h"
index a100c3aaa0a1f36c75d8917035b572c9a81dd112..8f93ad1a0aa318efcfcb896ebc7b0e41213ae6e9 100644 (file)
@@ -36,6 +36,7 @@
 #include <windows.h>
 #endif //WIN32
 #ifdef __APPLE__
+#define GL_GLEXT_LEGACY 1
 #include <OpenGL/gl.h>
 #else
 #include <GL/gl.h>
index dc714fb5fb6dec5a1935471ddea9b1a20ad02ea0..9cad9fcf93240314d4447b834bb687d2f419af36 100644 (file)
@@ -38,6 +38,7 @@
 #include <windows.h>
 #endif // WIN32
 #ifdef __APPLE__
+#define GL_GLEXT_LEGACY 1
 #include <OpenGL/gl.h>
 #include <OpenGL/glu.h>
 #else
index 3d81046e8e9ce770901ee77ceafa2cb96eb95c45..9bc01e1408e63cf2b3c30672fc16f75b02ed635c 100644 (file)
@@ -38,6 +38,7 @@
 #endif 
 
 #ifdef __APPLE__
+#define GL_GLEXT_LEGACY 1
 #include <OpenGL/gl.h>
 #else
 #include <GL/gl.h>
index c5324776edba7a0f744c91809f578d1196e95abc..2ab98750881f0d241b85041ac2baa4838aa44d4f 100644 (file)
@@ -41,6 +41,7 @@
 #endif
 
 #ifdef __APPLE__
+#define GL_GLEXT_LEGACY 1
 #include <OpenGL/gl.h>
 #include <OpenGL/glu.h>
 #else
index 4cc01f820cfdf025d40ffc8e5e2e57e7bfa4048a..981f96928d5ceb2e480f790387cec4217c5fc13d 100644 (file)
@@ -3,6 +3,7 @@
 #include <windows.h>
 #endif // WIN32
 #ifdef __APPLE__
+#define GL_GLEXT_LEGACY 1
 #include <OpenGL/gl.h>
 #include <OpenGL/glu.h>
 #else
index 6595d5ee12afe02aa3a89ee25830b5995903898c..2b01d3df5601071741d11f6706dca6c47e57512e 100644 (file)
@@ -3,6 +3,7 @@
 #include <windows.h>
 #endif // WIN32
 #ifdef __APPLE__
+#define GL_GLEXT_LEGACY 1
 #include <OpenGL/gl.h>
 #include <OpenGL/glu.h>
 #else
index cbb521338135918ae6e2471d40b3ee20f7d71d1b..ace68a823a8cd0f210c083a2987edfd4614e7e9a 100644 (file)
@@ -10,6 +10,7 @@
 #include <windows.h>
 #endif // WIN32
 #ifdef __APPLE__
+#define GL_GLEXT_LEGACY 1
 #include <OpenGL/gl.h>
 #include <OpenGL/glu.h>
 #else
index ba4f0e55615a6b87bc7fb024eb4ed78c54e60a34..6f7b73ee4fac079331c2fa3ec144aed9308fd7c5 100644 (file)
@@ -39,6 +39,7 @@
 #include <windows.h>
 #endif // WIN32
 #ifdef __APPLE__
+#define GL_GLEXT_LEGACY 1
 #include <OpenGL/gl.h>
 #include <OpenGL/glu.h>
 #else
index 6a1421ae90bc13f780d3e7000612f6986c8caa5c..5f8eace8adb1fc789642fa915962630b929b9f4a 100644 (file)
@@ -42,7 +42,9 @@ CPPFLAGS += -I$(OPENGL_HEADERS)
 CPPFLAGS += -I$(NAN_STRING)/include    
 CPPFLAGS += -I$(NAN_MOTO)/include
 CPPFLAGS += -I../../kernel/gen_system
-
+ifeq ($(OS),darwin)
+       CPPFLAGS += -fpascal-strings
+endif
 ###############
 
 SOURCEDIR = source/gameengine/Rasterizer
index c03aab3422e044d6073d4d63841f566972916ec2..40f3fc500058ce8f1339b35f9fc2693fe51d081d 100644 (file)
@@ -44,4 +44,6 @@ CPPFLAGS += -I$(NAN_STRING)/include
 CPPFLAGS += -I$(NAN_MOTO)/include
 CPPFLAGS += -I../../../kernel/gen_system
 CPPFLAGS += -I..
-
+ifeq ($(OS),darwin)
+       CPPFLAGS += -fpascal-strings
+endif
index 2b47acb2e32a2786b1054390200631ace5c99f60..af3a9bca03e86e271236bac03ecd020ed75da43b 100644 (file)
@@ -47,7 +47,7 @@
 
 #elif defined(__APPLE__)
 #  include <Carbon/Carbon.h>
-
+#  define GL_GLEXT_LEGACY 1
 #  include <OpenGL/gl.h>
 
 #else /* UNIX */
index 9f81f48b6be6935ae27bdd8bf012dfb95dec9996..a5dad19222bc74ba8fd247fe3ed84c8b13a1b80f 100644 (file)
@@ -39,6 +39,7 @@
 
 #elif defined(__APPLE__)
 #  define __glext_h_
+#  define GL_GLEXT_LEGACY 1
 #  include <OpenGL/gl.h>
 #  include <OpenGL/glu.h>
 #  undef __glext_h_
@@ -52,6 +53,7 @@
 #endif
 
 #include "glext.h"
+
 #include "EXT_separate_specular_color.h"
 #include "ARB_multitexture.h"
 namespace bgl
index 8acd5168bd988dc0579bc2e88d91be8e1a55da9d..38dfb7836b2efd5be2e288cb8d4aba484f95fb64 100644 (file)
@@ -41,6 +41,7 @@
 #include <windows.h>
 #endif // WIN32
 #ifdef __APPLE__
+#define GL_GLEXT_LEGACY 1
 #include <OpenGL/gl.h>
 #include <OpenGL/glu.h>
 #else
index 77beed5ead12aabdc3b2711541bd254738d7a528..b6d8e74c2d5f8bf0b13c6a64e96632587980819a 100644 (file)
@@ -38,6 +38,7 @@
 #include <windows.h>
 #endif // WIN32
 #ifdef __APPLE__
+#define GL_GLEXT_LEGACY 1
 #include <OpenGL/gl.h>
 #else
 #include <GL/gl.h>
index 8386a6d9ea7fad0ccc01f8091380e2e71d03c6cd..f64be26b62118b7411408701f5063eb045866617 100644 (file)
@@ -80,7 +80,7 @@ endif
 ifeq ($(OS),darwin)
     CC = gcc
     CCC        = g++
-    CFLAGS     += -pipe -fPIC -ffast-math -mcpu=7450 -mtune=7450
+    CFLAGS     += -pipe -fPIC -ffast-math -mcpu=7450 -mtune=G5
     CCFLAGS    += -pipe -fPIC 
     REL_CFLAGS += -O2
     REL_CCFLAGS        += -O2
index 1fa61ba718e0f57023b248a07c50de0783fb06b0..7a29aa2e72429ce45c4f408fe6b5a45abc7a9b86 100644 (file)
@@ -170,6 +170,9 @@ endif
     export NAN_SDLCFLAGS ?= -I$(NAN_SDL)/include
     export NAN_SDLLIBS ?= $(NAN_SDL)/lib/libSDL.a -framework Cocoa -framework IOKit
 
+    export NAN_NO_KETSJI=false
+
+
     # Uncomment the following line to use Mozilla inplace of netscape
     # CPPFLAGS +=-DMOZ_NOT_NET
     # Location of MOZILLA/Netscape header files...