Creates a AtlasTexture from an image file.
A AtlasTexture 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 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 set_components and set_premultiplied.
<note>Allocate call can fail if Cogl considers the internal format to be incompatible with the format of its internal atlases.< /note>
<note>The returned AtlasTexture is a high-level meta-texture with some limitations. See the documentation for MetaTexture for more details.</note>
ctx |
A Context |
filename |
the file to load |
A new AtlasTexture object or null on failure and throws will be updated. |