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.crEnum 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
-
.new(value : Symbol)
Creates an image format from a symbol.
-
.new(*, components = 4, depth = 8, type : ImageFormatType = :u_int_norm)
Creates a standard image format from its parts.
Instance Method Summary
- #depth?
- #depth_component?
- #depth_stencil?
- #float16_r?
- #float16_rg?
- #float16_rgb?
- #float16_rgba?
- #float32_depth?
- #float32_depth_u_int8_stencil8?
- #float32_r?
- #float32_rg?
- #float32_rgb?
- #float32_rgba?
- #int16_norm_r?
- #int16_norm_rg?
- #int16_norm_rgb?
- #int16_norm_rgba?
- #int16_r?
- #int16_rg?
- #int16_rgb?
- #int16_rgba?
- #int32_r?
- #int32_rg?
- #int32_rgb?
- #int32_rgba?
- #int8_norm_r?
- #int8_norm_rg?
- #int8_norm_rgb?
- #int8_norm_rgba?
- #int8_r?
- #int8_rg?
- #int8_rgb?
- #int8_rgba?
- #r16?
- #r8?
- #r?
- #rg16?
- #rg8?
- #rg?
- #rgb10?
- #rgb12?
- #rgb16?
- #rgb4?
- #rgb5?
- #rgb8?
- #rgb?
- #rgba12?
- #rgba16?
- #rgba2?
- #rgba4?
- #rgba8?
- #rgba?
- #stencil?
- #stencil_index?
-
#to_unsafe
Converts to an OpenGL enum.
- #u_int10_norm_rgb?
- #u_int12_norm_rgb?
- #u_int12_norm_rgba?
- #u_int16_depth?
- #u_int16_norm_r?
- #u_int16_norm_rg?
- #u_int16_norm_rgb?
- #u_int16_norm_rgba?
- #u_int16_r?
- #u_int16_rg?
- #u_int16_rgb?
- #u_int16_rgba?
- #u_int16_stencil?
- #u_int1_stencil?
- #u_int24_depth?
- #u_int24_depth_u_int8_stencil?
- #u_int2_norm_rgba?
- #u_int32_depth?
- #u_int32_r?
- #u_int32_rg?
- #u_int32_rgb?
- #u_int32_rgba?
- #u_int4_norm_rgb?
- #u_int4_norm_rgba?
- #u_int4_stencil?
- #u_int5_norm_rgb?
- #u_int8_norm_r?
- #u_int8_norm_rg?
- #u_int8_norm_rgb?
- #u_int8_norm_rgba?
- #u_int8_r?
- #u_int8_rg?
- #u_int8_rgb?
- #u_int8_rgba?
- #u_int8_stencil?
- #u_int_depth?
- #u_int_norm_r?
- #u_int_norm_rg?
- #u_int_norm_rgb?
- #u_int_norm_rgba?
- #u_int_stencil?
Constructor Detail
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.