caramia-0.2.0.1: Less painful OpenGL 3.3 rendering

Safe HaskellNone
LanguageHaskell2010

Graphics.Caramia.ImageFormats

Contents

Synopsis

Image formats

isRenderTargettable :: ImageFormat -> Bool Source

Given a format, returns True if that format can be rendered to. That is, if it can be one of the targets in a framebuffer.

This is conservative. Sometimes you may be able to render anyway; however this is not guaranteed by the OpenGL specification.

isCompressed :: ImageFormat -> Bool Source

Returns true if the given format is a compressed format.

isColorFormat :: ImageFormat -> Bool Source

Returns true if the given format is a color format.

isSRGBFormat :: ImageFormat -> Bool Source

Returns true if the given format uses the sRGB color space.

If the format is not a color format, returns False.

hasDepthComponent :: ImageFormat -> Bool Source

Returns true if the given format has a depth component.

hasStencilComponent :: ImageFormat -> Bool Source

Returns true if the given format has a stencil component.

Specification types

data SpecificationType Source

Specification formats.

These formats specify the type of the data passed from Haskell to GPU.

sizeOfSpecificationType :: SpecificationType -> Int Source

Given a specification format, returns the number of bytes one element uses.