Top | ![]() |
![]() |
![]() |
![]() |
gboolean | cogl_is_texture () |
unsigned int | cogl_texture_get_width () |
unsigned int | cogl_texture_get_height () |
CoglPixelFormat | cogl_texture_get_format () |
gboolean | cogl_texture_is_sliced () |
int | cogl_texture_get_data () |
gboolean | cogl_texture_set_region () |
Cogl allows creating and manipulating textures using a uniform API that tries to hide all the various complexities of creating, loading and manipulating textures.
gboolean
cogl_is_texture (void *object
);
Gets whether the given object references a texture object.
unsigned int
cogl_texture_get_width (CoglTexture *texture
);
Queries the width of a cogl texture.
unsigned int
cogl_texture_get_height (CoglTexture *texture
);
Queries the height of a cogl texture.
CoglPixelFormat
cogl_texture_get_format (CoglTexture *texture
);
Queries the CoglPixelFormat of a cogl texture.
gboolean
cogl_texture_is_sliced (CoglTexture *texture
);
Queries if a texture is sliced (stored as multiple GPU side tecture objects).
int cogl_texture_get_data (CoglTexture *texture
,CoglPixelFormat format
,unsigned int rowstride
,guint8 *data
);
Copies the pixel data from a cogl texture to system memory.
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 textureformat |
the CoglPixelFormat to store the texture as. |
|
rowstride |
the rowstride of |
|
data |
memory location to write the |
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 guint8 *data
);
Sets the pixels in a rectangular subregion of texture
from an in-memory
buffer containing pixel data.
data
src_x |
upper left coordinate to use from source data. |
|
src_y |
upper left coordinate to use from source data. |
|
dst_x |
upper left destination horizontal coordinate. |
|
dst_y |
upper left destination vertical coordinate. |
|
dst_width |
width of destination region to write. (Must be less
than or equal to |
|
dst_height |
height of destination region to write. (Must be less
than or equal to |
|
width |
width of source data buffer. |
|
height |
height of source data buffer. |
|
format |
the CoglPixelFormat used in the source buffer. |
|
rowstride |
rowstride of source buffer (computed from width if none specified) |
|
data |
the actual pixel data. |
Constants representing the underlying hardware texture type of a CoglTexture.
Since 1.10
Stability Level: Unstable