Cogl.PixelFormat
Pixel formats used by Cogl. For the formats with a byte per component, the order of the components specify the order in increasing memory addresses. So for example Cogl.PixelFormat.rgb_888 would have the red component in the lowest address, green in the next address and blue after that regardless of the endianness of the system.
For the formats with non byte aligned components the component order specifies the order within a 16-bit or 32-bit number from most significant bit to least significant. So for Cogl.PixelFormat.rgb_565, the red component would be in bits 11-15, the green component would be in 6-11 and the blue component would be in 1-5. Therefore the order in memory depends on the endianness of the system.
When uploading a texture Cogl.PixelFormat.any can be used as the internal format. Cogl will try to pick the best format to use internally and convert the texture data if necessary.
Since 0.8
- PixelFormat.ANY
Any format
- PixelFormat.A_8
8 bits alpha mask
- PixelFormat.RGB_565
RGB, 16 bits
- PixelFormat.RGBA_4444
RGBA, 16 bits
- PixelFormat.RGBA_5551
RGBA, 16 bits
- PixelFormat.YUV
Not currently supported
- PixelFormat.G_8
Single luminance component
- PixelFormat.RG_88
RG, 16 bits. Note that red-green textures are only available if Cogl.FeatureID.ogl_feature_id_texture_rg is advertised. See Cogl.Texture.prototype.set_components for details.
- PixelFormat.RGB_888
RGB, 24 bits
- PixelFormat.BGR_888
BGR, 24 bits
- PixelFormat.RGBA_8888
RGBA, 32 bits
- PixelFormat.BGRA_8888
BGRA, 32 bits
- PixelFormat.ARGB_8888
ARGB, 32 bits
- PixelFormat.ABGR_8888
ABGR, 32 bits
- PixelFormat.RGBA_1010102
RGBA, 32 bits, 10 bpc
- PixelFormat.BGRA_1010102
BGRA, 32 bits, 10 bpc
- PixelFormat.ARGB_2101010
ARGB, 32 bits, 10 bpc
- PixelFormat.ABGR_2101010
ABGR, 32 bits, 10 bpc
- PixelFormat.RGBA_8888_PRE
Premultiplied RGBA, 32 bits
- PixelFormat.BGRA_8888_PRE
Premultiplied BGRA, 32 bits
- PixelFormat.ARGB_8888_PRE
Premultiplied ARGB, 32 bits
- PixelFormat.ABGR_8888_PRE
Premultiplied ABGR, 32 bits
- PixelFormat.RGBA_4444_PRE
Premultiplied RGBA, 16 bits
- PixelFormat.RGBA_5551_PRE
Premultiplied RGBA, 16 bits
- PixelFormat.RGBA_1010102_PRE
Premultiplied RGBA, 32 bits, 10 bpc
- PixelFormat.BGRA_1010102_PRE
Premultiplied BGRA, 32 bits, 10 bpc
- PixelFormat.ARGB_2101010_PRE
Premultiplied ARGB, 32 bits, 10 bpc
- PixelFormat.ABGR_2101010_PRE
Premultiplied ABGR, 32 bits, 10 bpc
- PixelFormat.DEPTH_16
- PixelFormat.DEPTH_32
- PixelFormat.DEPTH_24_STENCIL_8