Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
renderpipeline.h
1 #pragma once
2 
3 #include <vector>
4 #include <memory>
5 
6 #include "renderpass.h"
7 #include "display/eyeside.h"
8 
9 
10 class FrameBuffer;
11 class Camera;
12 
13 
14 /*
15  a collection of steps to produce a graphical effect
16  can be nested
17 */
19 public:
20  RenderPipeline(const std::string& name);
21 
22  virtual void apply(FrameBuffer& frameBuffer, const RenderMetaData& metadata) override;
23 
24  virtual void setup() = 0;
25  virtual int bufferCount() = 0;
26 
27  void add(std::shared_ptr<RenderPass> pass, int index = -1);
28  void insertAfter(std::shared_ptr<RenderPass> pass, const std::string& after);
29 
30  static RenderPipeline* getDefault();
31 
32 
33 protected:
34  std::vector<std::shared_ptr<RenderPass>> m_passes;
35  bool m_initialized;
36 };
37 
Definition: renderpipeline.h:18
Definition: rendermetadata.h:9
Definition: renderpass.h:15
Definition: camera.h:10
Definition: framebuffer.h:17