fixed minor graphics issues, related to recent camera initialization changes
This commit is contained in:
@@ -788,6 +788,7 @@ void DemoApplication::resetPerspectiveProjection()
|
|||||||
glMatrixMode(GL_PROJECTION);
|
glMatrixMode(GL_PROJECTION);
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
glMatrixMode(GL_MODELVIEW);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
|
updateCamera();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1096,6 +1097,8 @@ void DemoApplication::renderme()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateCamera();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DemoApplication::clientResetScene()
|
void DemoApplication::clientResetScene()
|
||||||
|
|||||||
@@ -644,10 +644,13 @@ void VehicleDemo::updateCamera()
|
|||||||
//update OpenGL camera settings
|
//update OpenGL camera settings
|
||||||
glFrustum(-1.0, 1.0, -1.0, 1.0, 1.0, 10000.0);
|
glFrustum(-1.0, 1.0, -1.0, 1.0, 1.0, 10000.0);
|
||||||
|
|
||||||
|
glMatrixMode(GL_MODELVIEW);
|
||||||
|
glLoadIdentity();
|
||||||
|
|
||||||
gluLookAt(m_cameraPosition[0],m_cameraPosition[1],m_cameraPosition[2],
|
gluLookAt(m_cameraPosition[0],m_cameraPosition[1],m_cameraPosition[2],
|
||||||
m_cameraTargetPosition[0],m_cameraTargetPosition[1], m_cameraTargetPosition[2],
|
m_cameraTargetPosition[0],m_cameraTargetPosition[1], m_cameraTargetPosition[2],
|
||||||
m_cameraUp.getX(),m_cameraUp.getY(),m_cameraUp.getZ());
|
m_cameraUp.getX(),m_cameraUp.getY(),m_cameraUp.getZ());
|
||||||
glMatrixMode(GL_MODELVIEW);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user