- remove use of builtin texture matrices.
- make matrix class single precision.
This commit is contained in:
parent
9230a20f18
commit
dbb05c5f33
14 changed files with 198 additions and 175 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue