summaryrefslogtreecommitdiff
path: root/cogl/cogl-bitmap.c
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2011-07-25 22:14:08 +0100
committerRobert Bragg <robert@linux.intel.com>2011-07-25 22:45:24 +0100
commita9184d5cb721bb2991c26e2ec3e0e1126eb5121a (patch)
tree43ec985a9b618a6326aecc47eeb5fb73fe306cab /cogl/cogl-bitmap.c
parent7860df92d1d146819769732ac7f6968141c4af50 (diff)
downloadcogl-a9184d5cb721bb2991c26e2ec3e0e1126eb5121a.tar.gz
Export API for uploading a tex subregion from a CoglBuffer
This exposes 2 experimental functions that make it possible to upload a subregion of a texture from a CoglBuffer by first wrapping the buffer as a CoglBitmap and then allowing uploading of a subregion from a CoglBitmap. The new functions are: cogl_bitmap_new_from_buffer() and cogl_texture_set_region_from_bitmap() Actually for now we are exporting this API for practical reasons since we already had this API internally and it enables a specific feature that was requested, but it is worth nothing that it's quite likely we will replace these with functions that don't involve the CoglBitmap API at some point. For reference: The CoglBitmap API was actually removed from the 2.0 experimental API reference manual some time ago because the hope was that we'd come up with a neater replacement. It doesn't seem entirely clear what the scope of the CoglBitmap api is so it has became a bit of a dumping ground. CoglBitmap is used for image loading, as a means to represent the layout of image data and also internally deals with format conversions. Note: Because we are avoiding including CoglBitmap as part of the 2.0 API these functions aren't currently included in the 2.0 reference manual. Reviewed-by: Neil Roberts <neil@linux.intel.com>
Diffstat (limited to 'cogl/cogl-bitmap.c')
-rw-r--r--cogl/cogl-bitmap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/cogl/cogl-bitmap.c b/cogl/cogl-bitmap.c
index 88ad073b..781e6f8d 100644
--- a/cogl/cogl-bitmap.c
+++ b/cogl/cogl-bitmap.c
@@ -327,12 +327,12 @@ cogl_bitmap_new_from_file (const char *filename,
}
CoglBitmap *
-_cogl_bitmap_new_from_buffer (CoglBuffer *buffer,
- CoglPixelFormat format,
- int width,
- int height,
- int rowstride,
- int offset)
+cogl_bitmap_new_from_buffer (CoglBuffer *buffer,
+ CoglPixelFormat format,
+ int width,
+ int height,
+ int rowstride,
+ int offset)
{
CoglBitmap *bmp;