diff options
Diffstat (limited to 'source/gameengine/GamePlayer/common')
7 files changed, 18 insertions, 53 deletions
diff --git a/source/gameengine/GamePlayer/common/CMakeLists.txt b/source/gameengine/GamePlayer/common/CMakeLists.txt index 29cdcd640f5..e26f8b9d69a 100644 --- a/source/gameengine/GamePlayer/common/CMakeLists.txt +++ b/source/gameengine/GamePlayer/common/CMakeLists.txt @@ -69,6 +69,7 @@ SET(INC ../../../../source/gameengine/GamePlayer/ghost ../../../../source/blender/misc ../../../../source/blender/blenloader + ../../../../extern/glew/include ${PYTHON_INC} ${SOLID_INC} ${PNG_INC} diff --git a/source/gameengine/GamePlayer/common/GPC_Canvas.h b/source/gameengine/GamePlayer/common/GPC_Canvas.h index bd66c865988..f82166dfa88 100644 --- a/source/gameengine/GamePlayer/common/GPC_Canvas.h +++ b/source/gameengine/GamePlayer/common/GPC_Canvas.h @@ -33,18 +33,12 @@ #include "RAS_ICanvas.h" #include "RAS_Rect.h" -#if defined(WIN32) || defined(__APPLE__) - #ifdef WIN32 - #pragma warning (disable:4786) // suppress stl-MSVC debug info warning - #include <windows.h> - #include <GL/gl.h> - #else // WIN32 - // __APPLE__ is defined - #include <AGL/gl.h> - #endif // WIN32 -#else //defined(WIN32) || defined(__APPLE__) - #include <GL/gl.h> -#endif //defined(WIN32) || defined(__APPLE__) +#ifdef WIN32 + #pragma warning (disable:4786) // suppress stl-MSVC debug info warning + #include <windows.h> +#endif // WIN32 + +#include "GL/glew.h" #include <map> diff --git a/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp b/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp index c2f15aefe16..b1e2b5af0e6 100644 --- a/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp +++ b/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp @@ -31,23 +31,7 @@ #include <config.h> #endif -#ifdef WIN32 -#include <windows.h> -#endif // WIN32 -#ifdef __APPLE__ -#define GL_GLEXT_LEGACY 1 -#include <OpenGL/gl.h> -#include <OpenGL/glu.h> -#else -#include <GL/gl.h> -#if defined(__sun__) && !defined(__sparc__) -#include <mesa/glu.h> -#else -#include <GL/glu.h> -#endif -#endif - - +#include "GL/glew.h" #include "GPC_PolygonMaterial.h" #include "MT_Vector3.h" @@ -88,7 +72,6 @@ static int fDoMipMap = 1; static int fLinearMipMap=1; static int fAlphamode= -1; -using namespace bgl; /* (n&(n-1)) zeros the least significant bit of n */ static int is_pow2(int num) { return ((num)&(num-1))==0; diff --git a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp index 885981a2898..44eeccedbd1 100644 --- a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp +++ b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp @@ -34,12 +34,8 @@ #include <windows.h> #endif -#ifdef __APPLE__ -#define GL_GLEXT_LEGACY 1 -#include <OpenGL/gl.h> -#else -#include <GL/gl.h> -#endif +#include "GL/glew.h" + #include <iostream> #include "GPC_RenderTools.h" @@ -137,10 +133,6 @@ int GPC_RenderTools::ProcessLighting(int layer) { if (m_clientobject) { - if (layer == RAS_LIGHT_OBJECT_LAYER) - { - layer = static_cast<KX_GameObject*>(m_clientobject)->GetLayer(); - } if (applyLights(layer)) { EnableOpenGLLights(); @@ -160,7 +152,7 @@ void GPC_RenderTools::EnableOpenGLLights() glEnable(GL_LIGHTING); glEnable(GL_COLOR_MATERIAL); glColorMaterial(GL_FRONT_AND_BACK,GL_DIFFUSE); - if (bgl::QueryExtension(bgl::_GL_EXT_separate_specular_color) || bgl::QueryVersion(1, 2)) + if (GLEW_EXT_separate_specular_color || GLEW_VERSION_1_2) glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR); } diff --git a/source/gameengine/GamePlayer/common/GPC_RenderTools.h b/source/gameengine/GamePlayer/common/GPC_RenderTools.h index ee0212da643..f7230cb0865 100644 --- a/source/gameengine/GamePlayer/common/GPC_RenderTools.h +++ b/source/gameengine/GamePlayer/common/GPC_RenderTools.h @@ -30,18 +30,11 @@ #ifndef __GPC_RENDERTOOLS_H #define __GPC_RENDERTOOLS_H -#if defined(WIN32) || defined(__APPLE__) - #ifdef WIN32 - #include <windows.h> - #include <GL/gl.h> - #else // WIN32 - // __APPLE__ is defined - #include <AGL/gl.h> - #endif // WIN32 -#else //defined(WIN32) || defined(__APPLE__) - #include <GL/gl.h> -#endif //defined(WIN32) || defined(__APPLE__) +#ifdef WIN32 + #include <windows.h> +#endif // WIN32 +#include "GL/glew.h" #include "RAS_IRenderTools.h" diff --git a/source/gameengine/GamePlayer/common/Makefile b/source/gameengine/GamePlayer/common/Makefile index 508dee18755..19d792ddbdb 100644 --- a/source/gameengine/GamePlayer/common/Makefile +++ b/source/gameengine/GamePlayer/common/Makefile @@ -35,6 +35,7 @@ include nan_compile.mk CCFLAGS += $(LEVEL_1_CPP_WARNINGS) +CPPFLAGS += -I$(NAN_GLEW)/include CPPFLAGS += -I$(OPENGL_HEADERS) CPPFLAGS += -I../../../blender/blenkernel diff --git a/source/gameengine/GamePlayer/common/SConscript b/source/gameengine/GamePlayer/common/SConscript index 6ff3ae10735..3b2367d2592 100644 --- a/source/gameengine/GamePlayer/common/SConscript +++ b/source/gameengine/GamePlayer/common/SConscript @@ -45,7 +45,8 @@ incs = ['.', '#source/gameengine/Network/LoopBackNetwork', '#source/gameengine/GamePlayer/ghost', '#source/blender/misc', - '#source/blender/blenloader'] + '#source/blender/blenloader', + '#extern/glew/include'] #This is all plugin stuff! #if sys.platform=='win32': |