Class Tex2D
Defined in File Tex2D.hpp
Inheritance Relationships
Base Type
public Cacao::Asset
(Class Asset)
Class Documentation
-
class Tex2D : public Cacao::Asset
Asset type for 2D textures.
Public Functions
-
virtual void Realize()
Convert the image data into a form suitable for rendering.
- Throws:
BadRealizeStateException – If the texture is already realized
BadInitStateException – If the graphics backend is not initialized or connected
Public Static Functions
-
static inline std::shared_ptr<Tex2D> Create(libcacaoimage::Image &&imageBuffer, const std::string &addr)
Create a new 2D texture from image data.
- Parameters:
imageBuffer – The image data for the texture
addr – The resource address to associate with the texture
- Throws:
BadValueException – If the image buffer is empty
BadValueException – If the address is malformed
-
virtual void Realize()