Common Types

Common Types

Functions

void (*CoglFuncPtr) ()

Types and Values

Description

Functions

CoglFuncPtr ()

void
(*CoglFuncPtr) (void);

The type used by cogl for function pointers, note that this type is used as a generic catch-all cast for function pointers and the actual arguments and return type may be different.

Types and Values

enum CoglPixelFormat

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

 

COGL_PIXEL_FORMAT_A_8

8 bits alpha mask

 

COGL_PIXEL_FORMAT_RGB_565

RGB, 16 bits

 

COGL_PIXEL_FORMAT_RGBA_4444

RGBA, 16 bits

 

COGL_PIXEL_FORMAT_RGBA_5551

RGBA, 16 bits

 

COGL_PIXEL_FORMAT_YUV

Not currently supported

 

COGL_PIXEL_FORMAT_G_8

Single luminance component

 

COGL_PIXEL_FORMAT_RGB_888

RGB, 24 bits

 

COGL_PIXEL_FORMAT_BGR_888

BGR, 24 bits

 

COGL_PIXEL_FORMAT_RGBA_8888

RGBA, 32 bits

 

COGL_PIXEL_FORMAT_BGRA_8888

BGRA, 32 bits

 

COGL_PIXEL_FORMAT_ARGB_8888

ARGB, 32 bits

 

COGL_PIXEL_FORMAT_ABGR_8888

ABGR, 32 bits

 

COGL_PIXEL_FORMAT_RGBA_1010102

RGBA, 32 bits, 10 bpc

 

COGL_PIXEL_FORMAT_BGRA_1010102

BGRA, 32 bits, 10 bpc

 

COGL_PIXEL_FORMAT_ARGB_2101010

ARGB, 32 bits, 10 bpc

 

COGL_PIXEL_FORMAT_ABGR_2101010

ABGR, 32 bits, 10 bpc

 

COGL_PIXEL_FORMAT_RGBA_8888_PRE

Premultiplied RGBA, 32 bits

 

COGL_PIXEL_FORMAT_BGRA_8888_PRE

Premultiplied BGRA, 32 bits

 

COGL_PIXEL_FORMAT_ARGB_8888_PRE

Premultiplied ARGB, 32 bits

 

COGL_PIXEL_FORMAT_ABGR_8888_PRE

Premultiplied ABGR, 32 bits

 

COGL_PIXEL_FORMAT_RGBA_4444_PRE

Premultiplied RGBA, 16 bits

 

COGL_PIXEL_FORMAT_RGBA_5551_PRE

Premultiplied RGBA, 16 bits

 

COGL_PIXEL_FORMAT_RGBA_1010102_PRE

Premultiplied RGBA, 32 bits, 10 bpc

 

COGL_PIXEL_FORMAT_BGRA_1010102_PRE

Premultiplied BGRA, 32 bits, 10 bpc

 

COGL_PIXEL_FORMAT_ARGB_2101010_PRE

Premultiplied ARGB, 32 bits, 10 bpc

 

COGL_PIXEL_FORMAT_ABGR_2101010_PRE

Premultiplied ABGR, 32 bits, 10 bpc

 

Since 0.8


enum CoglBufferTarget

Target flags for FBOs.

Members

COGL_WINDOW_BUFFER

FIXME

 

COGL_OFFSCREEN_BUFFER

FIXME

 

Since 0.8


enum CoglBufferBit

Types of auxiliary buffers

Members

COGL_BUFFER_BIT_COLOR

Selects the primary color buffer

 

COGL_BUFFER_BIT_DEPTH

Selects the depth buffer

 

COGL_BUFFER_BIT_STENCIL

Selects the stencil buffer

 

Since 1.0


enum CoglAttributeType

Data types for the components of a vertex attribute.

Members

COGL_ATTRIBUTE_TYPE_BYTE

Data is the same size of a byte

 

COGL_ATTRIBUTE_TYPE_UNSIGNED_BYTE

Data is the same size of an unsigned byte

 

COGL_ATTRIBUTE_TYPE_SHORT

Data is the same size of a short integer

 

COGL_ATTRIBUTE_TYPE_UNSIGNED_SHORT

Data is the same size of an unsigned short integer

 

COGL_ATTRIBUTE_TYPE_FLOAT

Data is the same size of a float

 

Since 1.0


enum CoglColorMask

Defines a bit mask of color channels. This can be used with cogl_pipeline_set_color_mask() for example to define which color channels should be written to the current framebuffer when drawing something.

Members

COGL_COLOR_MASK_NONE

None of the color channels are masked

 

COGL_COLOR_MASK_RED

Masks the red color channel

 

COGL_COLOR_MASK_GREEN

Masks the green color channel

 

COGL_COLOR_MASK_BLUE

Masks the blue color channel

 

COGL_COLOR_MASK_ALPHA

Masks the alpha color channel

 

COGL_COLOR_MASK_ALL

All of the color channels are masked