Perform first-time initialization - true if success, false otherwise
| 45 | |
| 46 | // Perform first-time initialization - true if success, false otherwise |
| 47 | virtual bool Initialize() override { |
| 48 | STRATUS_LOG << "Initializing " << GetAppName() << std::endl; |
| 49 | |
| 50 | LightCreator::Initialize(); |
| 51 | |
| 52 | stratus::InputHandlerPtr controller(new CameraController()); |
| 53 | INSTANCE(InputManager)->AddInputHandler(controller); |
| 54 | |
| 55 | controller = stratus::InputHandlerPtr(new FrameRateController()); |
| 56 | INSTANCE(InputManager)->AddInputHandler(controller); |
| 57 | |
| 58 | //const glm::vec3 warmMorningColor = glm::vec3(254.0f / 255.0f, 232.0f / 255.0f, 176.0f / 255.0f); |
| 59 | //controller = stratus::InputHandlerPtr(new WorldLightController(warmMorningColor)); |
| 60 | //INSTANCE(InputManager)->AddInputHandler(controller); |
| 61 | |
| 62 | // Disable culling for this model since there are some weird parts that seem to be reversed |
| 63 | stratus::Async<stratus::Entity> e = stratus::ResourceManager::Instance()->LoadModel("../Resources/InterrogationRoom/scene.gltf", stratus::ColorSpace::SRGB, false, stratus::RenderFaceCulling::CULLING_NONE); |
| 64 | e.AddCallback([this](stratus::Async<stratus::Entity> e) { |
| 65 | if (e.Failed()) return; |
| 66 | interrogationRoom = e.GetPtr(); |
| 67 | auto transform = stratus::GetComponent<stratus::LocalTransformComponent>(interrogationRoom); |
| 68 | //transform->SetLocalPosition(glm::vec3(0.0f)); |
| 69 | transform->SetLocalScale(glm::vec3(15.0f)); |
| 70 | INSTANCE(EntityManager)->AddEntity(interrogationRoom); |
| 71 | received.push_back(e.GetPtr()); |
| 72 | }); |
| 73 | |
| 74 | requested.push_back(e); |
| 75 | |
| 76 | auto settings = INSTANCE(RendererFrontend)->GetSettings(); |
| 77 | settings.SetFogColor(glm::vec3(167.0f / 255.0f, 166.0f / 255.0f, 157.0f / 255.0f)); |
| 78 | //settings.SetFogDensity(0.00125); |
| 79 | //settings.SetEmissionStrength(5.0f); |
| 80 | INSTANCE(RendererFrontend)->SetSettings(settings); |
| 81 | |
| 82 | bool running = true; |
| 83 | |
| 84 | return true; |
| 85 | } |
| 86 | |
| 87 | // Run a single update for the application (no infinite loops) |
| 88 | // deltaSeconds = time since last frame |
nothing calls this directly
no test coverage detected