handles the load and deletion of textures/cubemaps
More...
#include <OxygenEngine/render/texture_manager.h>
|
| | TextureManager (const TextureManagerCreateInfo &={}) |
| | Constructor.
|
| |
| std::shared_ptr< Texture > | getDefaultTexture () const |
| | Get dummy texture.
|
| |
|
bool | hasTexture (const std::string &name) const |
| | Check if a texture is registered.
|
| |
| std::shared_ptr< Texture > | getTexture (const std::string &name) const |
| | Get a texture by name.
|
| |
| template<typename T = Texture, typename... Args> |
| std::shared_ptr< Texture > | registerTexture (const std::string &name, Args &&... args) |
| | Generate and register a texture by calling texture constructor.
|
| |
|
bool | removeTexture (const std::string &name) |
| | Remove a registered texture.
|
| |
|
bool | hasCubemap (const std::string &name) const |
| | Check if a cubemap is registered.
|
| |
| std::shared_ptr< Cubemap > | getCubemap (const std::string &name) const |
| | Get a cubemap by name.
|
| |
| std::shared_ptr< Cubemap > | getDefaultCubemap () const |
| | Get dummy cubemap.
|
| |
| template<typename T = Cubemap, typename... Args> |
| std::shared_ptr< Cubemap > | generateCubemap (const std::string &name, Args &&... args) |
| | Generate and register a cubemap by calling cubemap constructor.
|
| |
|
bool | removeCubemap (const std::string &name) |
| | Remove a registered cubemap.
|
| |
|
|
static void | setVerticalFlipOnLoad (const bool flip) |
| | Set if textures should be flipped upon image load.
|
| |
handles the load and deletion of textures/cubemaps
◆ TextureManager()
Constructor.
Generates default texture and cubemap (magenta/black checkerboard pattern)
◆ generateCubemap()
template<typename T = Cubemap, typename... Args>
| std::shared_ptr< Cubemap > oe::render::TextureManager::generateCubemap |
( |
const std::string & |
name, |
|
|
Args &&... |
args |
|
) |
| |
|
inline |
Generate and register a cubemap by calling cubemap constructor.
- See also
- Cubemap for available constructors
◆ getCubemap()
| std::shared_ptr< Cubemap > oe::render::TextureManager::getCubemap |
( |
const std::string & |
name | ) |
const |
Get a cubemap by name.
- Note
- Dummy cubemap returned if cubemap not found
◆ getDefaultCubemap()
| std::shared_ptr< Cubemap > oe::render::TextureManager::getDefaultCubemap |
( |
| ) |
const |
|
inline |
Get dummy cubemap.
- Returns
- Dummy cubemap using a checkerboard pattern
◆ getDefaultTexture()
| std::shared_ptr< Texture > oe::render::TextureManager::getDefaultTexture |
( |
| ) |
const |
|
inline |
Get dummy texture.
- Returns
- Dummy texture using a checkerboard pattern
◆ getTexture()
| std::shared_ptr< Texture > oe::render::TextureManager::getTexture |
( |
const std::string & |
name | ) |
const |
Get a texture by name.
- Note
- Dummy texture returned if the texture is not found
◆ registerTexture()
template<typename T = Texture, typename... Args>
| std::shared_ptr< Texture > oe::render::TextureManager::registerTexture |
( |
const std::string & |
name, |
|
|
Args &&... |
args |
|
) |
| |
|
inline |
Generate and register a texture by calling texture constructor.
- See also
- Texture for available constructors
The documentation for this class was generated from the following file: