Cache for faster loading of textures and meshes.
More...
#include <assets.hpp>
|
| Assets (std::string directory="assets/") |
|
| Assets (const Assets &assets)=delete |
|
| Assets (const Assets &&assets)=delete |
|
Assets & | operator= (const Assets &assets)=delete |
|
Assets & | operator= (const Assets &&assets)=delete |
|
auto | mesh (const std::string &path) -> Shared_mesh |
| Loads a Mesh from a *.mesh file and caches it internally. More...
|
|
auto | texture (const std::string &path, bool color_data=true, bool mipmaps=true, const Texture_2D::Filter &filter=Texture_2D::Filter::Linear, const Texture_2D::Wrap &wrap=Texture_2D::Wrap::Repeat) -> Shared_texture_2D |
| Loads Texture2D from a *.png file or *.texture and caches it internally.
|
|
auto | clear_unused () -> void |
| Remove all unused assets. More...
|
|
auto | clear () -> void |
| Clear all assets. More...
|
|
auto | directory () const -> std::string |
| Parent directory of the cache. More...
|
|
Cache for faster loading of textures and meshes.
◆ Assets()
mos::gfx::Assets::Assets |
( |
std::string |
directory = "assets/" | ) |
|
|
explicit |
- Parameters
-
directory | The directory where the assets exist, relative to the run directory. |
◆ clear()
auto mos::gfx::Assets::clear |
( |
| ) |
-> void |
◆ clear_unused()
auto mos::gfx::Assets::clear_unused |
( |
| ) |
-> void |
Remove all unused assets.
◆ directory()
auto mos::gfx::Assets::directory |
( |
| ) |
const -> std::string |
Parent directory of the cache.
◆ mesh()
auto mos::gfx::Assets::mesh |
( |
const std::string & |
path | ) |
-> Shared_mesh |
Loads a Mesh from a *.mesh file and caches it internally.
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/mos/checkouts/latest/include/mos/gfx/assets.hpp