SLProject
4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
|
Toplevel holder of the assets meshes, materials, textures and shaders. More...
#include <SLAssetManager.h>
Public Member Functions | |
~SLAssetManager () | |
void | generateStaticFonts (SLstring fontPath) |
void | clear () |
for all assets, clear gpu data More... | |
void | deleteDataGpu () |
for all assets, clear gpu data More... | |
bool | removeMesh (SLMesh *mesh) |
Removes the specified mesh from the meshes resource vector. More... | |
bool | removeProgram (SLGLProgram *program) |
Removes the specified mesh from the meshes resource vector. More... | |
SLGLProgram * | getProgramByName (const string &programName) |
Returns the pointer to shader program if found by name. More... | |
void | merge (SLAssetManager &other) |
merge other asset manager into this More... | |
SLVMesh & | meshes () |
SLVMaterial & | materials () |
SLVGLTexture & | textures () |
SLVGLProgram & | programs () |
Static Public Member Functions | |
static void | generateFonts (SLstring fontPath, SLGLProgram &fontTexProgram) |
Generates all static fonts. More... | |
static void | deleteFonts () |
Deletes all static fonts. More... | |
static SLTexFont * | getFont (SLfloat heightMM, SLint dpi) |
returns nearest font for a given height in mm More... | |
Static Public Attributes | |
static SLTexFont * | font07 = nullptr |
7 pixel high fixed size font More... | |
static SLTexFont * | font08 = nullptr |
8 pixel high fixed size font More... | |
static SLTexFont * | font09 = nullptr |
9 pixel high fixed size font More... | |
static SLTexFont * | font10 = nullptr |
10 pixel high fixed size font More... | |
static SLTexFont * | font12 = nullptr |
12 pixel high fixed size font More... | |
static SLTexFont * | font14 = nullptr |
14 pixel high fixed size font More... | |
static SLTexFont * | font16 = nullptr |
16 pixel high fixed size font More... | |
static SLTexFont * | font18 = nullptr |
18 pixel high fixed size font More... | |
static SLTexFont * | font20 = nullptr |
20 pixel high fixed size font More... | |
static SLTexFont * | font22 = nullptr |
22 pixel high fixed size font More... | |
static SLTexFont * | font24 = nullptr |
24 pixel high fixed size font More... | |
Protected Attributes | |
SLVMesh | _meshes |
Vector of all meshes. More... | |
SLVMaterial | _materials |
Vector of all materials pointers. More... | |
SLVGLTexture | _textures |
Vector of all texture pointers. More... | |
SLVGLProgram | _programs |
Vector of all shader program pointers. More... | |
Toplevel holder of the assets meshes, materials, textures and shaders.
All these assets can be shared among instances of SLScene, SLNode and SLMaterial. Shared assets are meshes (SLMesh), materials (SLMaterial), textures (SLGLTexture) and shader programs (SLGLProgram). One instance of SLAssetManager must be owned and destroyed by the app (see e.g. AppCommon.h).
Definition at line 32 of file SLAssetManager.h.
SLAssetManager::~SLAssetManager | ( | ) |
Definition at line 31 of file SLAssetManager.cpp.
void SLAssetManager::clear | ( | ) |
for all assets, clear gpu data
Definition at line 44 of file SLAssetManager.cpp.
void SLAssetManager::deleteDataGpu | ( | ) |
|
static |
Deletes all static fonts.
Definition at line 180 of file SLAssetManager.cpp.
|
static |
Generates all static fonts.
Definition at line 153 of file SLAssetManager.cpp.
Definition at line 36 of file SLAssetManager.cpp.
SLGLProgram * SLAssetManager::getProgramByName | ( | const string & | programName | ) |
Returns the pointer to shader program if found by name.
Definition at line 125 of file SLAssetManager.cpp.
|
inline |
Definition at line 58 of file SLAssetManager.h.
void SLAssetManager::merge | ( | SLAssetManager & | other | ) |
merge other asset manager into this
Definition at line 135 of file SLAssetManager.cpp.
|
inline |
Definition at line 57 of file SLAssetManager.h.
|
inline |
Definition at line 60 of file SLAssetManager.h.
bool SLAssetManager::removeMesh | ( | SLMesh * | mesh | ) |
Removes the specified mesh from the meshes resource vector.
Definition at line 95 of file SLAssetManager.cpp.
bool SLAssetManager::removeProgram | ( | SLGLProgram * | program | ) |
Removes the specified mesh from the meshes resource vector.
Removes the specified program from the meshes resource vector.
Definition at line 110 of file SLAssetManager.cpp.
|
inline |
Definition at line 59 of file SLAssetManager.h.
|
protected |
Vector of all materials pointers.
Definition at line 83 of file SLAssetManager.h.
|
protected |
Vector of all meshes.
Definition at line 82 of file SLAssetManager.h.
|
protected |
Vector of all shader program pointers.
Definition at line 85 of file SLAssetManager.h.
|
protected |
Vector of all texture pointers.
Definition at line 84 of file SLAssetManager.h.
|
static |
7 pixel high fixed size font
Definition at line 69 of file SLAssetManager.h.
|
static |
8 pixel high fixed size font
Definition at line 70 of file SLAssetManager.h.
|
static |
9 pixel high fixed size font
Definition at line 71 of file SLAssetManager.h.
|
static |
10 pixel high fixed size font
Definition at line 72 of file SLAssetManager.h.
|
static |
12 pixel high fixed size font
Definition at line 73 of file SLAssetManager.h.
|
static |
14 pixel high fixed size font
Definition at line 74 of file SLAssetManager.h.
|
static |
16 pixel high fixed size font
Definition at line 75 of file SLAssetManager.h.
|
static |
18 pixel high fixed size font
Definition at line 76 of file SLAssetManager.h.
|
static |
20 pixel high fixed size font
Definition at line 77 of file SLAssetManager.h.
|
static |
22 pixel high fixed size font
Definition at line 78 of file SLAssetManager.h.
|
static |
24 pixel high fixed size font
Definition at line 79 of file SLAssetManager.h.