diff options
author | Hamed Zaghaghi <hamed.zaghaghi@gmail.com> | 2008-07-21 03:34:17 +0400 |
---|---|---|
committer | Hamed Zaghaghi <hamed.zaghaghi@gmail.com> | 2008-07-21 03:34:17 +0400 |
commit | 8f17a66036012ae3f527b95ea9489afbfb212429 (patch) | |
tree | 7b6175151a98e5089c638a045934bf84d8222f3b /source/gameengine | |
parent | 5350d5eb2c306b5ae65aa93df12d2bededd326fd (diff) |
BGE 2dFilters some extra fixes
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/Rasterizer/RAS_2DFilterManager.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp index ebaeaa9e3d3..ef206332057 100644 --- a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp +++ b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp @@ -159,7 +159,8 @@ void RAS_2DFilterManager::AnalyseShader(int passindex, vector<STR_String>& propN texflag[passindex] = 0; if(glGetUniformLocationARB(m_filters[passindex], "bgl_DepthTexture") != -1) { - texflag[passindex] |= 0x1; + if(GLEW_ARB_depth_texture) + texflag[passindex] |= 0x1; } if(glGetUniformLocationARB(m_filters[passindex], "bgl_LuminanceTexture") != -1) { @@ -262,7 +263,7 @@ void RAS_2DFilterManager::SetupTextures(bool depth, bool luminance) glGenTextures(1, (GLuint*)&texname[0]); glBindTexture(GL_TEXTURE_2D, texname[0]); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texturewidth, textureheight, 0, GL_RGB, + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texturewidth, textureheight, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); |