Top | ![]() |
![]() |
![]() |
![]() |
These functions allow high-level textures to be created that represent a sub-region of another texture. For example these can be used to implement custom texture atlasing schemes.
#define cogl_sub_texture_new cogl_sub_texture_new_EXP
Creates a high-level CoglSubTexture representing a sub-region of
any other CoglTexture. The sub-region must strictly lye within the
bounds of the parent_texture
. The returned texture implements the
CoglMetaTexture interface because it's not a low level texture
that hardware can understand natively.
cogl_rectangle()
or other APIs documented to understand the
CoglMetaTexture interface then you need to use the
CoglMetaTexture interface to resolve a CoglSubTexture into a
low-level texture before drawing.context |
A CoglContext pointer |
|
parent_texture |
The full texture containing a sub-region you want to make a CoglSubTexture from. |
|
sub_x |
The top-left x coordinate of the parent region to make a texture from. |
|
sub_y |
The top-left y coordinate of the parent region to make a texture from. |
|
sub_width |
The width of the parent region to make a texture from. |
|
sub_height |
The height of the parent region to make a texture from. |
Since 1.10
Stability Level: Unstable
#define cogl_is_sub_texture cogl_is_sub_texture_EXP
Checks whether object
is a CoglSubTexture.
Since 1.10
Stability Level: Unstable