Change the current scene
| 522 | |
| 523 | // Change the current scene |
| 524 | void TestbedApplication::switchScene(Scene* newScene) { |
| 525 | |
| 526 | if (newScene == mCurrentScene) return; |
| 527 | |
| 528 | mCurrentScene = newScene; |
| 529 | |
| 530 | mTimer.reset(); |
| 531 | |
| 532 | // Resize the camera viewport |
| 533 | mCurrentScene->reshape(mWidth, mHeight); |
| 534 | |
| 535 | // Update the window size of the scene |
| 536 | mCurrentScene->setWindowDimension(mWidth, mHeight); |
| 537 | |
| 538 | // Reset the scene |
| 539 | mCurrentScene->reset(); |
| 540 | |
| 541 | mCurrentScene->updateEngineSettings(); |
| 542 | |
| 543 | mGui.resetWithValuesFromCurrentScene(); |
| 544 | } |
| 545 | |
| 546 | // Notify that the engine settings have changed |
| 547 | void TestbedApplication::notifyEngineSetttingsChanged() { |
no test coverage detected