Module dagon.graphics.texture
Provides a texture class and corresponding utilities.
Description
The dagon
module defines the Texture
class
for managing 1D, 2D, 3D, and cubemap textures, supporting compressed
and uncompressed formats, mipmapping, filtering, and OpenGL resource management.
The module also includes enums for texture formats, cube faces, and utility
functions for texture creation, loading, and conversion.
Functions
Name | Description |
---|---|
cubeFaceBit(face)
|
Returns a corresponding CubeFaceBit for a given CubeFace
|
cubeFaceCameraMatrix(cf, pos)
|
Returns the world space transformation matrix for a cubemap face at a given position. |
cubeFaceMatrix(cf)
|
Returns the transformation matrix for a cubemap face. |
detectTextureFormat(img, tf)
|
Detects the supported texture format from a SuperImage .
|
equirectProj(dir)
|
Projects a 3D direction vector to equirectangular UV coordinates. |
Classes
Name | Description |
---|---|
Texture
|
Represents an OpenGL texture object. |
Structs
Name | Description |
---|---|
TextureBuffer
|
Intermediate texture data storage. Used to create textures loaded from container formats, such as DDS and KTX, from custom formats or directly from memory. |
TextureFormat
|
Describes the format and layout of a texture. |
TextureSize
|
Represents the size of a texture in pixels. |
Enums
Name | Description |
---|---|
CubeFace
|
The faces of a cubemap texture. |
CubeFaceBit
|
Bitmask for cubemap faces. |
TextureDimension
|
Specifies the dimension of a texture. |