Fix for issue #192

Also: Avoid divide by zero before OpenGL window is up
This commit is contained in:
john.mccutchan
2009-02-10 22:10:21 +00:00
parent d0572bdef7
commit be3260280a
4 changed files with 18 additions and 3 deletions

View File

@@ -200,6 +200,9 @@ void DemoApplication::updateCamera() {
m_cameraPosition[2] = eyePos.getZ();
m_cameraPosition += m_cameraTargetPosition;
if (m_glutScreenWidth == 0 && m_glutScreenHeight == 0)
return;
if (m_glutScreenWidth > m_glutScreenHeight)
{
btScalar aspect = m_glutScreenWidth / (btScalar)m_glutScreenHeight;