mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-26 07:35:40 +00:00
avoid double matrix load
This commit is contained in:
parent
a7e851d578
commit
5dab9910e2
|
@ -178,8 +178,6 @@ bool CNew3D::RenderScene(int priority, bool renderOverlay, Layer layer)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_r3dShader.SetModelStates(&m);
|
|
||||||
|
|
||||||
for (auto &mesh : *m.meshes) {
|
for (auto &mesh : *m.meshes) {
|
||||||
|
|
||||||
if (mesh.highPriority) {
|
if (mesh.highPriority) {
|
||||||
|
@ -190,7 +188,7 @@ bool CNew3D::RenderScene(int priority, bool renderOverlay, Layer layer)
|
||||||
if (mesh.highPriority != renderOverlay) continue;
|
if (mesh.highPriority != renderOverlay) continue;
|
||||||
|
|
||||||
if (!matrixLoaded) {
|
if (!matrixLoaded) {
|
||||||
glLoadMatrixf(m.modelMat);
|
m_r3dShader.SetModelStates(&m);
|
||||||
matrixLoaded = true; // do this here to stop loading matrices we don't need. Ie when rendering non transparent etc
|
matrixLoaded = true; // do this here to stop loading matrices we don't need. Ie when rendering non transparent etc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue