Constructor
CoglAtlasTexturenew_with_size
Declaration [src]
CoglTexture*
cogl_atlas_texture_new_with_size (
CoglContext* ctx,
int width,
int height
)
Description [src]
Creates a CoglAtlasTexture
with a given width
and height
. A
CoglAtlasTexture
represents a sub-region within one of Cogl’s
shared texture atlases.
The storage for the texture is not allocated before this function
returns. You can call cogl_texture_allocate()
to explicitly
allocate the underlying storage or let Cogl automatically allocate
storage lazily.
The texture is still configurable until it has been allocated so
for example you can influence the internal format of the texture
using cogl_texture_set_components()
and cogl_texture_set_premultiplied().
Allocate call can fail if Cogl considers the internal format to be incompatible with the format of its internal atlases.
The returned CoglAtlasTexture
is a high-level meta-texture
with some limitations.
Parameters
ctx
-
Type:
CoglContext
A
CoglContext
.The data is owned by the caller of the function. width
-
Type:
int
The width of your atlased texture.
height
-
Type:
int
The height of your atlased texture.
Return value
Type: CoglTexture
A new CoglAtlasTexture
object.
The caller of the function takes ownership of the data, and is responsible for freeing it. |