CubeTexture
Represents a cube map texture.
A cube texture stores six face images that form a cube map, commonly used for skyboxes and environment mapping. Each face corresponds to a direction along the positive or negative X, Y, or Z axis. Cube textures are typically created through the engine's cube texture loader rather than instantiated directly.
INFO
Derives from Texture and inherits all public properties and methods.
Construction
Constructors
CubeTexture()
Constructs a cube texture from six face images.
The texture holds shared references to each face image, allowing multiple textures to share the same underlying pixel data.
cpp
CubeTexture::CubeTexture(Images images);| Parameter | Description |
|---|---|
| images | The six face images that make up the cube map. |
Factories preferred
CubeTexture::Create() std::shared_ptr<CubeTexture>
Creates a shared instance of CubeTexture.
cpp
static std::shared_ptr<CubeTexture> CubeTexture::Create(Images images);| Parameter | Description |
|---|---|
| images | The six face images that make up the cube map. |
Types
CubeTexture::Images struct
The six face images that make up the cube map.
| Parameter | Description |
|---|---|
| positive_x std::shared_ptr<Image> | Right face (+X). |
| negative_x std::shared_ptr<Image> | Left face (-X). |
| positive_y std::shared_ptr<Image> | Top face (+Y). |
| negative_y std::shared_ptr<Image> | Bottom face (-Y). |
| positive_z std::shared_ptr<Image> | Front face (+Z). |
| negative_z std::shared_ptr<Image> | Back face (-Z). |
Properties
Functions
GetType() Texture::Type virtual
Identifies this texture as Texture::Type::CubeTexture.
cpp
Type vglx::CubeTexture::GetType() const override;