Method

CoglTextureset_components

Declaration [src]

void
cogl_texture_set_components (
  CoglTexture* texture,
  CoglTextureComponents components
)

Description [src]

Affects the internal storage format for this texture by specifying what components will be required for sampling later.

This api affects how data is uploaded to the GPU since unused components can potentially be discarded from source data.

For textures created by the ‘_with_size’ constructors the default is COGL_TEXTURE_COMPONENTS_RGBA. The other constructors which take a %CoglBitmap or a data pointer default to the same components as the pixel format of the data.

Note that the COGL_TEXTURE_COMPONENTS_RG format is not available on all drivers. The availability can be determined by checking for the COGL_FEATURE_ID_TEXTURE_RG feature. If this format is used on a driver where it is not available then COGL_TEXTURE_ERROR_FORMAT will be raised when the texture is allocated. Even if the feature is not available then COGL_PIXEL_FORMAT_RG_88 can still be used as an image format as long as COGL_TEXTURE_COMPONENTS_RG isn’t used as the texture’s components.

Parameters

components

Type: CoglTextureComponents

No description available.