Flags

Details

class Cogl.BufferBit(value)

Bases: GLib.Flags

Types of auxiliary buffers

New in version 1.0.

COLOR = 1

Selects the primary color buffer

DEPTH = 2

Selects the depth buffer

STENCIL = 4

Selects the stencil buffer

class Cogl.BufferTarget(value)

Bases: GLib.Flags

Target flags for FBOs.

New in version 0.8.

WINDOW_BUFFER = 2

FIXME

OFFSCREEN_BUFFER = 4

FIXME

class Cogl.ColorMask(value)

Bases: GLib.Flags

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.

NONE = 0

None of the color channels are masked

RED = 1

Masks the red color channel

ALL = 15

All of the color channels are masked

GREEN = 2

Masks the green color channel

BLUE = 4

Masks the blue color channel

ALPHA = 8

Masks the alpha color channel

class Cogl.FeatureFlags(value)

Bases: GLib.Flags

Flags for the supported features.

New in version 0.8.

STENCIL_BUFFER = 1024

Stencil buffer support

SHADERS_ARBFP = 1048576

ARBFP support

OFFSCREEN_MULTISAMPLE = 128

Multisample support on FBOs

TEXTURE_NPOT_REPEAT = 131072

Repeat modes other than %COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE are supported by the hardware.

TEXTURE_READ_PIXELS = 16

glReadPixels() support

DEPTH_RANGE = 16384

cogl_material_set_depth_range() support

DEPTH_TEXTURE = 16777216

Whether #CoglFramebuffer support rendering the depth buffer to a texture.

TEXTURE_RECTANGLE = 2

ARB_texture_rectangle support

VBOS = 2048

VBO support

MAP_BUFFER_FOR_READ = 2097152

Whether cogl_buffer_map() is supported with CoglBufferAccess including read support.

OFFSCREEN_BLIT = 256

Blit support on FBOs

POINT_SPRITE = 262144

Whether Cogl.Material.set_layer_point_sprite_coords_enabled() is supported.

SHADERS_GLSL = 32

GLSL support

TEXTURE_NPOT_BASIC = 32768

The hardware supports non power of two textures, but you also need to check the Cogl.FeatureFlags.TEXTURE_NPOT_MIPMAP and Cogl.FeatureFlags.TEXTURE_NPOT_REPEAT features to know if the hardware supports npot texture mipmaps or repeat modes other than %COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE respectively.

TEXTURE_NPOT = 4

Non power of two textures are supported by the hardware. This is a equivalent to the Cogl.FeatureFlags.TEXTURE_NPOT_BASIC, Cogl.FeatureFlags.TEXTURE_NPOT_MIPMAP and Cogl.FeatureFlags.TEXTURE_NPOT_REPEAT features combined.

PBOS = 4096

PBO support

MAP_BUFFER_FOR_WRITE = 4194304

Whether cogl_buffer_map() is supported with CoglBufferAccess including write support.

FOUR_CLIP_PLANES = 512

At least 4 clip planes available

TEXTURE_3D = 524288

3D texture support

OFFSCREEN = 64

FBO support

TEXTURE_NPOT_MIPMAP = 65536

Mipmapping is supported in conjuntion with non power of two textures.

TEXTURE_YUV = 8

ycbcr conversion support

UNSIGNED_INT_INDICES = 8192

Set if Cogl.IndicesType.INT is supported in cogl_vertex_buffer_indices_new().

ONSCREEN_MULTIPLE = 8388608
class Cogl.PixelFormat(value)

Bases: GLib.Flags

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.

New in version 0.8.

ANY = 0

Any format

ABGR_8888 = 115

ABGR, 32 bits

ABGR_2101010 = 125

ABGR, 32 bits, 10 bpc

RGBA_8888_PRE = 147

Premultiplied RGBA, 32 bits

RGBA_4444_PRE = 149

Premultiplied RGBA, 16 bits

RGBA_5551_PRE = 150

Premultiplied RGBA, 16 bits

RGBA_1010102_PRE = 157

Premultiplied RGBA, 32 bits, 10 bpc

A_8 = 17

8 bits alpha mask

BGRA_8888_PRE = 179

Premultiplied BGRA, 32 bits

BGRA_1010102_PRE = 189

Premultiplied BGRA, 32 bits, 10 bpc

RGBA_8888 = 19

RGBA, 32 bits

RGB_888 = 2

RGB, 24 bits

RGBA_4444 = 21

RGBA, 16 bits

ARGB_8888_PRE = 211

Premultiplied ARGB, 32 bits

RGBA_5551 = 22

RGBA, 16 bits

ARGB_2101010_PRE = 221

Premultiplied ARGB, 32 bits, 10 bpc

ABGR_8888_PRE = 243

Premultiplied ABGR, 32 bits

ABGR_2101010_PRE = 253

Premultiplied ABGR, 32 bits, 10 bpc

DEPTH_32 = 259
DEPTH_16 = 265
RGBA_1010102 = 29

RGBA, 32 bits, 10 bpc

BGR_888 = 34

BGR, 24 bits

RGB_565 = 4

RGB, 16 bits

BGRA_8888 = 51

BGRA, 32 bits

BGRA_1010102 = 61

BGRA, 32 bits, 10 bpc

YUV = 7

Not currently supported

DEPTH_24_STENCIL_8 = 771
G_8 = 8

Single luminance component

ARGB_8888 = 83

ARGB, 32 bits

RG_88 = 9

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.

ARGB_2101010 = 93

ARGB, 32 bits, 10 bpc

class Cogl.ReadPixelsFlags(value)

Bases: GLib.Flags

Flags for cogl_framebuffer_read_pixels_into_bitmap()

New in version 1.0.

READ_PIXELS_COLOR_BUFFER = 1

Read from the color buffer

class Cogl.TextureFlags(value)

Bases: GLib.Flags

Flags to pass to the cogl_texture_new_* family of functions.

New in version 1.0.

NONE = 0

No flags specified

NO_AUTO_MIPMAP = 1

Disables the automatic generation of the mipmap pyramid from the base level image whenever it is updated. The mipmaps are only generated when the texture is rendered with a mipmap filter so it should be free to leave out this flag when using other filtering modes

NO_SLICING = 2

Disables the slicing of the texture

NO_ATLAS = 4

Disables the insertion of the texture inside the texture atlas used by Cogl