summaryrefslogtreecommitdiffstats
path: root/src/graphics/opengl/gldevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphics/opengl/gldevice.cpp')
-rw-r--r--src/graphics/opengl/gldevice.cpp23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/graphics/opengl/gldevice.cpp b/src/graphics/opengl/gldevice.cpp
index 56a7130..78a77bd 100644
--- a/src/graphics/opengl/gldevice.cpp
+++ b/src/graphics/opengl/gldevice.cpp
@@ -684,6 +684,8 @@ void CGLDevice::SetTextureStageParams(int index, const TextureStageParams &param
glActiveTexture(GL_TEXTURE0 + index);
+ glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, params.factor.Array());
+
// To save some trouble
if ( (params.colorOperation == TEX_MIX_OPER_DEFAULT) &&
(params.alphaOperation == TEX_MIX_OPER_DEFAULT) )
@@ -836,27 +838,6 @@ TextureStageParams CGLDevice::GetTextureStageParams(int index)
return m_textureStageParams[index];
}
-void CGLDevice::SetTextureFactor(const Color &color)
-{
- // Needs to be set for all texture stages
- for (int index = 0; index < static_cast<int>( m_currentTextures.size() ); ++index)
- {
- glActiveTexture(GL_TEXTURE0 + index);
- glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, color.Array());
- }
-}
-
-Color CGLDevice::GetTextureFactor()
-{
- // Get from 1st stage (should be the same for all stages)
- glActiveTexture(GL_TEXTURE0);
-
- GLfloat color[4] = { 0.0f };
- glGetTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, color);
-
- return Color(color[0], color[1], color[2], color[3]);
-}
-
GLenum TranslateGfxPrimitive(PrimitiveType type)
{
GLenum flag = 0;