On Jul 23, 2011 8:01 AM, "Roland Peffer" <[email protected]> wrote: > > Hi, > > As I wrote recently I found out that cogl_texture_set_region is a little performance bottleneck for updating a texture from system memory. > After Evgeny Zajcev gave me some hints I found a better way. > > I use cogl_pixel_buffer_new_with_size , cogl_buffer_set_data and cogl_texture_new_from_buffer to create and initialize a new texture. > Then for updating I use cogl_buffer_set_data, _cogl_bitmap_new_from_buffer and _cogl_texture_set_region_from_bitmap. > > The problem is that _cogl_bitmap_new_from_buffer and _cogl_texture_set_region_from_bitmap are not exported from the cogl library. > So I quickly patched the library and added cogl_texture_set_region_from and cogl_bitmap_new_from_buffer to the exported function list. > > So please do me a favour and add these two functions in the master branch to the (experimental) API.
I kind of wonder if we should add cogl_texture_set_region_from_buffer for this purpose. I'm personally not very happy with the CoglBitmap api, and have been trying to figure out of how to replace it with a better design which means ideally I'd like to avoid exporting more CoglBitmap api if possible. I'll take a look at this today and hopefully i'll cook up a patch to see if that would be ok for you. If not then yeah we can make the cogl_bitmap api exported for now. Kind regards, - Robert > > > Thx > Roland > > > > > > > > > > > _______________________________________________ > clutter-app-devel-list mailing list > [email protected] > http://lists.clutter-project.org/listinfo/clutter-app-devel-list
_______________________________________________ clutter-app-devel-list mailing list [email protected] http://lists.clutter-project.org/listinfo/clutter-app-devel-list
