caramia-0.7.2.2: High-level OpenGL bindings

Safe HaskellNone
LanguageHaskell2010

Graphics.Caramia.ImageFormats.Internal

Description

This module contains data types that describe the data formats of images.

https://www.opengl.org/wiki/Image_Format

Synopsis

Documentation

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.

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.

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.

sizeOfSpecificationType :: SpecificationType -> Int Source

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