enum Gloop::PixelType
Overview
Describes how components of a pixel are stored in memory.
Defined in:
gloop/pixel_type.crEnum Members
-
Int8 =
5120_u32
-
Each component is stored as a signed 8-bit integer.
-
UInt8 =
5121_u32
-
Each component is stored as an unsigned 8-bit integer.
-
Int16 =
5122_u32
-
Each component is stored as a signed 16-bit integer.
-
UInt16 =
5123_u32
-
Each component is stored as an unsigned 16-bit integer.
-
Int32 =
5124_u32
-
Each component is stored as a signed 32-bit integer.
-
UInt32 =
5125_u32
-
Each component is stored as an unsigned 32-bit integer.
-
Float32 =
5126_u32
-
Each component is stored as a 32-bit floating-point number.
-
UInt8R3G3B2 =
32818_u32
-
Three components stored in 8 bits.
3 bits for red, 3 bits for green, and 2 bits for blue.
-
UInt16R4G4B4A4 =
32819_u32
-
Four components stored in 16 bits.
4 bits for each component.
-
UInt16R5G5B5A1 =
32820_u32
-
Four components stored in 16 bits.
4 bits each for red, green, and blue and 1 bit for alpha.
-
UInt32R8G8B8A8 =
32821_u32
-
Four components stored in 32 bits.
8 bits for each component.
-
UInt32R10G10B10A2 =
32822_u32
-
Four components stored in 32 bits.
8 bits each for red, green, and blue and 2 bits for alpha.
Constructors
-
.new(value : Symbol)
Creates a pixel type from a symbol.
Instance Method Summary
- #float32?
- #int16?
- #int32?
- #int8?
-
#to_unsafe
Converts to an OpenGL enum.
- #u_int16?
- #u_int16_r4_g4_b4_a4?
- #u_int16_r5_g5_b5_a1?
- #u_int32?
- #u_int32_r10_g10_b10_a2?
- #u_int32_r8_g8_b8_a8?
- #u_int8?
- #u_int8_r3_g3_b2?
Constructor Detail
Creates a pixel type from a symbol.
This is intended to be used as a workaround for Crystal's limitations and auto-generated names.