[Cogl] [PATCH 3/4] Add constructors which take a CoglBitmap to all primitive textures

Robert Bragg robert at sixbynine.org
Thu Apr 5 03:04:06 PDT 2012


> diff --git a/cogl/cogl-texture-2d.h b/cogl/cogl-texture-2d.h
> index f191924..3389fb4 100644
> --- a/cogl/cogl-texture-2d.h
> +++ b/cogl/cogl-texture-2d.h
> @@ -152,6 +152,44 @@ cogl_texture_2d_new_from_data (CoglContext *ctx,
>                                const guint8 *data,
>                                GError **error);
>
> +/**
> + * cogl_texture_2d_new_from_bitmap:
> + * @bitmap: A #CoglBitmap
> + * @internal_format: the #CoglPixelFormat that will be used for storing
> + *    the buffer on the GPU. If COGL_PIXEL_FORMAT_ANY is given then a

It looks like this was a copy & paste but I guess anyway it could be
worth noting that I think for gtk-doc we should be writing
%COGL_PIXEL_FORMAT_ANY here.

> + *    premultiplied format similar to the format of the source data will
> + *    be used. The default blending equations of Cogl expect premultiplied
> + *    color data; the main use of passing a non-premultiplied format here
> + *    is if you have non-premultiplied source data and are going to adjust
> + *    the blend mode (see cogl_material_set_blend()) or use the data for

I think we should reference cogl_pipeline_set_blend() here.

Besides those pedantic things I think this patch looks good to me.

Reviewed-by: Robert Bragg <robert at linux.intel.com>

thanks,
- Robert


More information about the Cogl mailing list