Enumeration

CoglPixelFormat

Declaration

enum Cogl.PixelFormat

Description [src]

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_PIXEL_FORMAT_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_PIXEL_FORMAT_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_PIXEL_FORMAT_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.

Members

COGL_PIXEL_FORMAT_ANY

Any format.

  • Value: 0
  • Available since: 14
COGL_PIXEL_FORMAT_A_8

8 bits alpha mask.

  • Value: 17
  • Available since: 14
COGL_PIXEL_FORMAT_RGB_565

RGB, 16 bits.

  • Value: 4
  • Available since: 14
COGL_PIXEL_FORMAT_RGBA_4444

RGBA, 16 bits.

  • Value: 21
  • Available since: 14
COGL_PIXEL_FORMAT_RGBA_5551

RGBA, 16 bits.

  • Value: 22
  • Available since: 14
COGL_PIXEL_FORMAT_YUV

Not currently supported.

  • Value: 7
  • Available since: 14
COGL_PIXEL_FORMAT_R_8

Single luminance component.

  • Value: 8
  • Available since: 14
COGL_PIXEL_FORMAT_RG_88

RG, 16 bits. Note that red-green textures are only available if COGL_FEATURE_ID_TEXTURE_RG is advertised. See cogl_texture_set_components() for details.

  • Value: 9
  • Available since: 14
COGL_PIXEL_FORMAT_RGB_888

RGB, 24 bits.

  • Value: 2
  • Available since: 14
COGL_PIXEL_FORMAT_BGR_888

BGR, 24 bits.

  • Value: 34
  • Available since: 14
COGL_PIXEL_FORMAT_RGBX_8888

RGBX, 32 bits.

  • Value: 3
  • Available since: 14
COGL_PIXEL_FORMAT_RGBA_8888

RGBA, 32 bits.

  • Value: 19
  • Available since: 14
COGL_PIXEL_FORMAT_BGRX_8888

BGRX, 32 bits.

  • Value: 35
  • Available since: 14
COGL_PIXEL_FORMAT_BGRA_8888

BGRA, 32 bits.

  • Value: 51
  • Available since: 14
COGL_PIXEL_FORMAT_XRGB_8888

XRGB, 32 bits.

  • Value: 67
  • Available since: 14
COGL_PIXEL_FORMAT_ARGB_8888

ARGB, 32 bits.

  • Value: 83
  • Available since: 14
COGL_PIXEL_FORMAT_XBGR_8888

XBGR, 32 bits.

  • Value: 99
  • Available since: 14
COGL_PIXEL_FORMAT_ABGR_8888

ABGR, 32 bits.

  • Value: 115
  • Available since: 14
COGL_PIXEL_FORMAT_RGBA_8888_PRE

Premultiplied RGBA, 32 bits.

  • Value: 147
  • Available since: 14
COGL_PIXEL_FORMAT_BGRA_8888_PRE

Premultiplied BGRA, 32 bits.

  • Value: 179
  • Available since: 14
COGL_PIXEL_FORMAT_ARGB_8888_PRE

Premultiplied ARGB, 32 bits.

  • Value: 211
  • Available since: 14
COGL_PIXEL_FORMAT_ABGR_8888_PRE

Premultiplied ABGR, 32 bits.

  • Value: 243
  • Available since: 14
COGL_PIXEL_FORMAT_RGBA_4444_PRE

Premultiplied RGBA, 16 bits.

  • Value: 149
  • Available since: 14
COGL_PIXEL_FORMAT_RGBA_5551_PRE

Premultiplied RGBA, 16 bits.

  • Value: 150
  • Available since: 14
COGL_PIXEL_FORMAT_RGBA_1010102

RGBA, 32 bits, 10 bpc.

  • Value: 29
  • Available since: 14
COGL_PIXEL_FORMAT_BGRA_1010102

BGRA, 32 bits, 10 bpc.

  • Value: 61
  • Available since: 14
COGL_PIXEL_FORMAT_XRGB_2101010

XRGB, 32 bits, 10 bpc.

  • Value: 77
  • Available since: 14
COGL_PIXEL_FORMAT_ARGB_2101010

ARGB, 32 bits, 10 bpc.

  • Value: 93
  • Available since: 14
COGL_PIXEL_FORMAT_XBGR_2101010

