diff options
-rw-r--r-- | source/gameengine/Ketsji/BL_Shader.cpp | 2 | ||||
-rw-r--r-- | source/gameengine/Rasterizer/RAS_2DFilterManager.cpp | 13 |
2 files changed, 11 insertions, 4 deletions
diff --git a/source/gameengine/Ketsji/BL_Shader.cpp b/source/gameengine/Ketsji/BL_Shader.cpp index 3bd5146f28f..105a87e767b 100644 --- a/source/gameengine/Ketsji/BL_Shader.cpp +++ b/source/gameengine/Ketsji/BL_Shader.cpp @@ -1428,8 +1428,8 @@ KX_PYMETHODDEF_DOC( BL_Shader, setAttrib, "setAttrib(enum)" ) bgl::blBindAttribLocationARB(mShader, mAttr, "Tangent"); Py_Return; } - return NULL; #endif + return NULL; } diff --git a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp index 39f81bd1156..e03133b9031 100644 --- a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp +++ b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp @@ -91,7 +91,8 @@ RAS_2DFilterManager::~RAS_2DFilterManager() unsigned int RAS_2DFilterManager::CreateShaderProgram(char* shadersource) { - GLuint program; + GLuint program = 0; +#if defined(GL_ARB_multitexture) && defined(WITH_GLEXT) GLuint fShader = bgl::blCreateShaderObjectARB(GL_FRAGMENT_SHADER); GLint success; @@ -127,6 +128,7 @@ unsigned int RAS_2DFilterManager::CreateShaderProgram(char* shadersource) std::cout << "2dFilters - Shader program validation error" << std::endl; return 0; } +#endif return program; } @@ -160,7 +162,8 @@ unsigned int RAS_2DFilterManager::CreateShaderProgram(int filtermode) void RAS_2DFilterManager::StartShaderProgram(unsigned int shaderprogram) { - GLint uniformLoc; +#if defined(GL_ARB_multitexture) && defined(WITH_GLEXT) + GLint uniformLoc; bgl::blUseProgramObjectARB(shaderprogram); uniformLoc = bgl::blGetUniformLocationARB(shaderprogram, "bgl_RenderedTexture"); if (uniformLoc != -1) @@ -182,12 +185,14 @@ void RAS_2DFilterManager::StartShaderProgram(unsigned int shaderprogram) { bgl::blUniform1fARB(uniformLoc,textureheight); } - +#endif } void RAS_2DFilterManager::EndShaderProgram() { +#if defined(GL_ARB_multitexture) && defined(WITH_GLEXT) bgl::blUseProgramObjectARB(0); +#endif } void RAS_2DFilterManager::SetupTexture() @@ -297,6 +302,7 @@ void RAS_2DFilterManager::EnableFilter(RAS_2DFILTER_MODE mode, int pass, STR_Str { if(!isshadersupported) return; +#if defined(GL_ARB_multitexture) && defined(WITH_GLEXT) if(pass<0 || pass>=MAX_RENDER_PASS) return; @@ -337,4 +343,5 @@ void RAS_2DFilterManager::EnableFilter(RAS_2DFILTER_MODE mode, int pass, STR_Str m_filters[pass] = CreateShaderProgram(mode); m_enabled[pass] = 1; } +#endif } |