Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | List of all members
castor::ImageLoader Class Reference

#include <ImageLoader.hpp>

Inheritance diagram for castor::ImageLoader:
Inheritance graph
[legend]
Collaboration diagram for castor::ImageLoader:
Collaboration graph
[legend]

Public Member Functions

CU_API ImageLoader (PxCompressionSupport support={})
 
CU_API void registerLoader (String const &extension, ImageLoaderPtr loader)
 Registers an image loader.
 
CU_API void registerLoader (StringArray const &extensions, ImageLoaderPtr loader)
 Registers an image loader.
 
CU_API void unregisterLoader (String const &extension)
 Unregisters the loader for given image file extension.
 
CU_API void unregisterLoader (StringArray const &extensions)
 Unregisters the loader for given image file extension.
 
CU_API Image load (String const &name, Path const &path, ImageLoaderConfig const &config) const
 Loads an image file data.
 
CU_API Image load (String const &name, Path const &imagePath, uint8_t const *data, uint32_t size, ImageLoaderConfig const &config) const
 Loads an image file data.
 
CU_API Image load (String const &name, String const &imageFormat, uint8_t const *data, uint32_t size, ImageLoaderConfig const &config) const
 Loads an image file data.
 
void setCompressionSupport (PxCompressionSupport support)
 
PxBufferConvertOptions const & getOptions () const
 

Additional Inherited Members

- Protected Member Functions inherited from castor::NonMovable
 NonMovable ()=default
 Constructor.
 
 ~NonMovable () noexcept=default
 Destructor.
 

Constructor & Destructor Documentation

◆ ImageLoader()

CU_API castor::ImageLoader::ImageLoader ( PxCompressionSupport support = {})
explicit

Member Function Documentation

◆ getOptions()

PxBufferConvertOptions const & castor::ImageLoader::getOptions ( ) const
inline

◆ load() [1/3]

CU_API Image castor::ImageLoader::load ( String const & name,
Path const & imagePath,
uint8_t const * data,
uint32_t size,
ImageLoaderConfig const & config ) const

Loads an image file data.

Parameters
[in]nameThe image name.
[in]imagePathPath to the image file.
[in]dataThe image data.
[in]sizeThe image data size.
[in]configThe loader configuration.
Returns
The image.

◆ load() [2/3]

CU_API Image castor::ImageLoader::load ( String const & name,
Path const & path,
ImageLoaderConfig const & config ) const

Loads an image file data.

Parameters
[in]nameThe image name.
[in]pathThe image file path.
[in]configThe loader configuration.
Returns
The image.

◆ load() [3/3]

CU_API Image castor::ImageLoader::load ( String const & name,
String const & imageFormat,
uint8_t const * data,
uint32_t size,
ImageLoaderConfig const & config ) const

Loads an image file data.

Parameters
[in]nameThe image name.
[in]imageFormatThe image format, loader wise.
[in]dataThe image data.
[in]sizeThe image data size.
[in]configThe loader configuration.
Returns
The image.

◆ registerLoader() [1/2]

CU_API void castor::ImageLoader::registerLoader ( String const & extension,
ImageLoaderPtr loader )

Registers an image loader.

Parameters
[in]extensionThe image file extension.
[in]loaderThe image loader.

◆ registerLoader() [2/2]

CU_API void castor::ImageLoader::registerLoader ( StringArray const & extensions,
ImageLoaderPtr loader )

Registers an image loader.

Parameters
[in]extensionsThe image file extensions list.
[in]loaderThe image loader.

◆ setCompressionSupport()

void castor::ImageLoader::setCompressionSupport ( PxCompressionSupport support)
inline

◆ unregisterLoader() [1/2]

CU_API void castor::ImageLoader::unregisterLoader ( String const & extension)

Unregisters the loader for given image file extension.

Parameters
[in]extensionThe image file extension.

◆ unregisterLoader() [2/2]

CU_API void castor::ImageLoader::unregisterLoader ( StringArray const & extensions)

Unregisters the loader for given image file extension.

Parameters
[in]extensionsThe image file extensions list.

The documentation for this class was generated from the following file: