From 2cc2ebca3196c275b3efb8ac54be75d62bae8408 Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Fri, 30 May 2014 23:03:19 +0200 Subject: [PATCH] GLState: Get rid of GL_TEXTURE_2D enable/disable This bit was deprecated/removed in core GL. There was only one place where this was used (flash tiles in Tilemap), and since the full shader rewrite, it was effectively a no-op anyway (flash shader doesn't sample texture). --- src/glstate.cpp | 6 ------ src/glstate.h | 6 ------ src/tilemap.cpp | 2 -- 3 files changed, 14 deletions(-) diff --git a/src/glstate.cpp b/src/glstate.cpp index 2f1c7fe..b02537b 100644 --- a/src/glstate.cpp +++ b/src/glstate.cpp @@ -56,11 +56,6 @@ void GLScissorTest::apply(const bool &value) value ? glEnable(GL_SCISSOR_TEST) : glDisable(GL_SCISSOR_TEST); } -void GLTexture2D::apply(const bool &value) -{ - value ? glEnable(GL_TEXTURE_2D) : glDisable(GL_TEXTURE_2D); -} - void GLBlendMode::apply(const BlendType &value) { switch (value) @@ -115,6 +110,5 @@ GLState::GLState() blendMode.init(BlendNormal); scissorTest.init(false); scissorBox.init(IntRect(0, 0, 640, 480)); - texture2D.init(true); program.init(0); } diff --git a/src/glstate.h b/src/glstate.h index 613c555..a78d592 100644 --- a/src/glstate.h +++ b/src/glstate.h @@ -84,11 +84,6 @@ class GLScissorTest : public GLProperty void apply(const bool &value); }; -class GLTexture2D : public GLProperty -{ - void apply(const bool &value); -}; - class GLBlendMode : public GLProperty { void apply(const BlendType &value); @@ -111,7 +106,6 @@ public: GLClearColor clearColor; GLScissorBox scissorBox; GLScissorTest scissorTest; - GLTexture2D texture2D; GLBlendMode blendMode; GLViewport viewport; GLProgram program; diff --git a/src/tilemap.cpp b/src/tilemap.cpp index 2cdf6ba..9cd8432 100644 --- a/src/tilemap.cpp +++ b/src/tilemap.cpp @@ -1136,7 +1136,6 @@ void GroundLayer::draw() { VAO::bind(p->flash.vao); glState.blendMode.pushSet(BlendAddition); - glState.texture2D.pushSet(false); FlashMapShader &shader = shState->shaders().flashMap; shader.bind(); @@ -1155,7 +1154,6 @@ void GroundLayer::draw() drawFlashInt(); } - glState.texture2D.pop(); glState.blendMode.pop(); }