Lugdunum  0.1.0
Renderer.inl
Go to the documentation of this file.
1 inline bool Renderer::isInstanceLayerLoaded(const char* name) const {
2  auto compareLayers = [&name](const char* layerName) {
3  return std::strcmp(layerName, name) == 0;
4  };
5 
6  return std::find_if(_loadedInstanceLayers.cbegin(), _loadedInstanceLayers.cend(), compareLayers) != _loadedInstanceLayers.cend();
7 }
8 
9 inline bool Renderer::isInstanceExtensionLoaded(const char* name) const {
10  auto compareExtensions = [&name](const char* extensionName) {
11  return std::strcmp(extensionName, name) == 0;
12  };
13 
14  return std::find_if(_loadedInstanceExtensions.cbegin(), _loadedInstanceExtensions.cend(), compareExtensions) != _loadedInstanceExtensions.cend();
15 }
16 
17 inline bool Renderer::isDeviceExtensionLoaded(const char* name) const {
18  auto compareExtensions = [&name](const char* extensionName) {
19  return std::strcmp(extensionName, name) == 0;
20  };
21 
22  return std::find_if(_loadedDeviceExtensions.cbegin(), _loadedDeviceExtensions.cend(), compareExtensions) != _loadedDeviceExtensions.cend();
23 }
24 
25 inline const API::Instance& Renderer::getInstance() const {
26  return _instance;
27 }
28 
29 inline API::Device& Renderer::getDevice() {
30  return _device;
31 }
32 
33 inline const API::Device& Renderer::getDevice() const {
34  return _device;
35 }
36 
37 inline InstanceInfo& Renderer::getInstanceInfo() {
38  return _instanceInfo;
39 }
40 
41 inline const InstanceInfo& Renderer::getInstanceInfo() const {
42  return _instanceInfo;
43 }
44 
45 inline PhysicalDeviceInfo* Renderer::getPhysicalDeviceInfo() {
46  return _physicalDeviceInfo;
47 }
48 
49 inline const PhysicalDeviceInfo* Renderer::getPhysicalDeviceInfo() const {
50  return _physicalDeviceInfo;
51 }
52 
53 inline std::vector<PhysicalDeviceInfo>& Renderer::getPhysicalDeviceInfos() {
54  return _physicalDeviceInfos;
55 }
56 
57 inline const std::vector<PhysicalDeviceInfo>& Renderer::getPhysicalDeviceInfos() const {
58  return _physicalDeviceInfos;
59 }
60 
61 inline Renderer::Preferences& Renderer::getPreferences() {
62  return _preferences;
63 }
64 
65 inline const Renderer::Preferences& Renderer::getPreferences() const {
66  return _preferences;
67 }
68 
69 inline void Renderer::addPipeline(Resource::SharedPtr<Render::Pipeline> pipeline) {
70  _pipelines[pipeline->getId()] = pipeline;
71 }
72 
73 inline bool Renderer::containsPipeline(Render::Pipeline::Id id) const {
74  return _pipelines.find(id) != _pipelines.end() && _pipelines.at(id).lock();
75 }
76 
78  if (containsPipeline(id)) {
79  return _pipelines.at(id).lock();
80  }
81 
82  return Render::Pipeline::create(*this, id);
83 }
84 
85 inline Render::Window* Renderer::getRenderWindow() const {
86  return _window.get();
87 }
Id of the Pipeline. It&#39;s a concatenation of three parts: PrimitivePart, MaterialPart and PipelinePart...
Definition: Pipeline.hpp:33
Dummy class for a shared pointer.
Definition: Resource.hpp:66