GPipe-1.0.0: A functional graphics API for programmable GPUsSource codeContentsIndex
Graphics.GPipe.Format
Contents
GPU formats
CPU formats
Description
This module defines the various formats that are used by FrameBuffers and textures, both in the GPU and the CPU.
Synopsis
data AlphaFormat
= Alpha4
| Alpha8
| Alpha12
| Alpha16
data LuminanceFormat
= Luminance4
| Luminance8
| Luminance12
| Luminance16
| SLuminance8
data LuminanceAlphaFormat
= Luminance4Alpha4
| Luminance6Alpha2
| Luminance8Alpha8
| Luminance12Alpha4
| Luminance12Alpha12
| Luminance16Alpha16
| SLuminance8Alpha8
data RGBFormat
= R3G3B2
| RGB4
| RGB5
| RGB8
| RGB10
| RGB12
| RGB16
| SRGB8
data RGBAFormat
= RGBA2
| RGBA4
| RGB5A1
| RGBA8
| RGB10A2
| RGBA12
| RGBA16
| SRGBA8
data DepthFormat
= Depth16
| Depth24
| Depth32
data StencilFormat = StencilFormat
class (StorableCPUFormat (CPUFormat f), Eq (CPUFormat f)) => GPUFormat f where
type CPUFormat f
class GPUFormat f => ColorFormat f where
data Color f :: * -> *
type Depth = Float
type Stencil = Int
data CPUFormat4Comp
= PerComp4 CPUFormat1Comp
| UnsignedShort4_4_4_4
| UnsignedShort4_4_4_4_Rev
| UnsignedShort5_5_5_1
| UnsignedShort1_5_5_5_Rev
| UnsignedInt8_8_8_8
| UnsignedInt8_8_8_8_Rev
| UnsignedInt10_10_10_2
| UnsignedInt2_10_10_10_Rev
data CPUFormat3Comp
= PerComp3 CPUFormat1Comp
| UnsignedByte3_3_2
| UnsignedByte2_3_3_Rev
| UnsignedShort5_6_5
| UnsignedShort5_6_5_Rev
data CPUFormat2Comp = PerComp2 CPUFormat1Comp
data CPUFormat1Comp
= UnsignedByteFormat
| BitmapFormat
| ByteFormat
| UnsignedShortFormat
| ShortFormat
| UnsignedIntFormat
| IntFormat
| FloatFormat
class StorableCPUFormat a
GPU formats
data AlphaFormat Source

A GPU format with only an alpha value. These are the associated types in GPUFormat and ColorFormat:

CPUFormat AlphaFormat
CPUFormat1Comp
Color AlphaFormat a
Alpha a
Constructors
Alpha4
Alpha8
Alpha12
Alpha16
show/hide Instances
data LuminanceFormat Source

A GPU format with a single color component. These are the associated types in GPUFormat and ColorFormat:

CPUFormat AlphaFormat
CPUFormat1Comp
Color AlphaFormat a
Luminance a
Constructors
Luminance4
Luminance8
Luminance12
Luminance16
SLuminance8
show/hide Instances
data LuminanceAlphaFormat Source

A GPU format with a single color component and an alpha value. These are the associated types in GPUFormat and ColorFormat:

CPUFormat AlphaFormat
CPUFormat2Comp
Color AlphaFormat a
LuminanceAlpha a a
Constructors
Luminance4Alpha4
Luminance6Alpha2
Luminance8Alpha8
Luminance12Alpha4
Luminance12Alpha12
Luminance16Alpha16
SLuminance8Alpha8
show/hide Instances
data RGBFormat Source

A GPU format with color components for red, green and blue. These are the associated types in GPUFormat and ColorFormat:

CPUFormat AlphaFormat
CPUFormat3Comp
Color AlphaFormat a
RGB (Vec3 a)
Constructors
R3G3B2
RGB4
RGB5
RGB8
RGB10
RGB12
RGB16
SRGB8
show/hide Instances
data RGBAFormat Source

A GPU format with color components for red, green and blue, and an alpha value. These are the associated types in GPUFormat and ColorFormat:

CPUFormat AlphaFormat
CPUFormat4Comp
Color AlphaFormat a
RGBA (Vec3 a) a
Constructors
RGBA2
RGBA4
RGB5A1
RGBA8
RGB10A2
RGBA12
RGBA16
SRGBA8
show/hide Instances
data DepthFormat Source

A GPU format for a depth buffer value. This is the associated type in GPUFormat:

CPUFormat AlphaFormat
CPUFormat1Comp
Constructors
Depth16
Depth24
Depth32
show/hide Instances
data StencilFormat Source

A GPU format for a stencil buffer value. This is the associated type in GPUFormat:

CPUFormat AlphaFormat
CPUFormat1Comp
Constructors
StencilFormat
show/hide Instances
class (StorableCPUFormat (CPUFormat f), Eq (CPUFormat f)) => GPUFormat f Source
Associated Types
type CPUFormat f Source
Methods
show/hide Instances
class GPUFormat f => ColorFormat f Source
This context is used to select which types can be used in a frame buffers color buffer, and also to restrict the type of a texture.
Associated Types
data Color f :: * -> *Source
Methods
show/hide Instances
type Depth = FloatSource
type Stencil = IntSource
CPU formats
data CPUFormat4Comp Source
A CPU format for 4 components (i.e. a RGBA color).
Constructors
PerComp4 CPUFormat1Comp
UnsignedShort4_4_4_4
UnsignedShort4_4_4_4_Rev
UnsignedShort5_5_5_1
UnsignedShort1_5_5_5_Rev
UnsignedInt8_8_8_8
UnsignedInt8_8_8_8_Rev
UnsignedInt10_10_10_2
UnsignedInt2_10_10_10_Rev
show/hide Instances
data CPUFormat3Comp Source
A CPU format for 3 components (i.e. a RGB color).
Constructors
PerComp3 CPUFormat1Comp
UnsignedByte3_3_2
UnsignedByte2_3_3_Rev
UnsignedShort5_6_5
UnsignedShort5_6_5_Rev
show/hide Instances
data CPUFormat2Comp Source
A CPU format for 2 components (i.e. a LuminanceAlpha color).
Constructors
PerComp2 CPUFormat1Comp
show/hide Instances
data CPUFormat1Comp Source
A CPU format for 1 component
Constructors
UnsignedByteFormat
BitmapFormat
ByteFormat
UnsignedShortFormat
ShortFormat
UnsignedIntFormat
IntFormat
FloatFormat
show/hide Instances
class StorableCPUFormat a Source
show/hide Instances
Produced by Haddock version 2.4.2