flaw-graphics-0.1.0.0

LicenseMIT
Safe HaskellNone
LanguageHaskell2010

Flaw.Graphics.Texture

Description

 
Synopsis

Documentation

data TextureFormat Source #

Texture formats.

Instances
Eq TextureFormat Source # 
Instance details

Defined in Flaw.Graphics.Texture

Show TextureFormat Source # 
Instance details

Defined in Flaw.Graphics.Texture

Generic TextureFormat Source # 
Instance details

Defined in Flaw.Graphics.Texture

Associated Types

type Rep TextureFormat :: Type -> Type #

Serialize TextureFormat Source # 
Instance details

Defined in Flaw.Graphics.Texture

type Rep TextureFormat Source # 
Instance details

Defined in Flaw.Graphics.Texture

type Rep TextureFormat = D1 (MetaData "TextureFormat" "Flaw.Graphics.Texture" "flaw-graphics-0.1.0.0-G4aqR0nuB7u1vHlmL38e2" False) (C1 (MetaCons "UncompressedTextureFormat" PrefixI True) ((S1 (MetaSel (Just "textureFormatComponents") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 PixelComponents) :*: S1 (MetaSel (Just "textureFormatValueType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 PixelValueType)) :*: (S1 (MetaSel (Just "textureFormatPixelSize") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 PixelSize) :*: S1 (MetaSel (Just "textureFormatColorSpace") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ColorSpace))) :+: C1 (MetaCons "CompressedTextureFormat" PrefixI True) (S1 (MetaSel (Just "textureFormatCompression") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 TextureCompression) :*: S1 (MetaSel (Just "textureFormatColorSpace") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ColorSpace)))

data PixelComponents Source #

Pixel components for texture format.

Constructors

PixelR 
PixelRG 
PixelRGB 
PixelRGBA 
Instances
Eq PixelComponents Source # 
Instance details

Defined in Flaw.Graphics.Texture

Show PixelComponents Source # 
Instance details

Defined in Flaw.Graphics.Texture

Generic PixelComponents Source # 
Instance details

Defined in Flaw.Graphics.Texture

Associated Types

type Rep PixelComponents :: Type -> Type #

Serialize PixelComponents Source # 
Instance details

Defined in Flaw.Graphics.Texture

type Rep PixelComponents Source # 
Instance details

Defined in Flaw.Graphics.Texture

type Rep PixelComponents = D1 (MetaData "PixelComponents" "Flaw.Graphics.Texture" "flaw-graphics-0.1.0.0-G4aqR0nuB7u1vHlmL38e2" False) ((C1 (MetaCons "PixelR" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "PixelRG" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "PixelRGB" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "PixelRGBA" PrefixI False) (U1 :: Type -> Type)))

data PixelValueType Source #

Pixel value type.

Instances
Eq PixelValueType Source # 
Instance details

Defined in Flaw.Graphics.Texture

Show PixelValueType Source # 
Instance details

Defined in Flaw.Graphics.Texture

Generic PixelValueType Source # 
Instance details

Defined in Flaw.Graphics.Texture

Associated Types

type Rep PixelValueType :: Type -> Type #

Serialize PixelValueType Source # 
Instance details

Defined in Flaw.Graphics.Texture

type Rep PixelValueType Source # 
Instance details

Defined in Flaw.Graphics.Texture

type Rep PixelValueType = D1 (MetaData "PixelValueType" "Flaw.Graphics.Texture" "flaw-graphics-0.1.0.0-G4aqR0nuB7u1vHlmL38e2" False) (C1 (MetaCons "PixelUntyped" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "PixelUint" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "PixelFloat" PrefixI False) (U1 :: Type -> Type)))

data PixelSize Source #

Pixel size.

Instances
Eq PixelSize Source # 
Instance details

Defined in Flaw.Graphics.Texture

Ord PixelSize Source # 
Instance details

Defined in Flaw.Graphics.Texture

Show PixelSize Source # 
Instance details

Defined in Flaw.Graphics.Texture

Generic PixelSize Source # 
Instance details

Defined in Flaw.Graphics.Texture

Associated Types

type Rep PixelSize :: Type -> Type #

Serialize PixelSize Source # 
Instance details

Defined in Flaw.Graphics.Texture

type Rep PixelSize Source # 
Instance details

Defined in Flaw.Graphics.Texture

type Rep PixelSize = D1 (MetaData "PixelSize" "Flaw.Graphics.Texture" "flaw-graphics-0.1.0.0-G4aqR0nuB7u1vHlmL38e2" False) ((C1 (MetaCons "Pixel8bit" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "Pixel16bit" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Pixel24bit" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "Pixel32bit" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Pixel64bit" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "Pixel96bit" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Pixel128bit" PrefixI False) (U1 :: Type -> Type))))

data TextureCompression Source #

Texture compression. Sizes in descriptions are given for 4x4 pixel blocks (obviously).

Constructors

TextureCompressionBC1

RGB (64 bit, two 5:6:5 values and 4x4 2-bit lookup table). Another name: DXT1

TextureCompressionBC1Alpha

RGB (64 bit, two 5:6:5 values and 4x4 2-bit lookup table, with one of the colors in table replaced by transparent color). Another name: DXT1

TextureCompressionBC2

RGB (64 bit, same as in BC1) plus alpha (64 bit, i.e. 4 uncompressed bit per pixel) Another names: DXT2 - when color is premultiplied by alpha, DXT3 otherwise.

TextureCompressionBC3

RGB (64 bit, same as in BC1) plus alpha (64 bit, two 8-bit values plus 4x4 3-bit lookup table). Another names: DXT4 - when color is premultiplied by alpha, DXT5 otherwise.

TextureCompressionBC4

R (64 bit, two 8-bit values plus 4x4 3-bit lookup table).

TextureCompressionBC4Signed

R signed (64 bit, two 8-bit values plus 4x4 3-bit lookup table).

TextureCompressionBC5

RG (128 bit, simply two BC4 blocks)

TextureCompressionBC5Signed

RG signed (128 bit, simply two BC4 blocks)

Instances
Eq TextureCompression Source # 
Instance details

Defined in Flaw.Graphics.Texture

Show TextureCompression Source # 
Instance details

Defined in Flaw.Graphics.Texture

Generic TextureCompression Source # 
Instance details

Defined in Flaw.Graphics.Texture

Associated Types

type Rep TextureCompression :: Type -> Type #

Serialize TextureCompression Source # 
Instance details

Defined in Flaw.Graphics.Texture

type Rep TextureCompression Source # 
Instance details

Defined in Flaw.Graphics.Texture

type Rep TextureCompression = D1 (MetaData "TextureCompression" "Flaw.Graphics.Texture" "flaw-graphics-0.1.0.0-G4aqR0nuB7u1vHlmL38e2" False) (((C1 (MetaCons "TextureCompressionBC1" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "TextureCompressionBC1Alpha" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "TextureCompressionBC2" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "TextureCompressionBC3" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "TextureCompressionBC4" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "TextureCompressionBC4Signed" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "TextureCompressionBC5" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "TextureCompressionBC5Signed" PrefixI False) (U1 :: Type -> Type))))

data ColorSpace Source #

Color space.

Instances
Eq ColorSpace Source # 
Instance details

Defined in Flaw.Graphics.Texture

Show ColorSpace Source # 
Instance details

Defined in Flaw.Graphics.Texture

Generic ColorSpace Source # 
Instance details

Defined in Flaw.Graphics.Texture

Associated Types

type Rep ColorSpace :: Type -> Type #

Serialize ColorSpace Source # 
Instance details

Defined in Flaw.Graphics.Texture

type Rep ColorSpace Source # 
Instance details

Defined in Flaw.Graphics.Texture

type Rep ColorSpace = D1 (MetaData "ColorSpace" "Flaw.Graphics.Texture" "flaw-graphics-0.1.0.0-G4aqR0nuB7u1vHlmL38e2" False) (C1 (MetaCons "LinearColorSpace" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "StandardColorSpace" PrefixI False) (U1 :: Type -> Type))

data TextureInfo Source #

Texture information.

Constructors

TextureInfo 

Fields

Instances
Show TextureInfo Source # 
Instance details

Defined in Flaw.Graphics.Texture

Generic TextureInfo Source # 
Instance details

Defined in Flaw.Graphics.Texture

Associated Types

type Rep TextureInfo :: Type -> Type #

Serialize TextureInfo Source # 
Instance details

Defined in Flaw.Graphics.Texture

type Rep TextureInfo Source # 
Instance details

Defined in Flaw.Graphics.Texture

type Rep TextureInfo = D1 (MetaData "TextureInfo" "Flaw.Graphics.Texture" "flaw-graphics-0.1.0.0-G4aqR0nuB7u1vHlmL38e2" False) (C1 (MetaCons "TextureInfo" PrefixI True) ((S1 (MetaSel (Just "textureWidth") SourceUnpack SourceStrict DecidedStrict) (Rec0 Int) :*: (S1 (MetaSel (Just "textureHeight") SourceUnpack SourceStrict DecidedStrict) (Rec0 Int) :*: S1 (MetaSel (Just "textureDepth") SourceUnpack SourceStrict DecidedStrict) (Rec0 Int))) :*: (S1 (MetaSel (Just "textureMips") SourceUnpack SourceStrict DecidedStrict) (Rec0 Int) :*: (S1 (MetaSel (Just "textureFormat") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 TextureFormat) :*: S1 (MetaSel (Just "textureCount") SourceUnpack SourceStrict DecidedStrict) (Rec0 Int)))))

data TextureMetrics Source #

Various byte metrics of texture.

Constructors

TextureMetrics 

Fields

data TextureMipMetrics Source #

Various byte metrics of texture mip level. All numbers >= 1, like even for 1D texture height is 1, as opposite to 0 in TextureInfo.

Constructors

TextureMipMetrics 

Fields

calcTextureMetrics :: TextureInfo -> TextureMetrics Source #

Calculate byte metrics for texture.

pixelSizeByteSize :: PixelSize -> Int Source #

Convert PixelSize to actual number of bytes.

compressed4x4BlockSize :: TextureCompression -> Int Source #

Get size of 4x4 compressed pixel block.