[Cogl] Experimental API changes ?

Neil Roberts neil at linux.intel.com
Wed Mar 28 08:27:53 PDT 2012


Hi,

cogl_pixel_buffer_new_with_size has been replaced with
cogl_bitmap_new_with_size. This will create a CoglPixelBuffer with the
given size and then create a CoglBitmap which points into it. You can
then create a texture from that buffer using
cogl_texture_new_from_bitmap.

The idea is that we want to reduce the amount of constructors that each
texture type has to have. Eg, we currently have constructors for meta
textures, 2D textures, 3D textures and sliced textures. If all of those
have to have a constructor for creating from a file, from a memory
pointer and from a pixel buffer then there starts to be quite a lot of
functions to maintain. Instead we want to just have it so you can
construct a CoglBitmap which can represent data either from a file, from
a local buffer or from a pixel buffer and then you just have a single
constructor for each texture type to create the texture from a bitmap.

There's a bit more info in the commit message here:

http://git.gnome.org/browse/cogl/commit/?id=3700cc26a

The #define for cogl_pixel_buffer_new_with_size was just left in the
header as an oversight. Sorry about that.

Regards,
- Neil

On Wed, 28 Mar 2012 16:28:51 +0200, Roland Peffer <gdevel at clixxun.com> wrote:
> 
> I just tried to build my project with the cogl  1.10.0 /clutter 1.10.0.
> 
> 1) cogl_pixel_buffer_new_with_size_EXP  is not available anymore. But its still declared in the header file cogl-pixel-buffer.h
> 2) cogl_texture_new_from_buffer_EXP is completly gone
> 
> 
> If there is no problem with recent changes I would like to get these functions back!
> 
> Regards 
> Roland
> 
> _______________________________________________
> clutter-app-devel-list mailing list
> clutter-app-devel-list at clutter-project.org
> http://lists.clutter-project.org/listinfo/clutter-app-devel-list


More information about the Cogl mailing list