Constructor

CoglBitmapnew_with_malloc_buffer

Declaration [src]

CoglBitmap*
cogl_bitmap_new_with_malloc_buffer (
  CoglContext* context,
  unsigned int width,
  unsigned int height,
  CoglPixelFormat format,
  GError** error
)

Description [src]

This is equivalent to cogl_bitmap_new_with_size() except that it allocated the buffer using g_malloc() instead of creating a CoglPixelBuffer. The buffer will be automatically destroyed when the bitmap is freed.

Parameters

context

Type: CoglContext

A CoglContext.

The data is owned by the caller of the function.
width

Type: unsigned int

Width of the bitmap in pixels.

height

Type: unsigned int

Height of the bitmap in pixels.

format

Type: CoglPixelFormat

The format of the pixels the array will store.

error

Type: GError **

The return location for a recoverable error.

The argument can be NULL.
If the return location is not NULL, then you must initialize it to a NULL GError*.
The argument will be left initialized to NULL by the constructor if there are no errors.
In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: CoglBitmap

A CoglBitmap.

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