package textures
Constants
FileFormatAstc
astcExtension
FileFormatPng
pngExtension
FileFormatJpeg
jpegExtension
FileFormatRaw
rawFileFormat
BytesInPixel
4
CubeMapSides
6
GenerateUniqueTextureKey
""
Functions
InferFileFormat
Types
ColorFormat
const ( TextureColorFormatRgbaUnorm ColorFormat = iota TextureColorFormatRgbUnorm TextureColorFormatRgbaSrgb TextureColorFormatRgbSrgb TextureColorFormatLuminance )
Dimensions
const ( TextureDimensions2 Dimensions = iota TextureDimensions1 TextureDimensions3 TextureDimensionsCube )
Filter
const ( TextureFilterLinear Filter = iota TextureFilterNearest TextureFilterMax )
ImageAstc
struct
ImageAstc.CanRead
ImageAstc.FileFormat
ImageAstc.IsMyType
ImageAstc.Read
ImageJpeg
struct
ImageJpeg.CanRead
ImageJpeg.FileFormat
ImageJpeg.IsMyType
ImageJpeg.Read
ImagePng
struct
ImagePng.CanRead
ImagePng.FileFormat
ImagePng.IsMyType
ImagePng.Read
ImageRaw
struct
ImageRaw.CanRead
ImageRaw.FileFormat
ImageRaw.IsMyType
ImageRaw.Read
ImageReader
interface
type ImageReader interface {
CanRead(path string) bool
Read(mem []byte) TextureData
FileFormat() string
IsMyType(pathOrKey string, mem []byte) bool
}
InputType
const ( TextureInputTypeCompressedRgbaAstc4x4 InputType = iota TextureInputTypeCompressedRgbaAstc5x4 TextureInputTypeCompressedRgbaAstc5x5 TextureInputTypeCompressedRgbaAstc6x5 TextureInputTypeCompressedRgbaAstc6x6 TextureInputTypeCompressedRgbaAstc8x5 TextureInputTypeCompressedRgbaAstc8x6 TextureInputTypeCompressedRgbaAstc8x8 TextureInputTypeCompressedRgbaAstc10x5 TextureInputTypeCompressedRgbaAstc10x6 TextureInputTypeCompressedRgbaAstc10x8 TextureInputTypeCompressedRgbaAstc10x10 TextureInputTypeCompressedRgbaAstc12x10 TextureInputTypeCompressedRgbaAstc12x12 TextureInputTypeRgba8 TextureInputTypeRgb8 TextureInputTypeLuminance )
Kind
const ( Texture1D Kind = iota Texture1DArray Texture2D Texture2DArray Texture3D TextureCube TextureCubeArray )
MemType
const ( TextureMemTypeUnsignedByte MemType = iota )
TextureData
struct
type TextureData struct {
Mem []byte
InternalFormat InputType
Format ColorFormat
Type MemType
Width int
Height int
InputType TextureFileFormat
Dimensions Dimensions
}
ReadImage
TextureData.IsValid
TextureFileFormat
Usage
const ( TextureSampled Usage = (1 << iota) TextureStorage TextureColorTarget TextureDepthStencilTarget TextureCopySource TextureCopyDestination )