Constructor
CoglBitmapnew_with_size
Declaration [src]
CoglBitmap*
cogl_bitmap_new_with_size (
CoglContext* context,
unsigned int width,
unsigned int height,
CoglPixelFormat format
)
Description [src]
Creates a new CoglBitmap
with the given width, height and format.
The initial contents of the bitmap are undefined.
The data for the bitmap will be stored in a newly created
CoglPixelBuffer
. You can get a pointer to the pixel buffer using
cogl_bitmap_get_buffer(). The CoglBuffer
API can then be
used to fill the bitmap with data.
This method is not directly available to language bindings.
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.
Return value
Type: CoglBitmap
A CoglPixelBuffer
representing the
newly created array or NULL
on failure.
The caller of the function takes ownership of the data, and is responsible for freeing it. |