This is an automated email from the git hooks/post-receive script. odyx pushed a commit to branch debian/master in repository colobot.
commit ebca89d9200e7ff649ee11e7ba071824ae80dd31 Author: Tomasz Kapuściński <tomaszka...@gmail.com> Date: Wed May 11 13:47:08 2016 +0200 Removed texture coordinate generation This feature was only needed by GL14 device to implement shadow mapping and is not supported by shader-based devices. Shadow mapping has been rewritten, so this feature is no longer needed. --- src/graphics/core/device.h | 3 --- src/graphics/core/nulldevice.cpp | 4 ---- src/graphics/core/nulldevice.h | 1 - src/graphics/opengl/gl21device.cpp | 42 -------------------------------------- src/graphics/opengl/gl21device.h | 1 - src/graphics/opengl/gl33device.cpp | 5 ----- src/graphics/opengl/gl33device.h | 1 - src/graphics/opengl/gldevice.cpp | 40 ------------------------------------ src/graphics/opengl/gldevice.h | 1 - 9 files changed, 98 deletions(-) diff --git a/src/graphics/core/device.h b/src/graphics/core/device.h index 2b5f4a6..b4e897d 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 ad483ed..aba9f80 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 3a78ea8..5721d92 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 f5fb774..e1a96db 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<int>( m_currentTextures.size() )); diff --git a/src/graphics/opengl/gl21device.h b/src/graphics/opengl/gl21device.h index 83627bf..9b073e3 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 c0c1e12..df67e5c 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<int>( m_currentTextures.size() )); diff --git a/src/graphics/opengl/gl33device.h b/src/graphics/opengl/gl33device.h index 317c7b1..a47fb99 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 423520d..e28b6c2 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<int>(m_currentTextures.size())); diff --git a/src/graphics/opengl/gldevice.h b/src/graphics/opengl/gldevice.h index baaaa3b..33973f1 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; -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git _______________________________________________ Pkg-games-commits mailing list Pkg-games-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits