Cogl.Texture.prototype.allocate

function allocate(): Cogl.Bool {
    // Gjs wrapper for cogl_texture_allocate()
}
  

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.

<note>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.</note>

Returns

true if the texture was successfully allocated, otherwise false and @error will be updated if it wasn't null.