ObjectManager.h
Go to the documentation of this file.
1 #ifndef B_OBJECT_MANAGER_H
2 #define B_OBJECT_MANAGER_H
3 
4 /* bRenderer includes */
5 #include "Renderer_GL.h"
6 #include "Logger.h"
7 #include "Camera.h"
8 #include "MatrixStack.h"
9 #include "Light.h"
10 #include "Configuration.h"
11 #include "Properties.h"
12 #include "Framebuffer.h"
13 #include "Model.h"
14 #include "Sprite.h"
15 #include "TextSprite.h"
16 #include "Texture.h"
17 #include "CubeMap.h"
18 #include "DepthMap.h"
19 #include "Font.h"
20 #include "ModelData.h"
21 #include "OBJLoader.h"
22 #include "TextureData.h"
23 #include "IShaderData.h"
24 #include "ShaderDataGenerator.h"
25 
26 /* vmmlib includes */
27 #include "vmmlib/util.hpp"
28 
33 {
34 public:
35  /* Typedefs */
36  typedef std::unordered_map< std::string, ShaderPtr > ShaderMap;
37  typedef std::unordered_map< std::string, TexturePtr > TextureMap;
38  typedef std::unordered_map< std::string, CubeMapPtr > CubeMapMap;
39  typedef std::unordered_map< std::string, DepthMapPtr > DepthMapMap;
40  typedef std::unordered_map< std::string, FontPtr > FontMap;
41  typedef std::unordered_map< std::string, MaterialPtr > MaterialMap;
42  typedef std::unordered_map< std::string, PropertiesPtr > PropertiesMap;
43  typedef std::unordered_map< std::string, ModelPtr > ModelMap;
44  typedef std::unordered_map< std::string, TextSpritePtr > TextSpriteMap;
45  typedef std::unordered_map< std::string, CameraPtr > CameraMap;
46  typedef std::unordered_map< std::string, MatrixStackPtr > MatrixStackMap;
47  typedef std::unordered_map< std::string, LightPtr > LightMap;
48  typedef std::unordered_map< std::string, FramebufferPtr > FramebufferMap;
49  typedef std::unordered_map< std::string, DrawablePtr > DrawableMap;
50 
51  /* Functions */
52 
56  {
57  _ambientColor = bRenderer::DEFAULT_AMBIENT_COLOR();
58  _shaderVersionDesktop = bRenderer::DEFAULT_SHADER_VERSION_DESKTOP();
59  _shaderVersionES = bRenderer::DEFAULT_SHADER_VERSION_ES();
60  }
61 
64  virtual ~ObjectManager(){}
65 
69  void setShaderVersionDesktop(const std::string &shaderVersionDesktop);
70 
74  void setShaderVersionES(const std::string &shaderVersionES);
75 
79  void setAmbientColor(const vmml::Vector3f &ambientColor);
80 
89  MaterialPtr loadObjMaterial(const std::string &fileName, const std::string &materialName, const std::string &shaderName = "", GLuint shaderMaxLights = bRenderer::DEFAULT_SHADER_MAX_LIGHTS(), bool variableNumberOfLights = false, bool ambientLighting = true);
90 
96  MaterialPtr loadObjMaterial(const std::string &fileName, const std::string &materialName, ShaderPtr shader);
97 
111  ModelPtr loadObjModel(const std::string &fileName, bool flipT = false, bool flipZ = false, bool shaderFromFile = false, GLuint shaderMaxLights = bRenderer::DEFAULT_SHADER_MAX_LIGHTS(), bool variableNumberOfLights = false, bool ambientLighting = true, PropertiesPtr properties = nullptr);
112 
120  ModelPtr loadObjModel(const std::string &fileName, bool flipT, bool flipZ, ShaderPtr shader, PropertiesPtr properties = nullptr);
121 
129  ModelPtr loadObjModel(const std::string &fileName, bool flipT, bool flipZ, MaterialPtr material, PropertiesPtr properties = nullptr);
130 
134  TexturePtr loadTexture(const std::string &fileName);
135 
140  CubeMapPtr loadCubeMap(const std::string &name, const std::vector<std::string> &fileNames);
141 
146  FontPtr loadFont(const std::string &fileName, GLuint fontPixelSize);
147 
161  ShaderPtr loadShaderFile(const std::string &shaderName, GLuint shaderMaxLights = bRenderer::DEFAULT_SHADER_MAX_LIGHTS(), bool variableNumberOfLights = false, bool ambientLighting = true, bool diffuseLighting = true, bool specularLighting = true, bool cubicReflectionMap = false);
162 
171  ShaderPtr generateShader(const std::string &shaderName, GLuint shaderMaxLights, bool ambientLighting, const MaterialData &materialData, bool variableNumberOfLights, bool isText);
172 
177  ShaderPtr generateShader(const std::string &shaderName, const ShaderGeneratorSettings &shaderGeneratorSettings);
178 
183  MaterialPtr createMaterial(const std::string &name, ShaderPtr shader);
184 
190  MaterialPtr createMaterial(const std::string &name, const MaterialData &materialData, ShaderPtr shader);
191 
201  MaterialPtr createMaterialShaderCombination(const std::string &name, const MaterialData &materialData, bool shaderFromFile, GLuint shaderMaxLights = bRenderer::DEFAULT_SHADER_MAX_LIGHTS(), bool variableNumberOfLights = false, bool ambientLighting = true, bool isText = false);
202 
206  PropertiesPtr createProperties(const std::string &name);
207 
217  ModelPtr createModel(const std::string &name, const ModelData &modelData, bool shaderFromFile, GLuint shaderMaxLights = bRenderer::DEFAULT_SHADER_MAX_LIGHTS(), bool variableNumberOfLights = false, bool ambientLighting = true, PropertiesPtr properties = nullptr);
218 
225  ModelPtr createModel(const std::string &name, const ModelData &modelData, ShaderPtr shader, PropertiesPtr properties = nullptr);
226 
233  ModelPtr createModel(const std::string &name, const ModelData &modelData, MaterialPtr material, PropertiesPtr properties = nullptr);
234 
241  ModelPtr createSprite(const std::string &name, MaterialPtr material, bool flipT = false, PropertiesPtr properties = nullptr);
242 
250  ModelPtr createSprite(const std::string &name, const std::string &textureFileName, ShaderPtr shader, bool flipT = false, PropertiesPtr properties = nullptr);
251 
260  ModelPtr createSprite(const std::string &name, const std::string &textureFileName, GLuint shaderMaxLights = 0, bool variableNumberOfLights = false, bool flipT = false, PropertiesPtr properties = nullptr);
261 
269  TextSpritePtr createTextSprite(const std::string &name, vmml::Vector3f color, const std::string &text, FontPtr font, PropertiesPtr properties = nullptr);
270 
278  TextSpritePtr createTextSprite(const std::string &name, MaterialPtr material, const std::string &text, FontPtr font, PropertiesPtr properties = nullptr);
279 
284  TexturePtr createTexture(const std::string &name, const TextureData &textureData);
285 
293  TexturePtr createTexture(const std::string &name, GLsizei width, GLsizei height, GLenum format = GL_RGBA, ImageDataPtr imageData = nullptr);
294 
300  CubeMapPtr createCubeMap(const std::string &name, const std::vector<TextureData> &data);
301 
312  CubeMapPtr createCubeMap(const std::string &name, GLsizei width, GLenum format = GL_RGBA, const std::vector<ImageDataPtr> &imageData = {});
313 
319  DepthMapPtr createDepthMap(const std::string &name, GLint width, GLint height);
320 
325  ShaderPtr createShader(const std::string &name, const IShaderData &shaderData);
326 
330  CameraPtr createCamera(const std::string &name);
331 
337  CameraPtr createCamera(const std::string &name, const vmml::Vector3f &position, const vmml::Vector3f &rotationAxes);
338 
346  CameraPtr createCamera(const std::string &name, GLfloat fov, GLfloat aspect, GLfloat near, GLfloat far);
347 
357  CameraPtr createCamera(const std::string &name, const vmml::Vector3f &position, const vmml::Vector3f &rotationAxes, GLfloat fov, GLfloat aspect, GLfloat near, GLfloat far);
358 
362  MatrixStackPtr createMatrixStack(const std::string &name);
363 
367  LightPtr createLight(const std::string &name);
368 
374  LightPtr createLight(const std::string &name, const vmml::Vector3f &position, const vmml::Vector3f &color);
375 
384  LightPtr createLight(const std::string &name, const vmml::Vector3f &position, const vmml::Vector3f &color, GLfloat intensity, GLfloat attenuation, GLfloat radius);
385 
395  LightPtr createLight(const std::string &name, const vmml::Vector3f &position, const vmml::Vector3f &diffuseColor, const vmml::Vector3f &specularColor, GLfloat intensity, GLfloat attenuation, GLfloat radius);
396 
400  FramebufferPtr createFramebuffer(const std::string &name);
401 
407  FramebufferPtr createFramebuffer(const std::string &name, GLint width, GLint height);
408 
412  bool addShader(const std::string &name, ShaderPtr ptr);
413 
418  bool addTexture(const std::string &name, TexturePtr ptr);
419 
424  bool addCubeMap(const std::string &name, CubeMapPtr ptr);
425 
430  bool addDepthMap(const std::string &name, DepthMapPtr ptr);
431 
436  bool addFont(const std::string &name, FontPtr ptr);
437 
442  bool addMaterial(const std::string &name, MaterialPtr ptr);
443 
448  bool addProperties(const std::string &name, PropertiesPtr ptr);
449 
454  bool addModel(const std::string &name, ModelPtr ptr);
455 
460  bool addTextSprite(const std::string &name, TextSpritePtr ptr);
461 
466  bool addCamera(const std::string &name, CameraPtr ptr);
467 
472  bool addMatrixStack(const std::string &name, MatrixStackPtr ptr);
473 
478  bool addLight(const std::string &name, LightPtr ptr);
479 
484  bool addFramebuffer(const std::string &name, FramebufferPtr ptr);
485 
490  bool addDrawable(const std::string &name, DrawablePtr ptr);
491 
495  ShaderPtr getShader(const std::string &name);
496 
500  TexturePtr getTexture(const std::string &name);
501 
505  CubeMapPtr getCubeMap(const std::string &name);
506 
510  DepthMapPtr getDepthMap(const std::string &name);
511 
515  FontPtr getFont(const std::string &name);
516 
520  MaterialPtr getMaterial(const std::string &name);
521 
525  PropertiesPtr getProperties(const std::string &name);
526 
530  ModelPtr getModel(const std::string &name);
531 
535  TextSpritePtr getTextSprite(const std::string &name);
536 
540  CameraPtr getCamera(const std::string &name);
541 
545  MatrixStackPtr getMatrixStack(const std::string &name);
546 
550  LightPtr getLight(const std::string &name);
551 
555  FramebufferPtr getFramebuffer(const std::string &name);
556 
560  DrawablePtr getDrawable(const std::string &name);
561 
564  std::string getShaderVersionDesktop();
565 
568  std::string getShaderVersionES();
569 
572  vmml::Vector3f getAmbientColor();
573 
578  void removeShader(const std::string &name, bool del);
579 
584  void removeTexture(const std::string &name, bool del);
585 
590  void removeCubeMap(const std::string &name, bool del);
591 
596  void removeDepthMap(const std::string &name, bool del);
597 
602  void removeFont(const std::string &name, bool del);
603 
607  void removeMaterial(const std::string &name);
608 
612  void removeProperties(const std::string &name);
613 
618  void removeModel(const std::string &name, bool del);
619 
624  void removeTextSprite(const std::string &name, bool del);
625 
629  void removeCamera(const std::string &name);
630 
634  void removeMatrixStack(const std::string &name);
635 
639  void removeLight(const std::string &name);
640 
645  void removeFramebuffer(const std::string &name, bool del);
646 
650  void removeDrawable(const std::string &name);
651 
655  void clear(bool del);
656 
657 private:
658  /* Functions */
659 
664  std::string getRawName(const std::string &fileName, std::string *ext = nullptr);
665 
666  /* Variables */
667 
668  ShaderMap _shaders;
669  TextureMap _textures;
670  CubeMapMap _cubeMaps;
671  DepthMapMap _depthMaps;
672  FontMap _fonts;
673  MaterialMap _materials;
674  PropertiesMap _properties;
675  ModelMap _models;
676  TextSpriteMap _textSprites;
677  CameraMap _cameras;
678  MatrixStackMap _matrixStacks;
679  LightMap _lights;
680  FramebufferMap _framebuffers;
681  DrawableMap _drawables;
682 
683  vmml::Vector3f _ambientColor;
684 
685  std::string _shaderVersionDesktop;
686  std::string _shaderVersionES;
687 
688 };
689 
690 typedef std::shared_ptr< ObjectManager > ObjectManagerPtr;
691 
692 #endif /* defined(B_OBJECT_MANAGER_H) */
bool addModel(const std::string &name, ModelPtr ptr)
Add a 3D model (returns true if successful)
Definition: ObjectManager.cpp:537
void removeDepthMap(const std::string &name, bool del)
Remove a depth map.
Definition: ObjectManager.cpp:723
std::shared_ptr< Font > FontPtr
Definition: Font.h:84
TexturePtr loadTexture(const std::string &fileName)
Load a texture.
Definition: ObjectManager.cpp:102
bool addLight(const std::string &name, LightPtr ptr)
Add a light (returns true if successful)
Definition: ObjectManager.cpp:565
bool addTexture(const std::string &name, TexturePtr ptr)
Add a texture (returns true if successful)
Definition: ObjectManager.cpp:495
TexturePtr getTexture(const std::string &name)
Get a texture.
Definition: ObjectManager.cpp:593
bool addFramebuffer(const std::string &name, FramebufferPtr ptr)
Add a framebuffer (returns true if successful)
Definition: ObjectManager.cpp:572
std::shared_ptr< Camera > CameraPtr
Definition: Camera.h:187
std::unordered_map< std::string, FontPtr > FontMap
Definition: ObjectManager.h:40
void removeModel(const std::string &name, bool del)
Remove a 3D model.
Definition: ObjectManager.cpp:749
MatrixStackPtr getMatrixStack(const std::string &name)
Get a matrix stack.
Definition: ObjectManager.cpp:656
std::unordered_map< std::string, TexturePtr > TextureMap
Definition: ObjectManager.h:37
GLuint DEFAULT_SHADER_MAX_LIGHTS()
Definition: Configuration.cpp:52
vmml::Vector3f getAmbientColor()
Get the ambient color of the scene.
Definition: ObjectManager.cpp:694
std::unordered_map< std::string, CameraPtr > CameraMap
Definition: ObjectManager.h:45
void removeDrawable(const std::string &name)
Remove a drawable.
Definition: ObjectManager.cpp:788
std::shared_ptr< Texture > TexturePtr
Definition: Texture.h:67
ShaderPtr loadShaderFile(const std::string &shaderName, GLuint shaderMaxLights=bRenderer::DEFAULT_SHADER_MAX_LIGHTS(), bool variableNumberOfLights=false, bool ambientLighting=true, bool diffuseLighting=true, bool specularLighting=true, bool cubicReflectionMap=false)
Load a shader.
Definition: ObjectManager.cpp:145
bool addCamera(const std::string &name, CameraPtr ptr)
Add a camera (returns true if successful)
Definition: ObjectManager.cpp:551
std::shared_ptr< Shader > ShaderPtr
Definition: Shader.h:211
ObjectManager()
Constructor.
Definition: ObjectManager.h:55
CameraPtr getCamera(const std::string &name)
Get a camera.
Definition: ObjectManager.cpp:649
std::unordered_map< std::string, ShaderPtr > ShaderMap
Definition: ObjectManager.h:36
std::shared_ptr< Properties > PropertiesPtr
Definition: Properties.h:179
std::unordered_map< std::string, FramebufferPtr > FramebufferMap
Definition: ObjectManager.h:48
CubeMapPtr createCubeMap(const std::string &name, const std::vector< TextureData > &data)
Create a cube map.
Definition: ObjectManager.cpp:330
std::unordered_map< std::string, MaterialPtr > MaterialMap
Definition: ObjectManager.h:41
PropertiesPtr getProperties(const std::string &name)
Get properties.
Definition: ObjectManager.cpp:628
MaterialPtr loadObjMaterial(const std::string &fileName, const std::string &materialName, const std::string &shaderName="", GLuint shaderMaxLights=bRenderer::DEFAULT_SHADER_MAX_LIGHTS(), bool variableNumberOfLights=false, bool ambientLighting=true)
Load a material.
Definition: ObjectManager.cpp:22
CubeMapPtr loadCubeMap(const std::string &name, const std::vector< std::string > &fileNames)
Load a cube map.
Definition: ObjectManager.cpp:116
void clear(bool del)
Clear all objects.
Definition: ObjectManager.cpp:793
void removeProperties(const std::string &name)
Remove properties.
Definition: ObjectManager.cpp:744
std::unordered_map< std::string, PropertiesPtr > PropertiesMap
Definition: ObjectManager.h:42
void removeCamera(const std::string &name)
Remove a camera.
Definition: ObjectManager.cpp:765
std::shared_ptr< DepthMap > DepthMapPtr
Definition: DepthMap.h:28
bool addProperties(const std::string &name, PropertiesPtr ptr)
Add properties (returns true if successful)
Definition: ObjectManager.cpp:530
An interface for the underlying data of a shader.
Definition: IShaderData.h:10
void setShaderVersionES(const std::string &shaderVersionES)
Set the shader version used on mobile devices systems.
Definition: ObjectManager.cpp:12
MatrixStackPtr createMatrixStack(const std::string &name)
Create a matrix stack.
Definition: ObjectManager.cpp:427
std::shared_ptr< Framebuffer > FramebufferPtr
Definition: Framebuffer.h:114
FramebufferPtr getFramebuffer(const std::string &name)
Get a framebuffer.
Definition: ObjectManager.cpp:670
TextSpritePtr createTextSprite(const std::string &name, vmml::Vector3f color, const std::string &text, FontPtr font, PropertiesPtr properties=nullptr)
Create a text sprite to display strings on the screen.
Definition: ObjectManager.cpp:289
std::string getShaderVersionDesktop()
Get the shader version used on desktop systems.
Definition: ObjectManager.cpp:684
bool addShader(const std::string &name, ShaderPtr ptr)
Add a shader (returns true if successful)
Definition: ObjectManager.cpp:488
FramebufferPtr createFramebuffer(const std::string &name)
Create a framebuffer that adjusts its size automatically according to the viewport size...
Definition: ObjectManager.cpp:472
std::unordered_map< std::string, TextSpritePtr > TextSpriteMap
Definition: ObjectManager.h:44
void removeFont(const std::string &name, bool del)
Remove a font.
Definition: ObjectManager.cpp:731
ModelPtr getModel(const std::string &name)
Get a 3D model.
Definition: ObjectManager.cpp:635
bool addDrawable(const std::string &name, DrawablePtr ptr)
Add a drawable (returns true if successful)
Definition: ObjectManager.cpp:579
void setShaderVersionDesktop(const std::string &shaderVersionDesktop)
Set the shader version used on desktop systems.
Definition: ObjectManager.cpp:7
std::unordered_map< std::string, DepthMapPtr > DepthMapMap
Definition: ObjectManager.h:39
DepthMapPtr getDepthMap(const std::string &name)
Get a depth map.
Definition: ObjectManager.cpp:607
bool addCubeMap(const std::string &name, CubeMapPtr ptr)
Add a cube map (returns true if successful)
Definition: ObjectManager.cpp:502
bool addMatrixStack(const std::string &name, MatrixStackPtr ptr)
Add a matrix stack (returns true if successful)
Definition: ObjectManager.cpp:558
DepthMapPtr createDepthMap(const std::string &name, GLint width, GLint height)
Create a depth map.
Definition: ObjectManager.cpp:361
ShaderPtr generateShader(const std::string &shaderName, GLuint shaderMaxLights, bool ambientLighting, const MaterialData &materialData, bool variableNumberOfLights, bool isText)
Generate a shader.
Definition: ObjectManager.cpp:160
void removeCubeMap(const std::string &name, bool del)
Remove a cube map.
Definition: ObjectManager.cpp:715
The underlying data of a texture.
Definition: TextureData.h:13
PropertiesPtr createProperties(const std::string &name)
Create properties.
Definition: ObjectManager.cpp:225
LightPtr getLight(const std::string &name)
Get a light.
Definition: ObjectManager.cpp:663
vmml::Vector3f DEFAULT_AMBIENT_COLOR()
Definition: Configuration.cpp:23
MaterialPtr createMaterial(const std::string &name, ShaderPtr shader)
Create empty material.
Definition: ObjectManager.cpp:182
std::unordered_map< std::string, ModelPtr > ModelMap
Definition: ObjectManager.h:43
MaterialPtr createMaterialShaderCombination(const std::string &name, const MaterialData &materialData, bool shaderFromFile, GLuint shaderMaxLights=bRenderer::DEFAULT_SHADER_MAX_LIGHTS(), bool variableNumberOfLights=false, bool ambientLighting=true, bool isText=false)
Create a material and a shader fitting its characteristics.
Definition: ObjectManager.cpp:203
std::shared_ptr< GLubyte > ImageDataPtr
Definition: TextureData.h:8
virtual ~ObjectManager()
Virtual destructor.
Definition: ObjectManager.h:64
bool addFont(const std::string &name, FontPtr ptr)
Add a font (returns true if successful)
Definition: ObjectManager.cpp:516
CubeMapPtr getCubeMap(const std::string &name)
Get a cube map.
Definition: ObjectManager.cpp:600
TexturePtr createTexture(const std::string &name, const TextureData &textureData)
Create a texture.
Definition: ObjectManager.cpp:307
FontPtr loadFont(const std::string &fileName, GLuint fontPixelSize)
Load a font (e.g. TrueType fonts (TTF) or OpenType fonts (OTF)
Definition: ObjectManager.cpp:132
void removeFramebuffer(const std::string &name, bool del)
Remove a framebuffer.
Definition: ObjectManager.cpp:780
void removeTextSprite(const std::string &name, bool del)
Remove a text sprite.
Definition: ObjectManager.cpp:757
bool addMaterial(const std::string &name, MaterialPtr ptr)
Add a material (returns true if successful)
Definition: ObjectManager.cpp:523
CameraPtr createCamera(const std::string &name)
Create a camera.
Definition: ObjectManager.cpp:391
void removeTexture(const std::string &name, bool del)
Remove a texture.
Definition: ObjectManager.cpp:707
void removeShader(const std::string &name, bool del)
Remove a shader.
Definition: ObjectManager.cpp:699
bool addDepthMap(const std::string &name, DepthMapPtr ptr)
Add a depth map (returns true if successful)
Definition: ObjectManager.cpp:509
std::string getShaderVersionES()
Get the shader version used on mobile devices systems.
Definition: ObjectManager.cpp:689
void setAmbientColor(const vmml::Vector3f &ambientColor)
Set an ambient color for the scene.
Definition: ObjectManager.cpp:17
ModelPtr loadObjModel(const std::string &fileName, bool flipT=false, bool flipZ=false, bool shaderFromFile=false, GLuint shaderMaxLights=bRenderer::DEFAULT_SHADER_MAX_LIGHTS(), bool variableNumberOfLights=false, bool ambientLighting=true, PropertiesPtr properties=nullptr)
Load a 3D model.
Definition: ObjectManager.cpp:53
std::shared_ptr< IDrawable > DrawablePtr
Definition: IDrawable.h:30
DrawablePtr getDrawable(const std::string &name)
Get a drawable.
Definition: ObjectManager.cpp:677
std::shared_ptr< TextSprite > TextSpritePtr
Definition: TextSprite.h:75
std::shared_ptr< Light > LightPtr
Definition: Light.h:127
MaterialPtr getMaterial(const std::string &name)
Get a material.
Definition: ObjectManager.cpp:621
ShaderPtr getShader(const std::string &name)
Get a shader.
Definition: ObjectManager.cpp:586
This class manages all objects in a project and makes sure no object is created twice.
Definition: ObjectManager.h:32
std::unordered_map< std::string, CubeMapPtr > CubeMapMap
Definition: ObjectManager.h:38
std::shared_ptr< ObjectManager > ObjectManagerPtr
Definition: ObjectManager.h:690
std::unordered_map< std::string, MatrixStackPtr > MatrixStackMap
Definition: ObjectManager.h:46
The underlying data of a material.
Definition: MaterialData.h:10
ModelPtr createModel(const std::string &name, const ModelData &modelData, bool shaderFromFile, GLuint shaderMaxLights=bRenderer::DEFAULT_SHADER_MAX_LIGHTS(), bool variableNumberOfLights=false, bool ambientLighting=true, PropertiesPtr properties=nullptr)
Create a model.
Definition: ObjectManager.cpp:235
std::string DEFAULT_SHADER_VERSION_DESKTOP()
Definition: Configuration.cpp:50
TextSpritePtr getTextSprite(const std::string &name)
Get a text sprite.
Definition: ObjectManager.cpp:642
std::unordered_map< std::string, DrawablePtr > DrawableMap
Definition: ObjectManager.h:49
void removeMatrixStack(const std::string &name)
Remove a matrix stack.
Definition: ObjectManager.cpp:770
Definition: ModelData.h:11
std::unordered_map< std::string, LightPtr > LightMap
Definition: ObjectManager.h:47
ModelPtr createSprite(const std::string &name, MaterialPtr material, bool flipT=false, PropertiesPtr properties=nullptr)
Create a sprite.
Definition: ObjectManager.cpp:262
void removeMaterial(const std::string &name)
Remove a material.
Definition: ObjectManager.cpp:739
FontPtr getFont(const std::string &name)
Get a font.
Definition: ObjectManager.cpp:614
bool addTextSprite(const std::string &name, TextSpritePtr ptr)
Add a text sprite (returns true if successful)
Definition: ObjectManager.cpp:544
std::shared_ptr< MatrixStack > MatrixStackPtr
Definition: MatrixStack.h:51
std::shared_ptr< CubeMap > CubeMapPtr
Definition: CubeMap.h:33
std::shared_ptr< Model > ModelPtr
Definition: Model.h:188
std::string DEFAULT_SHADER_VERSION_ES()
Definition: Configuration.cpp:51
std::shared_ptr< Material > MaterialPtr
Definition: Material.h:135
ShaderPtr createShader(const std::string &name, const IShaderData &shaderData)
Create a shader.
Definition: ObjectManager.cpp:371
void removeLight(const std::string &name)
Remove a light.
Definition: ObjectManager.cpp:775
LightPtr createLight(const std::string &name)
Create a light.
Definition: ObjectManager.cpp:436
Definition: ShaderDataGenerator.h:8