Просмотр исходного кода

Updated the samples to use getAspectRatio()

Darryl Gough 13 лет назад
Родитель
Сommit
6258531bbc
1 измененных файлов с 1 добавлено и 1 удалено
  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");