mutter/clutter/cogl/gles
Owen W. Taylor c3448314d5 Default to a blend function that expects premultiplied colors
Many operations, like mixing two textures together or alpha-blending
onto a destination with alpha, are done most logically if texture data
is in premultiplied form. We also have many sources of premultiplied
texture data, like X pixmaps, FBOs, cairo surfaces. Rather than trying
to work with two different types of texture data, simplify things by
always premultiplying texture data before uploading to GL.

Because the default blend function is changed to accommodate this,
uses of pure-color CoglMaterial need to be adapted to add
premultiplication.

gl/cogl-texture.c gles/cogl-texture.c: Always premultiply
  non-premultiplied texture data before uploading to GL.

cogl-material.c cogl-material.h: Switch the default blend functions
  to ONE, ONE_MINUS_SRC_ALPHA so they work correctly with premultiplied
  data.

cogl.c: Make cogl_set_source_color() premultiply the color.

cogl.h.in color-material.h: Add some documentation about
  premultiplication and its interaction with color values.

cogl-pango-render.c clutter-texture.c tests/interactive/test-cogl-offscreen.c:
  Use premultiplied colors.

http://bugzilla.openedhand.com/show_bug.cgi?id=1406

Signed-off-by: Robert Bragg <robert@linux.intel.com>
2009-06-11 14:17:52 +01:00
..
cogl-context.c Use GL_QUADS for flushing a quad batch 2009-06-01 17:29:01 +01:00
cogl-context.h Use GL_QUADS for flushing a quad batch 2009-06-01 17:29:01 +01:00
cogl-defines.h.in [cogl] Remove the COGL{enum,int,uint} typedefs 2009-05-12 14:53:44 +01:00
cogl-fbo.c [cogl-offscreen] Cleans up the cogl offscreen API and adds documentation 2009-05-02 04:12:26 +01:00
cogl-fbo.h [cogl] Updates all file headers and removes lots of trailing white space 2009-05-02 04:12:25 +01:00
cogl-fixed-fragment-shader.glsl [multi-texturing] This adds a new cogl_multi_texture API for GL,GLES1 + GLES2 2008-12-22 16:35:51 +00:00
cogl-fixed-vertex-shader.glsl [multi-texturing] This adds a new cogl_multi_texture API for GL,GLES1 + GLES2 2008-12-22 16:35:51 +00:00
cogl-gles2-wrapper.c [cogl-material] Support string based blending and layer combine descriptions 2009-05-28 02:43:28 +01:00
cogl-gles2-wrapper.h [cogl-material] Support string based blending and layer combine descriptions 2009-05-28 02:43:28 +01:00
cogl-primitives.c [material] Reduce the material API in preperation for releasing Clutter 1.0 2009-05-28 02:43:34 +01:00
cogl-program.c [cogl] Remove the COGL{enum,int,uint} typedefs 2009-05-12 14:53:44 +01:00
cogl-program.h [cogl] Updates all file headers and removes lots of trailing white space 2009-05-02 04:12:25 +01:00
cogl-shader-private.h [cogl] Updates all file headers and removes lots of trailing white space 2009-05-02 04:12:25 +01:00
cogl-shader.c [gles/cogl-shader] Add a missing semicolon 2009-06-04 22:10:33 +01:00
cogl-texture-private.h Update the GLES backend to have the layer filters in the material 2009-06-04 22:12:33 +01:00
cogl-texture.c Default to a blend function that expects premultiplied colors 2009-06-11 14:17:52 +01:00
cogl-util.c [cogl] Updates all file headers and removes lots of trailing white space 2009-05-02 04:12:25 +01:00
cogl-util.h [cogl] Updates all file headers and removes lots of trailing white space 2009-05-02 04:12:25 +01:00
cogl.c [cogl] Updates all file headers and removes lots of trailing white space 2009-05-02 04:12:25 +01:00
Makefile.am [build] Encode the target into the backend library 2009-05-29 12:50:48 +01:00
stringify.sh [cogl] Updates all file headers and removes lots of trailing white space 2009-05-02 04:12:25 +01:00