Skybox rendering bugfix (model matrix wasn't being set properly so the skybox was drawing with the old model matrix, which was the XYZ overlay one)

This commit is contained in:
parax0 2015-09-01 20:54:30 -04:00
parent 89c1654b6a
commit 2690e79f95
1 changed files with 1 additions and 1 deletions

View File

@ -257,7 +257,6 @@ void CRenderer::RenderSky(CModel *pSkyboxModel, CCamera& Camera)
if (!pSkyboxModel) return;
glEnable(GL_CULL_FACE);
Camera.LoadRotationOnlyMatrices();
CGraphics::sMVPBlock.ModelMatrix = CMatrix4f::skIdentity;
CGraphics::sVertexBlock.COLOR0_Amb = CVector4f(1.f, 1.f, 1.f, 1.f);
@ -266,6 +265,7 @@ void CRenderer::RenderSky(CModel *pSkyboxModel, CCamera& Camera)
CGraphics::UpdateVertexBlock();
CGraphics::UpdatePixelBlock();
CGraphics::UpdateLightBlock();
Camera.LoadRotationOnlyMatrices();
glDepthRange(1.f, 1.f);
pSkyboxModel->Draw(mOptions, 0);