- remove use of builtin texture matrices.

- make matrix class single precision.
This commit is contained in:
Christoph Oelckers 2014-07-13 20:41:20 +02:00
commit dbb05c5f33
14 changed files with 198 additions and 175 deletions

View file

@ -56,6 +56,8 @@ FRenderState gl_RenderState;
CVAR(Bool, gl_direct_state_change, true, 0)
static VSMatrix identityMatrix(1);
//==========================================================================
//
//
@ -225,6 +227,27 @@ bool FRenderState::ApplyShader()
activeShader->muColormapStart.Set(r, g, b, 1.f);
}
}
if (mTextureMatrixEnabled)
{
mTextureMatrix.matrixToGL(activeShader->texturematrix_index);
activeShader->currentTextureMatrixState = true;
}
else if (activeShader->currentTextureMatrixState)
{
activeShader->currentTextureMatrixState = false;
identityMatrix.matrixToGL(activeShader->texturematrix_index);
}
if (mModelMatrixEnabled)
{
mModelMatrix.matrixToGL(activeShader->modelmatrix_index);
activeShader->currentModelMatrixState = true;
}
else if (activeShader->currentModelMatrixState)
{
activeShader->currentModelMatrixState = false;
identityMatrix.matrixToGL(activeShader->modelmatrix_index);
}
return true;
}