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);
}
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);
}

View File

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

View File

@ -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();
}