![]() |
Lysa
0.0
Lysa 3D Engine
|
Inheritance diagram for ImageManager:Public Member Functions | |
| ImageManager (size_t capacity) | |
| ~ImageManager () override | |
| void | save (unique_id image_id, const std::string &filepath) |
| Image & | load (const std::string &filepath, vireo::ImageFormat imageFormat=vireo::ImageFormat::R8G8B8A8_SRGB) |
| Image & | create (const std::shared_ptr< vireo::Image > &image, const std::string &name="Image") |
| Image & | create (const void *data, uint32 width, uint32 height, vireo::ImageFormat imageFormat=vireo::ImageFormat::R8G8B8A8_SRGB, const std::string &name="Image") |
| auto | getBlankImage () const |
| auto | getBlankCubeMap () const |
| auto | getImages () const |
| bool | destroy (unique_id id) override |
| bool | destroy (const Image &image) override |
Public Member Functions inherited from ResourcesManager< Image > | |
| ResourcesManager (ResourcesManager &) = delete | |
| Image & | create (Args &&...args) |
| unique_id | getCapacity () const |
| bool | have (const unique_id id) const |
| ResourcesManager & | operator= (ResourcesManager &) = delete |
| Image & | operator[] (const unique_id id) |
| const Image & | operator[] (const unique_id id) const |
| void | use (const unique_id id) |
| virtual | ~ResourcesManager () |
Additional Inherited Members | |
Protected Member Functions inherited from ResourcesManager< Image > | |
| ResourcesManager (const size_t capacity, const std::string &name) | |
| Image & | allocate (std::unique_ptr< Image > instance) |
| bool | isFull () const |
Protected Attributes inherited from ResourcesManager< Image > | |
| std::vector< std::unique_ptr< Image > > | resources |
| ImageManager | ( | size_t | capacity | ) |
Construct a new manager
| capacity | Fixed capacity |
|
override |
| Image& create | ( | const std::shared_ptr< vireo::Image > & | image, |
| const std::string & | name = "Image" |
||
| ) |
Creates a bitmap from an array in memory
| image | |
| name | Optional name |
| Image& create | ( | const void * | data, |
| uint32 | width, | ||
| uint32 | height, | ||
| vireo::ImageFormat | imageFormat = vireo::ImageFormat::R8G8B8A8_SRGB, |
||
| const std::string & | name = "Image" |
||
| ) |
Creates a bitmap from an array in memory
| data | Pixels array |
| width | Width in pixels |
| height | Height in pixels |
| imageFormat | Pixel format |
| name | Optional name |
|
inlineoverridevirtual |
Reimplemented from lysa::ResourcesManager< Image >::destroy()
|
overridevirtual |
Reimplemented from lysa::ResourcesManager< Image >::destroy()
|
inline |
Returns the default cubemap blank image used as a safe fallback.
|
inline |
Returns the default 2D blank image used as a safe fallback.
|
inline |
Return the global GPU image array
| Image& load | ( | const std::string & | filepath, |
| vireo::ImageFormat | imageFormat = vireo::ImageFormat::R8G8B8A8_SRGB |
||
| ) |
Load a bitmap from a file.
Supports JPEG and PNG formats
| filepath | Source file URI |
| imageFormat | Image pixel format |