improvement of 2d-filter custom shader,
[blender.git] / source / gameengine / BlenderRoutines / KX_BlenderRenderTools.cpp
index ffd66655069a076e89811f6506aa6c00b8f282a2..220d174d464c00966be6991a3a28a749cf6a3374 100644 (file)
 
 #include "KX_BlenderRenderTools.h"
 
-#ifdef WIN32
-// OpenGL gl.h needs 'windows.h' on windows platforms 
-#include <windows.h>
-#endif //WIN32
-#ifdef __APPLE__
-#define GL_GLEXT_LEGACY 1
-#include <OpenGL/gl.h>
-#else
-#include <GL/gl.h>
-#endif
+#include "GL/glew.h"
 
 #include "RAS_IRenderTools.h"
 #include "RAS_IRasterizer.h"
@@ -317,7 +308,7 @@ void KX_BlenderRenderTools::EnableOpenGLLights()
        glEnable(GL_COLOR_MATERIAL);
        glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
        glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, true);
-       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);
 
 }
@@ -492,9 +483,9 @@ void KX_BlenderRenderTools::MotionBlur(RAS_IRasterizer* rasterizer)
        }
 }
 
-void KX_BlenderRenderTools::Update2DFilter(RAS_2DFilterManager::RAS_2DFILTER_MODE filtermode, int pass, STR_String& text)
+void KX_BlenderRenderTools::Update2DFilter(vector<STR_String>& propNames, void* gameObj, RAS_2DFilterManager::RAS_2DFILTER_MODE filtermode, int pass, STR_String& text)
 {
-       m_filtermanager.EnableFilter(filtermode, pass, text);
+       m_filtermanager.EnableFilter(propNames, gameObj, filtermode, pass, text);
 }
 
 void KX_BlenderRenderTools::Render2DFilters(RAS_ICanvas* canvas)