diff --git a/src/graphics/core/device.h b/src/graphics/core/device.h index 2b5f4a60..b4e897db 100644 --- a/src/graphics/core/device.h +++ b/src/graphics/core/device.h @@ -413,9 +413,6 @@ public: //! Sets only the texture wrap modes (for faster than thru stage params) virtual void SetTextureStageWrap(int index, TexWrapMode wrapS, TexWrapMode wrapT) = 0; - //! Sets the texture coordinate generation mode for given texture unit - virtual void SetTextureCoordGeneration(int index, TextureGenerationParams ¶ms) = 0; - //! Renders primitive composed of vertices with single texture virtual void DrawPrimitive(PrimitiveType type, const Vertex *vertices , int vertexCount, Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) = 0; diff --git a/src/graphics/core/nulldevice.cpp b/src/graphics/core/nulldevice.cpp index ad483ede..aba9f800 100644 --- a/src/graphics/core/nulldevice.cpp +++ b/src/graphics/core/nulldevice.cpp @@ -154,10 +154,6 @@ void CNullDevice::SetTextureStageWrap(int index, TexWrapMode wrapS, TexWrapMode { } -void CNullDevice::SetTextureCoordGeneration(int index, TextureGenerationParams ¶ms) -{ -} - void CNullDevice::DrawPrimitive(PrimitiveType type, const Vertex *vertices, int vertexCount, Color color) { diff --git a/src/graphics/core/nulldevice.h b/src/graphics/core/nulldevice.h index 3a78ea83..5721d920 100644 --- a/src/graphics/core/nulldevice.h +++ b/src/graphics/core/nulldevice.h @@ -80,7 +80,6 @@ public: void SetTextureStageParams(int index, const TextureStageParams ¶ms) override; void SetTextureStageWrap(int index, Gfx::TexWrapMode wrapS, Gfx::TexWrapMode wrapT) override; - void SetTextureCoordGeneration(int index, TextureGenerationParams ¶ms) override; void DrawPrimitive(PrimitiveType type, const Vertex* vertices, int vertexCount, Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) override; void DrawPrimitive(PrimitiveType type, const VertexTex2* vertices, int vertexCount, Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) override; diff --git a/src/graphics/opengl/gl21device.cpp b/src/graphics/opengl/gl21device.cpp index f5fb7741..e1a96dbe 100644 --- a/src/graphics/opengl/gl21device.cpp +++ b/src/graphics/opengl/gl21device.cpp @@ -1058,48 +1058,6 @@ void CGL21Device::SetTextureStageParams(int index, const TextureStageParams &par UpdateTextureParams(index); } -void CGL21Device::SetTextureCoordGeneration(int index, TextureGenerationParams ¶ms) -{ - /* - glActiveTexture(GL_TEXTURE0 + index); - - for (int i = 0; i < 4; i++) - { - GLuint texCoordGen = TranslateTextureCoordinateGen(i); - GLuint texCoord = TranslateTextureCoordinate(i); - - switch (params.coords[i].mode) - { - case TEX_GEN_NONE: - glDisable(texCoordGen); - break; - case TEX_GEN_OBJECT_LINEAR: - glEnable(texCoordGen); - glTexGeni(texCoord, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); - glTexGenfv(texCoord, GL_OBJECT_PLANE, params.coords[i].plane); - break; - case TEX_GEN_EYE_LINEAR: - glEnable(texCoordGen); - glTexGeni(texCoord, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR); - glTexGenfv(texCoord, GL_EYE_PLANE, params.coords[i].plane); - break; - case TEX_GEN_SPHERE_MAP: - glEnable(texCoordGen); - glTexGeni(texCoord, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); - break; - case TEX_GEN_NORMAL_MAP: - glEnable(texCoordGen); - glTexGeni(texCoord, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP); - break; - case TEX_GEN_REFLECTION_MAP: - glEnable(texCoordGen); - glTexGeni(texCoord, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP); - break; - } - } - // */ -} - void CGL21Device::UpdateTextureParams(int index) { assert(index >= 0 && index < static_cast( m_currentTextures.size() )); diff --git a/src/graphics/opengl/gl21device.h b/src/graphics/opengl/gl21device.h index 83627bfc..9b073e31 100644 --- a/src/graphics/opengl/gl21device.h +++ b/src/graphics/opengl/gl21device.h @@ -99,7 +99,6 @@ public: void SetTextureStageParams(int index, const TextureStageParams ¶ms) override; void SetTextureStageWrap(int index, Gfx::TexWrapMode wrapS, Gfx::TexWrapMode wrapT) override; - void SetTextureCoordGeneration(int index, TextureGenerationParams ¶ms) override; virtual void DrawPrimitive(PrimitiveType type, const Vertex *vertices , int vertexCount, Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) override; diff --git a/src/graphics/opengl/gl33device.cpp b/src/graphics/opengl/gl33device.cpp index c0c1e124..df67e5c1 100644 --- a/src/graphics/opengl/gl33device.cpp +++ b/src/graphics/opengl/gl33device.cpp @@ -1009,11 +1009,6 @@ void CGL33Device::SetTextureStageParams(int index, const TextureStageParams &par UpdateTextureParams(index); } -void CGL33Device::SetTextureCoordGeneration(int index, TextureGenerationParams ¶ms) -{ - -} - void CGL33Device::UpdateTextureParams(int index) { assert(index >= 0 && index < static_cast( m_currentTextures.size() )); diff --git a/src/graphics/opengl/gl33device.h b/src/graphics/opengl/gl33device.h index 317c7b13..a47fb999 100644 --- a/src/graphics/opengl/gl33device.h +++ b/src/graphics/opengl/gl33device.h @@ -114,7 +114,6 @@ public: void SetTextureStageParams(int index, const TextureStageParams ¶ms) override; void SetTextureStageWrap(int index, Gfx::TexWrapMode wrapS, Gfx::TexWrapMode wrapT) override; - void SetTextureCoordGeneration(int index, TextureGenerationParams ¶ms) override; virtual void DrawPrimitive(PrimitiveType type, const Vertex *vertices , int vertexCount, Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) override; diff --git a/src/graphics/opengl/gldevice.cpp b/src/graphics/opengl/gldevice.cpp index 423520d6..e28b6c2a 100644 --- a/src/graphics/opengl/gldevice.cpp +++ b/src/graphics/opengl/gldevice.cpp @@ -992,46 +992,6 @@ void CGLDevice::SetTextureStageParams(int index, const TextureStageParams ¶m UpdateTextureParams(index); } -void CGLDevice::SetTextureCoordGeneration(int index, TextureGenerationParams ¶ms) -{ - glActiveTexture(GL_TEXTURE0 + m_remap[index]); - - for (int i = 0; i < 4; i++) - { - GLuint texCoordGen = TranslateTextureCoordinateGen(i); - GLuint texCoord = TranslateTextureCoordinate(i); - - switch (params.coords[i].mode) - { - case TEX_GEN_NONE: - glDisable(texCoordGen); - break; - case TEX_GEN_OBJECT_LINEAR: - glEnable(texCoordGen); - glTexGeni(texCoord, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR); - glTexGenfv(texCoord, GL_OBJECT_PLANE, params.coords[i].plane); - break; - case TEX_GEN_EYE_LINEAR: - glEnable(texCoordGen); - glTexGeni(texCoord, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR); - glTexGenfv(texCoord, GL_EYE_PLANE, params.coords[i].plane); - break; - case TEX_GEN_SPHERE_MAP: - glEnable(texCoordGen); - glTexGeni(texCoord, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); - break; - case TEX_GEN_NORMAL_MAP: - glEnable(texCoordGen); - glTexGeni(texCoord, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP); - break; - case TEX_GEN_REFLECTION_MAP: - glEnable(texCoordGen); - glTexGeni(texCoord, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP); - break; - } - } -} - void CGLDevice::UpdateTextureParams(int index) { assert(index >= 0 && index < static_cast(m_currentTextures.size())); diff --git a/src/graphics/opengl/gldevice.h b/src/graphics/opengl/gldevice.h index baaaa3b8..33973f14 100644 --- a/src/graphics/opengl/gldevice.h +++ b/src/graphics/opengl/gldevice.h @@ -118,7 +118,6 @@ public: void SetTextureStageParams(int index, const TextureStageParams ¶ms) override; void SetTextureStageWrap(int index, Gfx::TexWrapMode wrapS, Gfx::TexWrapMode wrapT) override; - void SetTextureCoordGeneration(int index, TextureGenerationParams ¶ms) override; virtual void DrawPrimitive(PrimitiveType type, const Vertex *vertices , int vertexCount, Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) override;