Browse Source

Updated the samples to use getAspectRatio()

Darryl Gough 13 years ago
parent
commit
6258531bbc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      gameplay-template/src/TemplateGame.cpp

+ 1 - 1
gameplay-template/src/TemplateGame.cpp

@@ -14,7 +14,7 @@ void TemplateGame::initialize()
     _scene = Scene::load("res/box.gpb");
 
     // Set the aspect ratio for the scene's camera to match the current resolution
-    _scene->getActiveCamera()->setAspectRatio((float)getWidth() / (float)getHeight());
+    _scene->getActiveCamera()->setAspectRatio(getAspectRatio());
     
     // Get light node
     Node* lightNode = _scene->findNode("directionalLight");