Lugdunum
0.1.0
src
lug
Graphics
Builder
Scene.cpp
Go to the documentation of this file.
1
#include <
lug/Graphics/Builder/Scene.hpp
>
2
3
#include <
lug/Graphics/Renderer.hpp
>
4
5
namespace
lug
{
6
namespace
Graphics {
7
namespace
Builder {
8
9
Scene::Scene
(
Renderer
& renderer) : _renderer(renderer) {}
10
11
Resource::SharedPtr<lug::Graphics::Scene::Scene>
Scene::build
() {
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
lug::Graphics::Builder::Scene::_renderer
Renderer & _renderer
Definition:
Scene.hpp:38
Renderer.hpp
lug::Graphics::ResourceManager::add
Resource::SharedPtr< T > add(std::unique_ptr< Resource > resource)
Add a resource to the ResourceManager.
lug::Graphics::Resource::SharedPtr
Dummy class for a shared pointer.
Definition:
Resource.hpp:66
lug::Graphics::Builder::Scene::Scene
Scene(Renderer &renderer)
Definition:
Scene.cpp:9
lug::Graphics::Renderer
Definition:
Renderer.hpp:18
lug
Definition:
Application.hpp:11
lug::Graphics::Builder::Scene::build
Resource::SharedPtr< lug::Graphics::Scene::Scene > build()
Definition:
Scene.cpp:11
lug::Graphics::Scene::Scene
Definition:
Scene.hpp:30
lug::Graphics::Builder::Scene::_name
std::string _name
Definition:
Scene.hpp:40
lug::Graphics::Renderer::getResourceManager
ResourceManager * getResourceManager() const
Definition:
Renderer.inl:9
Scene.hpp
Generated by
1.8.13