Lugdunum  0.1.0
Queue.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <map>
4 #include <vector>
5 
11 
12 namespace lug {
13 namespace Graphics {
14 namespace Vulkan {
15 namespace Render {
16 
18 public:
23  };
24 
25 public:
26  Queue() = default;
27 
28  Queue(const Queue&) = delete;
29  Queue(Queue&&) = delete;
30 
31  Queue& operator=(const Queue&) = delete;
32  Queue& operator=(Queue&&) = delete;
33 
34  ~Queue() = default;
35 
36  void addMeshInstance(Scene::Node& node, const lug::Graphics::Renderer& renderer) override final;
37  void addLight(Scene::Node& node) override final;
38  void addSkyBox(Resource::SharedPtr<::lug::Graphics::Render::SkyBox> skyBox) override final;
39  void clear() override final;
40 
41  const std::map<Render::Pipeline::Id, std::vector<PrimitiveSetInstance>> getPrimitiveSets() const;
42 
43  const std::vector<Scene::Node*> getLights() const;
44  std::size_t getLightsCount() const;
45 
46  const Resource::SharedPtr<Render::SkyBox> getSkyBox() const;
47 
48 private:
49  // TODO: Use a custom frame allocator for the content of the queue
50  // TODO: Also sort by material ?
51  std::map<Render::Pipeline::Id, std::vector<PrimitiveSetInstance>> _primitiveSets;
52 
53  std::vector<Scene::Node*> _lights{50};
54  std::size_t _lightsCount{0};
55 
57 };
58 
59 } // Render
60 } // Vulkan
61 } // Graphics
62 } // lug
#define LUG_GRAPHICS_API
Definition: Export.hpp:11
Describes part of a Mesh.
Definition: Mesh.hpp:33
Dummy class for a shared pointer.
Definition: Resource.hpp:66
Class for resource.
Definition: Resource.hpp:17
const Render::Mesh::PrimitiveSet * primitiveSet
Definition: Queue.hpp:21
Class for the Vulkan pipeline, Render side.
Definition: Pipeline.hpp:26