Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
gameplayscene.h
1 #pragma once
2 
3 #include <memory>
4 
5 #include <glm/glm.hpp>
6 
7 #include "display/scene.h"
8 
9 #include "property/property.h"
10 
11 
12 
13 class GamePlay;
14 class VoxelRenderer;
15 class SoundManager;
16 class CameraHead;
17 class FrameBuffer;
18 class Blitter;
19 class RenderPipeline;
20 class Player;
21 class Starfield;
22 
23 class GamePlayScene: public Scene {
24 public:
25  GamePlayScene(GamePlay& gamePlay);
26  ~GamePlayScene();
27 
28  virtual void draw(const Camera& camera, glow::FrameBufferObject* target, const Viewport& destinationViewport, EyeSide side = EyeSide::None) const override;
29  virtual void update(float deltaSec) override;
30 
31  void setOutputBuffer(int i);
32 
33 
34 protected:
35  std::unique_ptr<Blitter> m_outputBlitter;
36  std::unique_ptr<RenderPipeline> m_renderPipeline;
37  mutable std::unique_ptr<FrameBuffer> m_framebuffer;
38  std::shared_ptr<VoxelRenderer> m_voxelRenderer;
39  std::shared_ptr<Starfield> m_starField;
40 
41  GamePlay& m_gamePlay;
42 
43  Property<glm::vec3> m_defaultLightDir;
44  int m_currentOutputBuffer;
45 
46 
47  void drawGame(const Camera& camera) const;
48 };
49 
Definition: camerahead.h:12
Definition: viewport.h:6
Definition: soundmanager.h:19
Definition: renderpipeline.h:18
Definition: camera.h:10
Definition: framebuffer.h:17
Definition: starfield.h:33
Definition: blitter.h:11
Definition: scene.h:14
Definition: gameplayscene.h:23
Definition: player.h:22
Definition: gameplay.h:20
Definition: voxelrenderer.h:24