WINTERMUTE: Don't accidentally revert view matrix to identity
This commit is contained in:
parent
bee56f5802
commit
f9f8d0d527
1 changed files with 3 additions and 1 deletions
|
@ -479,9 +479,11 @@ bool BaseRenderOpenGL3D::setup3D(Camera3D *camera, bool force) {
|
||||||
|
|
||||||
Math::Matrix4 viewMatrix;
|
Math::Matrix4 viewMatrix;
|
||||||
camera->getViewMatrix(&viewMatrix);
|
camera->getViewMatrix(&viewMatrix);
|
||||||
glMultMatrixf(viewMatrix.getData());
|
glLoadMatrixf(viewMatrix.getData());
|
||||||
glTranslatef(-camera->_position.x(), -camera->_position.y(), -camera->_position.z());
|
glTranslatef(-camera->_position.x(), -camera->_position.y(), -camera->_position.z());
|
||||||
glGetFloatv(GL_MODELVIEW_MATRIX, _lastViewMatrix.getData());
|
glGetFloatv(GL_MODELVIEW_MATRIX, _lastViewMatrix.getData());
|
||||||
|
} else {
|
||||||
|
glLoadMatrixf(_lastViewMatrix.getData());
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < maximumLightsCount(); ++i) {
|
for (int i = 0; i < maximumLightsCount(); ++i) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue