7typedef void* TextureIdentifierPtr;
37 hashCombine(res, t.
name);
38 hashCombine(res, t.
alpha);
56 NW_MIN_LINEAR = 0x2601,
57 NW_MIN_NEAREST = 0x2600,
58 NW_NEAREST_MIPMAP_NEAREST = 0x2700,
59 NW_NEAREST_MIPMAP_LINEAR = 0x2702
92 void Clean()
override;
98 void Bind(uint32 slot = 0);
105 void _GPUGen(uint8* data, TexChannelInfo channelInfo);
The base class for all assets.
Definition Asset.h:9
Class representing a texture asset.
Definition Texture.h:81
void SetMaxFilter(TexMaxFilter maxFilter)
Sets the magnification filter for the texture.
Definition Texture.cpp:38
bool _hasMipMap
Definition Texture.h:85
void SetMinFilter(TexMinFilter minFilter)
Sets the minification filter for the texture.
Definition Texture.cpp:33
void GenMipMap()
Generates mipmaps for the texture.
Definition Texture.cpp:27
Asset * LoadFromFile(const char *path, TextureIdentifierPtr identifier) override
Loads the texture from a file.
Definition Texture.cpp:61
Vector2< int > _size
Definition Texture.h:84
void _GPUGen(uint8 *data, TexChannelInfo channelInfo)
Generates the texture on the GPU.
Definition Texture.cpp:6
Asset * GetFromCache(void *identifier) override
Gets the texture from the cache based on the identifier.
Definition Texture.cpp:55
Asset * LoadFromBuffer(void *buffer, void *data) override
Loads the texture from a buffer.
Definition Texture.cpp:70
void Clean() override
Cleans up the texture.
Definition Texture.cpp:87
void SetEdgesBehaviour(TexEdge edge)
Sets the edge behavior for the texture.
Definition Texture.cpp:43
uint32 _glID
Definition Texture.h:83
void Bind(uint32 slot=0)
Binds the texture to a specified texture slot.
Definition Texture.cpp:49
Struct representing the identifier of a texture.
Definition Texture.h:12
uint8 alpha
Definition Texture.h:14
std::string name
Definition Texture.h:13
bool operator==(const TextureIdentifier &other) const
Overloaded equality operator for comparing TextureIdentifier objects.
Definition Texture.h:21
std::size_t operator()(const TextureIdentifier &t) const
Hash function for TextureIdentifier objects.
Definition Texture.h:34