- route texture binding through the renderstate class for better control. Currently it's just a direct passthrough but this will change.

This commit is contained in:
Christoph Oelckers 2014-09-09 12:00:42 +02:00
commit 4bb320a27c
16 changed files with 37 additions and 35 deletions

View file

@ -214,7 +214,7 @@ void GLSprite::Draw(int pass)
gl_RenderState.SetFog(0, 0);
}
if (gltexture) gltexture->Bind(CLAMP_XY, translation, OverrideShader, !!(RenderStyle.Flags & STYLEF_RedIsAlpha));
if (gltexture) gl_RenderState.SetMaterial(gltexture, CLAMP_XY, translation, OverrideShader, !!(RenderStyle.Flags & STYLEF_RedIsAlpha));
else if (!modelframe) gl_RenderState.EnableTexture(false);
if (!modelframe)