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 int
 

Upper left coordinate to use from source data.

src_y int
 

Upper left coordinate to use from source data.

dst_x int
 

Upper left destination horizontal coordinate.

dst_y int
 

Upper left destination vertical coordinate.

dst_width unsigned int
 

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

dst_height unsigned int
 

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

width int
 

Width of source data buffer.

height int
 

Height of source data buffer.

format CoglPixelFormat
 

The CoglPixelFormat used in the source buffer.

rowstride unsigned int
 

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

data An array of uint8_t
 

The actual pixel data.

 The data is owned by the caller of the function.

Return value

Returns: gboolean
 

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