Commit Graph

4 Commits

Author SHA1 Message Date
Neil Roberts
10d7cf3273 Bug 1172 - Disjoint paths and clip to path
* clutter/cogl/cogl-path.h:
	* clutter/cogl/common/cogl-primitives.c:
	* clutter/cogl/common/cogl-primitives.h:
	* clutter/cogl/gl/cogl-primitives.c:
	* clutter/cogl/gles/cogl-primitives.c: Changed the semantics of
	cogl_path_move_to. Previously this always started a new path but
	now it instead starts a new disjoint sub path. The path isn't
	cleared until you call either cogl_path_stroke, cogl_path_fill or
	cogl_path_new. There are also cogl_path_stroke_preserve and
	cogl_path_fill_preserve functions.

	* clutter/cogl/gl/cogl-context.c:
	* clutter/cogl/gl/cogl-context.h:
	* clutter/cogl/gles/cogl-context.c:
	* clutter/cogl/gles/cogl-context.h: Convert the path nodes array
	to a GArray.

	* clutter/cogl/gl/cogl-texture.c:
	* clutter/cogl/gles/cogl-texture.c: Call cogl_clip_ensure

	* clutter/cogl/common/cogl-clip-stack.c:
	* clutter/cogl/common/cogl-clip-stack.h: Simplified the clip
	stack code quite a bit to make it more maintainable.  Previously
	whenever you added a new clip it would go through a separate route
	to immediately intersect with the current clip and when you
	removed it again it would immediately rebuild the entire clip. Now
	when you add or remove a clip it doesn't do anything immediately
	but just sets a dirty flag instead.

	* clutter/cogl/gl/cogl.c:
	* clutter/cogl/gles/cogl.c: Taken away the code to intersect
	stencil clips when there is exactly one stencil bit. It won't work
	with path clips and I don't know of any platform that doesn't have
	eight or zero stencil bits. It needs at least three bits to
	intersect a path with an existing clip. cogl_features_init now
	just decides you don't have a stencil buffer at all if you have
	less than three bits.

	* clutter/cogl/cogl.h.in: New functions and documentation.

	* tests/interactive/test-clip.c: Replaced with a different test
	that lets you add and remove clips. The three different mouse
	buttons add clips in different shapes. This makes it easier to
	test multiple levels of clipping.

	* tests/interactive/test-cogl-primitives.c: Use
	cogl_path_stroke_preserve when using the same path again.

	* doc/reference/cogl/cogl-sections.txt: Document the new
	functions.
2008-12-04 13:45:09 +00:00
Emmanuele Bassi
536347be69 2008-11-12 Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/cogl/cogl-color.h:
	* clutter/cogl/cogl-path.h:
	* clutter/cogl/cogl-types.h:
	* clutter/cogl/common/cogl-color.c: Deprecated cogl_color()
	in favour of cogl_set_source_color() and friends; store the
	CoglColor components as unsigned bytes instead of fixed point
	normalized values; add functions for allocating, copying and
	freeing CoglColor, for use of language bindings.

	* clutter/cogl/cogl.h.in:
	* clutter/cogl/cogl-deprecated.h: Added cogl-deprecated.h,
	an header file containing the deprecation symbols similar
	to clutter-deprecated.h.

	* clutter/cogl/gl/Makefile.am:
	* clutter/cogl/gl/cogl-texture.c:
	* clutter/cogl/gl/cogl.c:
	* clutter/cogl/gles/Makefile.am:
	* clutter/cogl/gles/cogl-texture.c:
	* clutter/cogl/gles/cogl.c: Update the GL and GLES implementations
	of COGL after the CoglColor changes.

	* clutter/clutter-actor.c:
	* clutter/clutter-clone-texture.c:
	* clutter/clutter-entry.c:
	* clutter/clutter-label.c:
	* clutter/clutter-rectangle.c:
	* clutter/clutter-texture.c: Do not use CoglColor whenever it
	is possible, and use cogl_set_source_color4ub() instead.

	* clutter/pango/cogl-pango-render.c: Ditto as above.

	* doc/reference/clutter/subclassing-ClutterActor.xml:
	* doc/reference/cogl/cogl-sections.txt: Update the documentation.

	* tests/interactive/test-cogl-offscreen.c:
	* tests/interactive/test-cogl-primitives.c:
	* tests/interactive/test-cogl-tex-convert.c:
	* tests/interactive/test-cogl-tex-foreign.c:
	* tests/interactive/test-cogl-tex-getset.c:
	* tests/interactive/test-cogl-tex-polygon.c:
	* tests/interactive/test-cogl-tex-tile.c:
	* tests/interactive/test-paint-wrapper.c: Drop the usage of
	CoglColor whenever it is possible.
2008-11-12 13:57:58 +00:00
Emmanuele Bassi
d3d257b913 2008-10-30 Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/cogl/cogl-color.h:
	* clutter/cogl/cogl-fixed.h:
	* clutter/cogl/cogl-offscreen.h:
	* clutter/cogl/cogl-path.h:
	* clutter/cogl/cogl-shader.h:
	* clutter/cogl/cogl-texture.h:
	* clutter/cogl/cogl-types.h: Add copyright and licensing
	notice to the newly added files.
2008-10-30 17:57:41 +00:00
Emmanuele Bassi
1bcdf7d9eb 2008-10-30 Emmanuele Bassi <ebassi@linux.intel.com>
Bug 1219 - Clean up cogl.h

	* clutter/cogl/cogl.h.in:
	* clutter/cogl/cogl-offscreen.h:
	* clutter/cogl/cogl-path.h:
	* clutter/cogl/cogl-shader.h:
	* clutter/cogl/cogl-texture.h:
	* clutter/cogl/cogl-types.h: Split up the massive cogl.h file
	into sub-header for each section of the API.

	* clutter/cogl/gl/*:
	* clutter/cogl/gles/*: Update the GL and GLES implementations
	of COGL to cope with the new header structure.

	* doc/reference/cogl/Makefile.am: Fix symbol retrieval.
2008-10-30 17:25:00 +00:00