enum Gloop::ImageFormat

Overview

Specifies number of components, bit-depth, and data type used for pixels.

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

Defined in:

gloop/image_format.cr

Enum Members

UIntNormR = 6403_u32
UInt8NormR = 33321_u32
UInt16NormR = 33322_u32
UIntNormRG = 33319_u32
UInt8NormRG = 33323_u32
UInt16NormRG = 33324_u32
UIntNormRGB = 6407_u32
UInt4NormRGB = 32847_u32
UInt5NormRGB = 32848_u32
UInt8NormRGB = 32849_u32
UInt10NormRGB = 32850_u32
UInt12NormRGB = 32851_u32
UInt16NormRGB = 32852_u32
UIntNormRGBA = 6408_u32
UInt2NormRGBA = 32853_u32
UInt4NormRGBA = 32854_u32
UInt8NormRGBA = 32856_u32
UInt12NormRGBA = 32858_u32
UInt16NormRGBA = 32859_u32
Int8NormR = 36756_u32
Int16NormR = 36760_u32
Int8NormRG = 36757_u32
Int16NormRG = 36761_u32
Int8NormRGB = 36758_u32
Int16NormRGB = 36762_u32
Int8NormRGBA = 36759_u32
Int16NormRGBA = 36763_u32
UInt8R = 33330_u32
UInt16R = 33332_u32
UInt32R = 33334_u32
UInt8RG = 33336_u32
UInt16RG = 33338_u32
UInt32RG = 33340_u32
UInt8RGB = 36221_u32
UInt16RGB = 36215_u32
UInt32RGB = 36209_u32
UInt8RGBA = 36220_u32
UInt16RGBA = 36214_u32
UInt32RGBA = 36208_u32
Int8R = 33329_u32
Int16R = 33331_u32
Int32R = 33333_u32
Int8RG = 33335_u32
Int16RG = 33337_u32
Int32RG = 33339_u32
Int8RGB = 36239_u32
Int16RGB = 36233_u32
Int32RGB = 36227_u32
Int8RGBA = 36238_u32
Int16RGBA = 36232_u32
Int32RGBA = 36226_u32
Float16R = 33325_u32
Float32R = 33326_u32
Float16RG = 33327_u32
Float32RG = 33328_u32
Float16RGB = 34843_u32
Float32RGB = 34837_u32
Float16RGBA = 34842_u32
Float32RGBA = 34836_u32
UIntDepth = 6402_u32
UInt16Depth = 33189_u32
UInt24Depth = 33190_u32
UInt32Depth = 33191_u32
Float32Depth = 36012_u32
UIntStencil = 6401_u32
UInt1Stencil = 36166_u32
UInt4Stencil = 36167_u32
UInt8Stencil = 36168_u32
UInt16Stencil = 36169_u32
DepthStencil = 34041_u32
UInt24DepthUInt8Stencil = 35056_u32
Float32DepthUInt8Stencil8 = 36013_u32
R = 6403_u32
R8 = 33321_u32
R16 = 33322_u32
RG = 33319_u32
RG8 = 33323_u32
RG16 = 33324_u32
RGB = 6407_u32
RGB4 = 32847_u32
RGB5 = 32848_u32
RGB8 = 32849_u32
RGB10 = 32850_u32
RGB12 = 32851_u32
RGB16 = 32852_u32
RGBA = 6408_u32
RGBA2 = 32853_u32
RGBA4 = 32854_u32
RGBA8 = 32856_u32
RGBA12 = 32858_u32
RGBA16 = 32859_u32
StencilIndex = 6401_u32
Stencil = 6401_u32
Depth = 6402_u32
DepthComponent = 6402_u32

Constructors

Instance Method Summary

Constructor Detail

def self.new(value : Symbol) #

Creates an image format from a symbol.


[View source]
def self.new(*, components = 4, depth = 8, type : ImageFormatType = :u_int_norm) #

Creates a standard image format from its parts.

The components should be 1, 2, 3, or 4. These correspond to the color components - red, green, blue, and alpha. A value of 1 means only red is used. 2 - red and green; 3 - red, green, and blue; and 4 - all. The symbols :r, :rg, :rgb, and :rgba can be used instead.

