Lugdunum  0.1.0
Scene.cpp
Go to the documentation of this file.
2 
4 
5 namespace lug {
6 namespace Graphics {
7 namespace Builder {
8 
9 Scene::Scene(Renderer& renderer) : _renderer(renderer) {}
10 
12  // Constructor of Material is private, we can't use std::make_unique
13  std::unique_ptr<Resource> resource{new lug::Graphics::Scene::Scene(_name)};
14 
15  return _renderer.getResourceManager()->add<::lug::Graphics::Scene::Scene>(std::move(resource));
16 }
17 
18 } // Builder
19 } // Graphics
20 } // lug
Resource::SharedPtr< T > add(std::unique_ptr< Resource > resource)
Add a resource to the ResourceManager.
Dummy class for a shared pointer.
Definition: Resource.hpp:66
Scene(Renderer &renderer)
Definition: Scene.cpp:9
Resource::SharedPtr< lug::Graphics::Scene::Scene > build()
Definition: Scene.cpp:11
ResourceManager * getResourceManager() const
Definition: Renderer.inl:9