XBGR, 32 bits, 10 bpc.

  • Value: 109
  • Available since: 14
COGL_PIXEL_FORMAT_ABGR_2101010

ABGR, 32 bits, 10 bpc.

  • Value: 125
  • Available since: 14
COGL_PIXEL_FORMAT_RGBA_1010102_PRE

Premultiplied RGBA, 32 bits, 10 bpc.

  • Value: 157
  • Available since: 14
COGL_PIXEL_FORMAT_BGRA_1010102_PRE

Premultiplied BGRA, 32 bits, 10 bpc.

  • Value: 189
  • Available since: 14
COGL_PIXEL_FORMAT_ARGB_2101010_PRE

Premultiplied ARGB, 32 bits, 10 bpc.

  • Value: 221
  • Available since: 14
COGL_PIXEL_FORMAT_ABGR_2101010_PRE

Premultiplied ABGR, 32 bits, 10 bpc.

  • Value: 253
  • Available since: 14
COGL_PIXEL_FORMAT_RGBX_FP_16161616

RGBX half floating point, 64 bit.

  • Value: 11
  • Available since: 14
COGL_PIXEL_FORMAT_RGBA_FP_16161616

RGBA half floating point, 64 bit.

  • Value: 27
  • Available since: 14
COGL_PIXEL_FORMAT_BGRX_FP_16161616

BGRX half floating point, 64 bit.

  • Value: 43
  • Available since: 14
COGL_PIXEL_FORMAT_BGRA_FP_16161616

BGRA half floating point, 64 bit.

  • Value: 59
  • Available since: 14
COGL_PIXEL_FORMAT_XRGB_FP_16161616

No description available.

  • Value: 75
  • Available since: 14
COGL_PIXEL_FORMAT_ARGB_FP_16161616

ARGB half floating point, 64 bit.

  • Value: 91
  • Available since: 14
COGL_PIXEL_FORMAT_XBGR_FP_16161616

No description available.

  • Value: 107
  • Available since: 14
COGL_PIXEL_FORMAT_ABGR_FP_16161616

ABGR half floating point, 64 bit.

  • Value: 123
  • Available since: 14
COGL_PIXEL_FORMAT_RGBA_FP_16161616_PRE

Premultiplied RGBA half floating point, 64 bit.

  • Value: 155
  • Available since: 14
COGL_PIXEL_FORMAT_BGRA_FP_16161616_PRE

Premultiplied BGRA half floating point, 64 bit.

  • Value: 187
  • Available since: 14
COGL_PIXEL_FORMAT_ARGB_FP_16161616_PRE

Premultiplied ARGB half floating point, 64 bit.

  • Value: 219
  • Available since: 14
COGL_PIXEL_FORMAT_ABGR_FP_16161616_PRE

Premultiplied ABGR half floating point, 64 bit.

  • Value: 251
  • Available since: 14
COGL_PIXEL_FORMAT_RGBA_FP_32323232

RGBA floating point, 128 bit.

  • Value: 28
  • Available since: 14
COGL_PIXEL_FORMAT_RGBA_FP_32323232_PRE

Premultiplied RGBA floating point, 128 bit.

  • Value: 156
  • Available since: 14
COGL_PIXEL_FORMAT_R_16

Single luminance component, 16 bits.

  • Value: 14
  • Available since: 14
COGL_PIXEL_FORMAT_RG_1616

RG, 32 bits.

  • Value: 15
  • Available since: 14
COGL_PIXEL_FORMAT_RGBA_16161616

RGBA, 64 bits, 16bpc.

  • Value: 26
  • Available since: 14
COGL_PIXEL_FORMAT_RGBA_16161616_PRE

No description available.

  • Value: 154
  • Available since: 14
COGL_PIXEL_FORMAT_DEPTH_16

No description available.

  • Value: 265
  • Available since: 14
COGL_PIXEL_FORMAT_DEPTH_24_STENCIL_8

No description available.

  • Value: 771
  • Available since: 14

Type functions

cogl_pixel_format_get_bytes_per_pixel

Queries the number of bytes per pixel for a given format in the given plane.

cogl_pixel_format_get_n_planes

Returns the number of planes the given CoglPixelFormat specifies.

cogl_pixel_format_to_string

Returns a string representation of format, useful for debugging purposes.