summaryrefslogtreecommitdiffstats
path: root/src/graphics/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphics/opengl')
-rw-r--r--src/graphics/opengl/gldevice.cpp23
-rw-r--r--src/graphics/opengl/gldevice.h3
2 files changed, 2 insertions, 24 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;
diff --git a/src/graphics/opengl/gldevice.h b/src/graphics/opengl/gldevice.h
index 78c7433..8af864e 100644
--- a/src/graphics/opengl/gldevice.h
+++ b/src/graphics/opengl/gldevice.h
@@ -119,9 +119,6 @@ public:
virtual void SetTextureStageWrap(int index, Gfx::TexWrapMode wrapS, Gfx::TexWrapMode wrapT);
- virtual void SetTextureFactor(const Color &color);
- virtual Color GetTextureFactor();
-
virtual void DrawPrimitive(PrimitiveType type, const Vertex *vertices, int vertexCount);
virtual void DrawPrimitive(PrimitiveType type, const VertexCol *vertices, int vertexCount);
virtual void DrawPrimitive(PrimitiveType type, const VertexTex2 *vertices, int vertexCount);