class
#include <nCine/Graphics/ITextureLoader.h>
ITextureLoader Texture loader interface class.
Derived classes
- class TextureLoaderDds
- DDS texture loader.
- class TextureLoaderKtx
- KTX texture loader.
- class TextureLoaderPkm
- PKM texture loader.
- class TextureLoaderPng
- PNG texture loader.
- class TextureLoaderPvr
- PVR texture loader.
- class TextureLoaderQoi
- QOI texture loader.
- class TextureLoaderRaw
- Texture loader used to specify a raw format when loading texels.
Public static functions
-
static auto createFromFile(const Death::
Containers:: StringView filename) -> std:: unique_ptr<ITextureLoader> - Returns the proper texture loader according to the memory buffer name extension.
Constructors, destructors, conversion operators
- ~ITextureLoader() virtual
- ITextureLoader() protected
- An empty constructor only used by
TextureLoaderRaw
-
ITextureLoader(std::
unique_ptr<Death:: IO:: Stream> fileHandle) protected explicit
Public functions
- auto hasLoaded() const -> bool
- Returns true if the texture has been correctly loaded.
-
auto width() const -> std::
int32_t - Returns texture width.
-
auto height() const -> std::
int32_t - Returns texture height.
- auto size() const -> Vector2i
- Returns texture size as a
Vector2<int>
class. -
auto mipMapCount() const -> std::
int32_t - Returns the number of MIP maps stored in the texture file.
-
auto dataSize() const -> std::
uint32_t - Returns texture data size in bytes.
-
auto dataSize(std::
uint32_t mipMapLevel) const -> std:: int32_t - Returns the texture data size in bytes for the specified MIP map level.
- auto texFormat() const -> const TextureFormat&
- Returns the texture format object.
- auto pixels() const -> const GLubyte*
- Returns the pointer to pixel data.
-
auto pixels(std::
uint32_t mipMapLevel) const -> const GLubyte* - Returns the pointer to pixel data for the specified MIP map level.
Protected static functions
-
static auto createLoader(std::
unique_ptr<Death:: IO:: Stream> fileHandle, const Death:: Containers:: StringView path) -> std:: unique_ptr<ITextureLoader>
Protected functions
- void loadPixels(GLenum internalFormat)
- Loads pixel data from a texture file holding either compressed or uncompressed data.
- void loadPixels(GLenum internalFormat, GLenum type)
- Loads pixel data from a texture file holding either compressed or uncompressed data, overriding pixel type.
Function documentation
static std:: unique_ptr<ITextureLoader> nCine:: ITextureLoader:: createFromFile(const Death:: Containers:: StringView filename)
Returns the proper texture loader according to the memory buffer name extension.
Returns the proper texture loader according to the file extension