- some cleanup and preparation on RenderState interface.

This commit is contained in:
Christoph Oelckers 2018-10-20 21:36:50 +02:00
commit 9ef5e00cdf
13 changed files with 73 additions and 51 deletions

View file

@ -130,7 +130,7 @@ void FGLModelRenderer::SetInterpolation(double inter)
void FGLModelRenderer::SetMaterial(FTexture *skin, bool clampNoFilter, int translation)
{
FMaterial * tex = FMaterial::ValidateTexture(skin, false);
gl_RenderState.SetMaterial(tex, clampNoFilter ? CLAMP_NOFILTER : CLAMP_NONE, translation, -1, false);
gl_RenderState.ApplyMaterial(tex, clampNoFilter ? CLAMP_NOFILTER : CLAMP_NONE, translation, -1);
gl_RenderState.Apply();
if (modellightindex != -1) gl_RenderState.ApplyLightIndex(modellightindex);