Overte C++ Documentation
GameWorkload.h
1 //
2 // GameWorkload.h
3 //
4 // Created by Sam Gateau on 2/16/2018.
5 // Copyright 2018 High Fidelity, Inc.
6 //
7 // Distributed under the Apache License, Version 2.0.
8 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
9 //
10 #ifndef hifi_GameWorkload_h
11 #define hifi_GameWorkload_h
12 
13 #include <workload/Space.h>
14 #include <workload/Engine.h>
15 
16 #include <render/Scene.h>
17 #include "PhysicalEntitySimulation.h"
18 
19 class GameWorkloadContext : public workload::WorkloadContext {
20 public:
21  GameWorkloadContext(const workload::SpacePointer& space,
22  const render::ScenePointer& scene,
23  const PhysicalEntitySimulationPointer& simulation);
24  virtual ~GameWorkloadContext();
25 
26  render::ScenePointer _scene;
27  PhysicalEntitySimulationPointer _simulation;
28 };
29 
30 class GameWorkload {
31 public:
32  GameWorkload();
33  ~GameWorkload();
34 
35  void startup(const workload::SpacePointer& space,
36  const render::ScenePointer& scene,
37  const PhysicalEntitySimulationPointer& simulation);
38  void shutdown();
39 
40  void updateViews(const ViewFrustum& frustum, const glm::vec3& headPosition);
41  void updateSimulationTimings(const workload::Timings& timings);
42 
43  workload::EnginePointer _engine;
44 };
45 #endif // hifi_GameWorkload_h