Method

CoglTextureset_region

Declaration [src]

gboolean
cogl_texture_set_region (
  CoglTexture* texture,
  int src_x,
  int src_y,
  int dst_x,
  int dst_y,
  unsigned int dst_width,
  unsigned int dst_height,
  int width,
  int height,
  CoglPixelFormat format,
  unsigned int rowstride,
  const uint8_t* data
)

Description [src]

Sets the pixels in a rectangular subregion of texture from an in-memory buffer containing pixel data.

The region set can’t be larger than the source data.

Parameters

src_x

Type: int

Upper left coordinate to use from source data.

src_y

Type: int

Upper left coordinate to use from source data.

dst_x

Type: int

Upper left destination horizontal coordinate.

dst_y

Type: int

Upper left destination vertical coordinate.

dst_width

Type: unsigned int

Width of destination region to write. (Must be less than or equal to width).

dst_height

Type: unsigned int

Height of destination region to write. (Must be less than or equal to height).

width

Type: int

Width of source data buffer.

height

Type: int

Height of source data buffer.

format

Type: CoglPixelFormat

The CoglPixelFormat used in the source buffer.

rowstride

Type: unsigned int

Rowstride of source buffer (computed from width if none specified).

data

Type: An array of uint8_t

The actual pixel data.

The data is owned by the caller of the method.

Return value

Type: gboolean

TRUE if the subregion upload was successful, and FALSE otherwise.