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).
This commit is contained in:
Jonas Kulla 2014-05-30 23:03:19 +02:00
parent 7b1f599dd6
commit 2cc2ebca31
3 changed files with 0 additions and 14 deletions

View File

@ -56,11 +56,6 @@ void GLScissorTest::apply(const bool &value)
value ? glEnable(GL_SCISSOR_TEST) : glDisable(GL_SCISSOR_TEST); 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) void GLBlendMode::apply(const BlendType &value)
{ {
switch (value) switch (value)
@ -115,6 +110,5 @@ GLState::GLState()
blendMode.init(BlendNormal); blendMode.init(BlendNormal);
scissorTest.init(false); scissorTest.init(false);
scissorBox.init(IntRect(0, 0, 640, 480)); scissorBox.init(IntRect(0, 0, 640, 480));
texture2D.init(true);
program.init(0); program.init(0);
} }

View File

@ -84,11 +84,6 @@ class GLScissorTest : public GLProperty<bool>
void apply(const bool &value); void apply(const bool &value);
}; };
class GLTexture2D : public GLProperty<bool>
{
void apply(const bool &value);
};
class GLBlendMode : public GLProperty<BlendType> class GLBlendMode : public GLProperty<BlendType>
{ {
void apply(const BlendType &value); void apply(const BlendType &value);
@ -111,7 +106,6 @@ public:
GLClearColor clearColor; GLClearColor clearColor;
GLScissorBox scissorBox; GLScissorBox scissorBox;
GLScissorTest scissorTest; GLScissorTest scissorTest;
GLTexture2D texture2D;
GLBlendMode blendMode; GLBlendMode blendMode;
GLViewport viewport; GLViewport viewport;
GLProgram program; GLProgram program;

View File

@ -1136,7 +1136,6 @@ void GroundLayer::draw()
{ {
VAO::bind(p->flash.vao); VAO::bind(p->flash.vao);
glState.blendMode.pushSet(BlendAddition); glState.blendMode.pushSet(BlendAddition);
glState.texture2D.pushSet(false);
FlashMapShader &shader = shState->shaders().flashMap; FlashMapShader &shader = shState->shaders().flashMap;
shader.bind(); shader.bind();
@ -1155,7 +1154,6 @@ void GroundLayer::draw()
drawFlashInt(); drawFlashInt();
} }
glState.texture2D.pop();
glState.blendMode.pop(); glState.blendMode.pop();
} }