Class Cubemap
Defined in File Cubemap.hpp
Inheritance Relationships
Base Type
public Cacao::Asset
(Class Asset)
Class Documentation
-
class Cubemap : public Cacao::Asset
Asset type for 3D cube textures.
Public Functions
-
virtual void Realize()
Synchronously convert the image data into a form suitable for rendering.
- Throws:
BadRealizeStateException – If the cubemap is already realized
BadInitStateException – If the graphics backend is not initialized or connected
-
virtual std::shared_future<void> RealizeAsync()
Asynchronously convert the image data into a form suitable for rendering.
- Throws:
BadRealizeStateException – If the cubemap is already realized
BadInitStateException – If the graphics backend is not initialized or connected
- Returns:
A future that will resolve when realization is complete or fails
Public Static Functions
-
static inline std::shared_ptr<Cubemap> Create(std::array<libcacaoimage::Image, 6> &&faces, const std::string &addr)
Create a new cubemap from image data.
- Parameters:
faces – The face images of the cubemap, in the order of +X face, -X face, +Y face, -Y face, +Z face, -Z face
addr – The resource address identifier to associate with the cubemap
- Throws:
BadValueException – If one of the faces is not in the RGB layout
-
virtual void Realize()