Cogl.AtlasTexture.new_from_bitmap
Description: Reference for Cogl.AtlasTexture.new_from_bitmap

### Constructor

# Cogl AtlasTexturenew_from_bitmap

#### Declaration [src]

    CoglTexture*
    cogl_atlas_texture_new_from_bitmap (
      CoglBitmap* bmp
    )

#### Description [src]

Creates a new `CoglAtlasTexture` texture based on data residing in a `bmp`. 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 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 `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. See the documentation for `CoglMetaTexture` for more details.

#### Parameters

`bmp`

  Type: `CoglBitmap`

  A `CoglBitmap`.

  The data is owned by the caller of the function.

#### Return value

Type: `CoglTexture`

A new `CoglAtlasTexture` object.

The caller of the function takes ownership of the data, and is responsible for freeing it.