- move view and projection matrices to DrawInfo.

This commit is contained in:
Christoph Oelckers 2018-06-21 20:54:34 +02:00
commit 1967165633
27 changed files with 80 additions and 94 deletions

View file

@ -107,8 +107,6 @@ void FRenderState::Reset()
mDynColor.Set(0.0f, 0.0f, 0.0f, 0.0f);
mEffectState = 0;
activeShader = nullptr;
mProjectionMatrix.loadIdentity();
mViewMatrix.loadIdentity();
mModelMatrix.loadIdentity();
mTextureMatrix.loadIdentity();
mPassType = NORMAL_PASS;
@ -304,17 +302,6 @@ void FRenderState::ApplyColorMask()
}
}
void FRenderState::ApplyMatrices()
{
if (GLRenderer->mShaderManager != NULL)
{
VSMatrix norm;
norm.computeNormalMatrix(mViewMatrix);
GLRenderer->mShaderManager->ApplyMatrices(&mProjectionMatrix, &mViewMatrix, &norm, mPassType);
}
}
void FRenderState::ApplyLightIndex(int index)
{
if (index > -1 && GLRenderer->mLights->GetBufferType() == GL_UNIFORM_BUFFER)