Function
CoglTexturenew_from_data
Declaration [src]
CoglTexture*
cogl_texture_new_from_data (
int width,
int height,
CoglTextureFlags flags,
CoglPixelFormat format,
CoglPixelFormat internal_format,
int rowstride,
const uint8_t* data
)
Description [src]
Creates a new CoglTexture
based on data residing in memory.
Available since: | 0.8 |
Deprecated since: | 1.18 |
Use specific constructors such as
|
Parameters
width |
int |
Width of texture in pixels. |
|
height |
int |
Height of texture in pixels. |
|
flags |
CoglTextureFlags |
Optional flags for the texture, or |
|
format |
CoglPixelFormat |
The |
|
internal_format |
CoglPixelFormat |
The |
|
rowstride |
int |
The memory offset in bytes between the starts of
scanlines in |
|
data |
An array of uint8_t |
Pointer the memory region where the source buffer resides. |
|
The data is owned by the caller of the function. |
Return value
Returns: | CoglTexture |
A newly created |
|
The caller of the function takes ownership of the data, and is responsible for freeing it. |