AtlasTexture.from_bitmap


Description:

public AtlasTexture.from_bitmap (Bitmap bmp)

Creates a new AtlasTexture texture based on data residing in a bitmap.

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 preferably let Cogl automatically allocate storage lazily when it may know more about how the texture is being used and can optimize how it is allocated.

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>

Returns:

A new AtlasTexture object.