Method
CoglTextureget_data
Declaration [src]
int
cogl_texture_get_data (
CoglTexture* texture,
CoglPixelFormat format,
unsigned int rowstride,
uint8_t* data
)
Description [src]
Copies the pixel data from a cogl texture to system memory.
Don’t pass the value of cogl_texture_get_rowstride() as the
rowstride argument, the rowstride should be the rowstride you
want for the destination data buffer not the rowstride of the
source texture.
Parameters
format-
Type:
CoglPixelFormatThe
CoglPixelFormatto store the texture as. rowstride-
Type:
unsigned intThe rowstride of
datain bytes or pass 0 to calculate from the bytes-per-pixel offormatmultiplied by thetexturewidth. data-
Type: An array of
uint8_tMemory location to write the
texture‘s contents, orNULLto only query the data size through the return value.The argument can be NULL.The data is owned by the caller of the method.