2008-10-30 Emmanuele Bassi <ebassi@linux.intel.com>

Bug 1210 - Add CoglColor API

	* clutter/cogl/cogl-color.h:
	* clutter/cogl/cogl.h.in:
	* clutter/cogl/common/Makefile.am:
	* clutter/cogl/common/cogl-color.c:
	* clutter/cogl/gl/Makefile.am:
	* clutter/cogl/gl/cogl.c:
	* clutter/cogl/gles/Makefile.am:
	* clutter/cogl/gles/cogl-texture.c:
	* clutter/cogl/gles/cogl.c: Add a new color-type, to be used by
	COGL. CoglColor is optimized to allow the minimum amount of
	conversions possible for both GL and GLES implementations.

	* clutter/clutter-actor.c:
	* clutter/clutter-clone-texture.c:
	* clutter/clutter-entry.c:
	* clutter/clutter-main.c:
	* clutter/clutter-rectangle.c:
	* clutter/clutter-stage.c:
	* clutter/clutter-texture.c: Use CoglColor when needed.

	* clutter/pango/pangoclutter-render.c: Use CoglColor when needed.

	* doc/reference/cogl/cogl-docs.sgml:
	* doc/reference/cogl/cogl-sections.txt: Update the documentation.

	* tests/test-cogl-offscreen.c:
	* tests/test-cogl-primitives.c:
	* tests/test-cogl-tex-convert.c:
	* tests/test-cogl-tex-foreign.c:
	* tests/test-cogl-tex-getset.c:
	* tests/test-cogl-tex-polygon.c:
	* tests/test-cogl-tex-tile.c:
	* tests/test-paint-wrapper.c: Update the tests.

	* README: Update release notes.
This commit is contained in:
Emmanuele Bassi
2008-10-30 16:50:07 +00:00
parent 71a0be6fff
commit d1f6dbaa79
11 changed files with 415 additions and 52 deletions

View File

@ -336,10 +336,10 @@ _cogl_texture_upload_to_gl (CoglTexture *tex)
}
static void
_cogl_texture_draw_and_read (CoglTexture *tex,
CoglBitmap *target_bmp,
ClutterColor *back_color,
GLint *viewport)
_cogl_texture_draw_and_read (CoglTexture *tex,
CoglBitmap *target_bmp,
CoglColor *back_color,
GLint *viewport)
{
gint bpp;
CoglFixed rx1, ry1;
@ -460,15 +460,17 @@ _cogl_texture_download_from_gl (CoglTexture *tex,
GLuint target_gl_format,
GLuint target_gl_type)
{
gint bpp;
GLint viewport[4];
ClutterColor cwhite = {0xFF, 0xFF, 0xFF, 0xFF};
CoglBitmap alpha_bmp;
COGLenum old_src_factor;
COGLenum old_dst_factor;
gint bpp;
GLint viewport[4];
CoglColor cwhite;
CoglBitmap alpha_bmp;
COGLenum old_src_factor;
COGLenum old_dst_factor;
_COGL_GET_CONTEXT (ctx, FALSE);
cogl_color_set_from_4ub (&cwhite, 0xff, 0xff, 0xff, 0xff);
bpp = _cogl_get_format_bpp (COGL_PIXEL_FORMAT_RGBA_8888);
/* Viewport needs to have some size and be inside the window for this */