The depth indicates the number of bits per component. This can be a variety of things, so check the OpenGL documentation. See: https://www.khronos.org/opengl/wiki/Image_Format#Color_formats nil can be used for depth to let OpenGL pick. This is only allowed when type is ImageFormatType::UIntNorm.

The type specifies how the data is stored and processed. See ImageFormatType for details.

ArgumentError is raised if an unsupported configuration is provided.


[View source]

Instance Method Detail

def depth? #

[View source]
def depth_component? #

[View source]
def depth_stencil? #

[View source]
def float16_r? #

[View source]
def float16_rg? #

[View source]
def float16_rgb? #

[View source]
def float16_rgba? #

[View source]
def float32_depth? #

[View source]
def float32_depth_u_int8_stencil8? #

[View source]
def float32_r? #

[View source]
def float32_rg? #

[View source]
def float32_rgb? #

[View source]
def float32_rgba? #

[View source]
def int16_norm_r? #

[View source]
def int16_norm_rg? #

[View source]
def int16_norm_rgb? #

[View source]
def int16_norm_rgba? #

[View source]
def int16_r? #

[View source]
def int16_rg? #

[View source]
def int16_rgb? #

[View source]
def int16_rgba? #

[View source]
def int32_r? #

[View source]
def int32_rg? #

[View source]
def int32_rgb? #

[View source]
def int32_rgba? #

[View source]
def int8_norm_r? #

[View source]
def int8_norm_rg? #

[View source]
def int8_norm_rgb? #

[View source]
def int8_norm_rgba? #

[View source]
def int8_r? #

[View source]
def int8_rg? #

[View source]
def int8_rgb? #

[View source]
def int8_rgba? #

[View source]
def r16? #

[View source]
def r8? #

[View source]
def r? #

[View source]
def rg16? #

[View source]
def rg8? #

[View source]
def rg? #

[View source]
def rgb10? #

[View source]
def rgb12? #

[View source]
def rgb16? #

[View source]
def rgb4? #

[View source]
def rgb5? #

[View source]
def rgb8? #

[View source]
def rgb? #

[View source]
def rgba12? #

[View source]
def rgba16? #

[View source]
def rgba2? #

[View source]
def rgba4? #

[View source]
def rgba8? #

[View source]
def rgba? #

[View source]
def stencil? #

[View source]
def stencil_index? #

[View source]
def to_unsafe #

Converts to an OpenGL enum.


[View source]
def u_int10_norm_rgb? #

[View source]
def u_int12_norm_rgb? #

[View source]
def u_int12_norm_rgba? #

[View source]
def u_int16_depth? #

[View source]
def u_int16_norm_r? #

[View source]
def u_int16_norm_rg? #

[View source]
def u_int16_norm_rgb? #

[View source]
def u_int16_norm_rgba? #

[View source]
def u_int16_r? #

[View source]
def u_int16_rg? #

[View source]
def u_int16_rgb? #

[View source]
def u_int16_rgba? #

[View source]
def u_int16_stencil? #

[View source]
def u_int1_stencil? #

[View source]
def u_int24_depth? #

[View source]
def u_int24_depth_u_int8_stencil? #

[View source]
def u_int2_norm_rgba? #

[View source]
def u_int32_depth? #

[View source]
def u_int32_r? #

[View source]
def u_int32_rg? #

[View source]
def u_int32_rgb? #

[View source]
def u_int32_rgba? #

[View source]
def u_int4_norm_rgb? #

[View source]
def u_int4_norm_rgba? #

[View source]
def u_int4_stencil? #

[View source]
def u_int5_norm_rgb? #

[View source]
def u_int8_norm_r? #

[View source]
def u_int8_norm_rg? #

[View source]
def u_int8_norm_rgb? #

[View source]
def u_int8_norm_rgba? #

[View source]
def u_int8_r? #

[View source]
def u_int8_rg? #

[View source]
def u_int8_rgb? #

[View source]
def u_int8_rgba? #

[View source]
def u_int8_stencil? #

[View source]
def u_int_depth? #

[View source]
def u_int_norm_r? #

[View source]
def u_int_norm_rg? #

[View source]
def u_int_norm_rgb? #

[View source]
def u_int_norm_rgba? #

[View source]
def u_int_stencil? #

[View source]