Cogl.Texture.allocate

### Method

# Cogl Textureallocate

#### Declaration [src]

    gboolean
    cogl_texture_allocate (
      CoglTexture* texture
      GError** error
    )

#### Description [src]

Explicitly allocates the storage for the given `texture` which allows you to be sure that there is enough memory for the texture and if not then the error can be handled gracefully.

Normally applications don’t need to use this api directly since the texture will be implicitly allocated when data is set on the texture, or if the texture is attached to a `CoglOffscreen` framebuffer and rendered too.

#### Return value

Type: `gboolean`

`TRUE` if the texture was successfully allocated, otherwise `FALSE` and `error` will be updated if it wasn’t `NULL`.