GPipe-1.4: A functional graphics API for programmable GPUs

Safe HaskellSafe-Infered

Graphics.GPipe.Format

Contents

Description

This module defines the various formats that are used by FrameBuffers and textures, both on the GPU and the CPU.

Synopsis

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 

data LuminanceFormat Source

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

CPUFormat LuminanceFormat
CPUFormat1Comp
Color LuminanceFormat a
Luminance a

data RGBFormat Source

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

CPUFormat RGBFormat
CPUFormat3Comp
Color RGBFormat a
RGB (Vec3 a)

Constructors

R3G3B2 
RGB4 
RGB5 
RGB8 
RGB10 
RGB12 
RGB16 
SRGB8 

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 RGBAFormat
CPUFormat4Comp
Color RGBAFormat a
RGBA (Vec3 a) a

data DepthFormat Source

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

CPUFormat DepthFormat
CPUFormat1Comp

Constructors

Depth16 
Depth24 
Depth32 

data StencilFormat Source

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

CPUFormat StencilFormat
CPUFormat1Comp

Constructors

StencilFormat 

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

CPU formats

data CPUFormat2Comp Source

A CPU format for 2 components (i.e. a LuminanceAlpha color).

Constructors

PerComp2 CPUFormat1Comp