Commit Graph

2278 Commits

Author SHA1 Message Date
Robert Bragg
5b61106684 [doc] Hooks up cogl-material reference documentation
Adds some more gtk-doc comments to cogl-material.h, and adds a new section to
cogl-sections.txt
2008-12-22 16:35:52 +00:00
Robert Bragg
1a8a9c4bc8 Updates previous GLES multi-texturing code to use CoglMaterial
test-cogl-material now runs on GLES 1 using the PVR GLES1 SDK (though since
only 2 texture units are supported the third rotating light map doesn't show)

Note: It currently doesn't build for GLES 2.0
2008-12-22 16:35:52 +00:00
Robert Bragg
61b8cc1874 Adds a CoglMaterial abstraction, which includes support for multi-texturing
My previous work to provide muti-texturing support has been extended into
a CoglMaterial abstraction that adds control over the texture combine
functions (controlling how multiple texture layers are blended together),
the gl blend function (used for blending the final primitive with the
framebuffer), the alpha function (used to discard fragments based on
their alpha channel), describing attributes such as a diffuse, ambient and
specular color (for use with the standard OpenGL lighting model), and
per layer rotations. (utilizing the new CoglMatrix utility API)

For now the only way this abstraction is exposed is via a new
cogl_material_rectangle function, that is similar to cogl_texture_rectangle
but doesn't take a texture handle (the source material is pulled from
the context), and the array of texture coordinates is extended to be able
to supply coordinates for each layer.

Note: this function doesn't support sliced textures; supporting sliced
textures is a non trivial problem, considering the ability to rotate layers.
Note: cogl_material_rectangle, has quite a few workarounds, for a number of
other limitations within Cogl a.t.m.
Note: The GLES1/2 multi-texturing support has yet to be updated to use
the material abstraction.
2008-12-22 16:35:52 +00:00
Robert Bragg
cdf19f3281 [doc] Hooks up cogl-matrix reference documentation
Adds a few more gtk-doc notes to cogl-matrix.h, and adds a new section to
cogl-sections.txt
2008-12-22 16:35:52 +00:00
Robert Bragg
af6c78e9b4 Adds CoglMatrix utility code 2008-12-22 16:35:52 +00:00
Robert Bragg
509928cc76 [multi-texturing] This adds a new cogl_multi_texture API for GL,GLES1 + GLES2
Multitexturing allows blending multiple layers of texture data when texturing
some geometry. A common use is for pre-baked light maps which can give nice
lighting effects relativly cheaply. Another is for dot-3 bump mapping, and
another is applying alpha channel masks.

The dot-3 bump mapping would be really nice one day, but currently cogl doesn't
support lighting so that's not dealt with in this patch.

notable limitations:
- It can only texture rectangles a.t.m - and like cogl_texture_rectangle there
is no support for rotated texturing.
- Sliced textures are not supported. I think I've figured out how to handle
layers with different slice sizes at least for rectangular geometry, but I'm
not sure how complex it becomes once rotations are possible and texturing
arbitrary cogl_polygons.
- Except for this new API, cogl still doesn't know about more than one texture
unit, and so has no way of caching any enables related to other units. So that
things don't break it's currently necessary to disable anything to do with
additional units as soon as we are done with them which isn't ideal.
- No clutter API yet.
2008-12-22 16:35:51 +00:00
Emmanuele Bassi
b4438143e5 Merge branch 'cairo-texture'
* cairo-texture:
  [cairo-texture] Remove the construct only restriction on surface size
  [cairo-texture] Silently discard 0x0 surfaces
  Re-indent ClutterPath header
  Add a test case for the new cairo path functions
  Add clutter_path_to_cairo_path and clutter_path_add_cairo_path
  Warn instead of returning in the IN_PAINT check
  Small documentation fixes
  Print a warning when creating a cairo_t while painting
  Do not set the IN_PAINT flag inside the Stage paint
  Set the IN_PAINT private flag
  [docs] Add ClutterCairoTexture to the API reference
  Add ClutterCairoTexture
  Require Cairo as a Clutter dependency

Conflicts:

  Fix merge conflict in clutter/clutter-path.h
2008-12-19 16:44:40 +00:00
Neil Roberts
c3e4c6df08 Merge commit 'git-svn' into multiple-texture-rectangle 2008-12-10 12:25:25 +00:00
Neil Roberts
4aea0d6e48 * clutter/cogl/gl/cogl.c:
* clutter/cogl/gl/cogl-defines.h.in:
	* clutter/cogl/gl/cogl-context.h:
	* clutter/cogl/common/cogl-mesh.c: Rename the glBufferDataSub
	function to glBufferSubData. When calling glXGetProcAddress with
	the former Mesa returns a stub dispatch function which will
	segfault if you try to use it. With NVIDIA it returns NULL so
	_cogl_features_init decides the card doesn't have VBO support.
2008-12-10 12:13:20 +00:00
Neil Roberts
b11b74fcde Use a single index array
There's no point in clearing the index array because it is always the
same sequence of indices regardless of the vertices. Instead it is
just added to when there are more vertices than ever before.
2008-12-09 18:03:29 +00:00
Neil Roberts
8caf39eb00 Merge commit 'git-svn' into multiple-texture-rectangle 2008-12-09 15:10:56 +00:00
Neil Roberts
223c1225ea Support cogl_texture_multiple_rectangles in GL ES backend 2008-12-09 15:10:33 +00:00
Neil Roberts
59aef7488f Minor fix to indentation in gl/cogl-texture.c 2008-12-09 15:01:10 +00:00
Neil Roberts
3f492e6054 Add gtk-doc for cogl_texture_multiple_rectangles 2008-12-09 13:20:32 +00:00
Neil Roberts
778a9f7d67 Use glDrawRangeElements to share vertices
When drawing a quad from cogl_texture_multiple_rectangles share two of
the vertices in each triangle by using indices.
2008-12-09 13:02:28 +00:00
Neil Roberts
3b5eb3afeb Merge commit 'git-svn' into multiple-texture-rectangle
Conflicts:

	clutter/cogl/gl/cogl-texture.c
2008-12-04 18:20:57 +00:00
Neil Roberts
7a276affd6 Use the correct length in _cogl_texture_flush_vertices
The check for whether there are any rectangles to flush was using the
wrong value so it would always flush.

Thanks to Johan Bilien for spotting.
2008-12-04 17:50:03 +00:00
Neil Roberts
58f6aaa589 Bug 1297 - Bring back support for GL_ARB_texture_rectangle
* clutter/cogl/gl/cogl-texture.c (cogl_texture_new_from_foreign,
	(_cogl_texture_quad_hw, cogl_texture_polygon),
	(_cogl_texture_quad_sw): Support GL_ARB_texture_rectangle textures

	* clutter/glx/clutter-glx-texture-pixmap.c: Use rectangle textures
	when NPOTs are not available or it is forced by the
	CLUTTER_PIXMAP_TEXTURE_RECTANGLE environment variable.

	* clutter/cogl/gl/cogl.c (cogl_enable): Allow enabling
	GL_TEXTURE_RECTANGLE_ARB.
2008-12-04 17:24:33 +00:00
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
Neil Roberts
be655b05ad Bug 1305 - NPOT textures unaligned to a pixel sometimes have
border artifacts

	* clutter/cogl/gl/cogl-texture.c: Set the wrap mode of a texture
	on demand

	Instead of setting the wrap mode once per texture at creation, it
	is now changed whenever the texture is drawn. The previous value
	is cached so that it isn't changed if the value is the same.

	This is used in _cogl_texture_quad_hw to only enable GL_REPEAT
	mode when the coordinates are not in the range [0,1]. Otherwise it
	can pull in pixels from the other edge when the texture is
	rendered off-pixel.
2008-12-01 16:27:54 +00:00
Neil Roberts
420b1f0791 Use GL_TRIANGLES for the texture vertex array
Most cards don't actually support GL_QUADS and they are deprecated in
GL 3.0 so there is a chance it will perform faster with GL_TRIANGLES
even though it has to submit two extra vertices.
2008-11-28 14:20:07 +00:00
Neil Roberts
c502c5c3f4 Add cogl_texture_multiple_rectangles
This takes an array of sets of 8 floats to describe the rectangles. It
tries to send the geometry with a single glDrawArrays as far as
possible. cogl_texture_rectangle is now just a wrapper around
cogl_texture_multiple_rectangles.
2008-11-28 13:09:04 +00:00
Neil Roberts
47a21cd94f Make cogl_texture_rectangle use the vertex array
cogl_texture_quad_hw and _sw now just add vertices to the vertex
array. The last texture used is stored and if a different texture is
encountered then flushes the vertices. cogl_texture_rectangle always
flushes the vertices after calling either of the functions.
2008-11-28 12:33:19 +00:00
Neil Roberts
5557de30eb Use a GArray for the texture vertices in cogl_texture_polygon
Previously it was a dynamic array that was manually reallocated.
2008-11-27 16:44:39 +00:00
Neil Roberts
f4465ccb05 * clutter/cogl/gl/cogl-texture.c (cogl_texture_rectangle): Fixed
the test for whether to use hardware tiling. Previously it assumed
	that texture coordinates are in increasing order but this is not
	the case since bug 1057 was fixed. The texture coordinates are now
	sorted later. It also allowed negative coordinates which doesn't
	make sense if the texture has waste.
2008-11-26 16:35:25 +00:00
Neil Roberts
50b6ecc56d * clutter/cogl/gl/cogl-texture.c (cogl_texture_polygon): Fix the
equation for calculating texture coordinates when using sliced
	textures. This became broken in revision 3520.
2008-11-24 12:27:48 +00:00
Neil Roberts
d741f67cfc Bug 1271 - mingw compiling failed: undefined reference to
`_glDrawRangeElements@24'

	Resolve glDrawRangeElements with cogl_get_proc_address instead of
	calling it directly because functions defined in GL > 1.1 are not
	directly exported under Windows.

	* clutter/cogl/common/cogl-mesh.c: Use the function pointer from
	the context

	* clutter/cogl/gl/cogl-context.c (cogl_create_context): Initialise
	function pointer.

	* clutter/cogl/gl/cogl-context.h (CoglContext): Add a function
	pointer

	* clutter/cogl/gl/cogl-defines.h.in: Add a typedef for the
	function pointer.

	* clutter/cogl/gl/cogl.c (_cogl_features_init): Resolve
	glDrawRangeElements
2008-11-21 16:18:58 +00:00
Robert Bragg
454d4a69a2 * clutter/cogl/common/cogl-mesh.c:
Re-works validate_custom_attribute_name() so it doesn't access an
	un-initialised variable.
2008-11-18 16:24:31 +00:00
Robert Bragg
8b557c6c13 A comparison of gl/cogl-texture.c and gles/cogl-texture.c, to reduce
differences and improve maintainability.

	* clutter/cogl/gl/cogl-context.h:
	Adds a CoglTextureGLVertex typedef + texture_vertices and
	texture_vertices_size members to CoglContext for using vertex arrays
	like GLES does

	* clutter/cogl/gl/cogl-context.c:
	Initializes texture_vertices + texture_vertices_size members

	* clutter/cogl/gl/cogl-internal.h:
	Adds COGL_ENABLE_COLOR_ARRAY

	* clutter/cogl/gl/cogl.c:
	Add COGL_ENABLE_COLOR_ARRAY support to cogl_enable

	* clutter/cogl/gles/cogl-context.h:
	Change the CoglTextureGLVertex to use GLfloat for the position
	and texture coord attributes and GLubyte for the color.

	* clutter/cogl/gles/cogl-texture-private.h:
	Adds a wrap_mode member like GL has.

	* clutter/cogl/gl/cogl-texture.c
	* clutter/cogl/gles/cogl-texture.c:
	Improves the comparability of the files, such that the remaining
	differences, better reflect the fundamental differences needed
	between GL and GLES. Notably GL no longer uses glBegin/glEnd for
	submitting vertices, it uses vertex arrays like GLES and this gives
	a small but measurable fps improvement for test-text.
2008-11-18 16:24:09 +00:00
Robert Bragg
6731dfa468 * clutter/cogl/gl/cogl-internal.h
* clutter/cogl/gles/cogl-internal.h:
	Removes semicolon after the GE() macro since that breaks using it as a
	single statement.
2008-11-18 16:23:40 +00:00
Emmanuele Bassi
e733889655 2008-11-18 Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/cogl/cogl-shader.h: Add a function for setting an
	integer uniform, similar to cogl_program_uniform_1f().

	* clutter/cogl/gl/cogl-program.c: Implement the GL version
	of cogl_program_uniform_1i().

	* clutter/cogl/gles/cogl-program.c: Implement the GLES version
	of cogl_program_uniform_1i().
2008-11-18 15:21:02 +00:00
Emmanuele Bassi
2142062ba1 2008-11-18 Emmanuele Bassi <ebassi@linux.intel.com>
Bug 1049 - Clutter doesn't support most GLSL uniforms (patch
	by Chris Lord and Neil Roberts)

	* README: Update release notes.

	* clutter/Makefile.am:
	* clutter/clutter-shader-types.[ch]: Add GValue types for
	shader values.

	* clutter/clutter-actor.[ch]: Update the shader API to use
	the newly added GValue support for GLSL shader uniform
	setters.

	* clutter/clutter-shader.[ch]: Add float and integer convenience
	API for single value GLSL uniform setters.

	* clutter/cogl/cogl-shader.h: Add new uniform setters.

	* clutter/cogl/gl/cogl-context.c:
	* clutter/cogl/gl/cogl-context.h:
	* clutter/cogl/gl/cogl-defines.h.in:
	* clutter/cogl/gl/cogl-program.c:
	* clutter/cogl/gl/cogl.c: Update the GL implementation of COGL
	to handle the GLSL uniform setters.

	* clutter/cogl/gles/cogl-gles2-wrapper.c:
	* clutter/cogl/gles/cogl-gles2-wrapper.h:
	* clutter/cogl/gles/cogl-internal.h:
	* clutter/cogl/gles/cogl-program.c: Update the GLES 2.0 implementation
	of COGL to handle the GLSL uniform setters.

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

	* tests/interactive/test-fbo.c:
	* tests/interactive/test-shader.c: Update the shader tests.
2008-11-18 15:08:40 +00:00
Neil Roberts
fe7aa83f86 * clutter/cogl/gles/cogl-gles2-wrapper.h:
* clutter/cogl/gles/cogl-gles2-wrapper.c:
	Initialise the 'tex' sampler uniform to 0. The GLSL spec
	specifically says that you must initialize sampler uniforms. This
	fixes texturing for GLES 2 when using the PowerVR simulator via
	software Mesa.
2008-11-13 14:44:27 +00:00
Robert Bragg
8ae02decb4 Gets the mesh API working with GLES2
* clutter/cogl/common/cogl-mesh.c:
	Make sure we use the appropriate cogl_wrap_gl* funcs as appropriate

	* clutter/cogl/gles/cogl-gles2-wrapper.c
	* clutter/cogl/gles/cogl-gles2-wrapper.h:
	In our glColorPointer wrapper we needed to mark our color attribute
	as normalized.

	* tests/conform/Makefile.am:
	When creating unit test symlinks we use the -l gtester option to
	list tests, but when using the PVR SDK the test binary also spews
	out some extra info that caused lots of random symlinks to be
	created. We now grep for lines starting with a '/'

	* tests/conform/test-mesh-contiguous.c
	* tests/conform/test-mesh-mutability.c:
	Use cogl_set_source_color instead of directly calling glColor4ub
2008-11-13 14:28:16 +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
Neil Roberts
a55b588b30 Bug 1057 - cogl_texture_rectangle doesn't support backward
coordinates

	* clutter/cogl/gl/cogl-texture.c: Instead of sorting the vertex
	and texture coordinates passed to cogl_texture_rectangle, just
	swap both sets whenever the texture coordinates are backward.
2008-11-12 13:03:09 +00:00
Neil Roberts
ba1cab0a62 * clutter/cogl/gles/Makefile.am (libclutterinclude_HEADERS):
* clutter/cogl/gl/Makefile.am (libclutterinclude_HEADERS):
	* clutter/cogl/common/Makefile.am
	(libclutter_cogl_common_la_SOURCES): Move cogl-mesh.h into the
	headers for libclutter so that it will get installed.
2008-11-12 12:08:44 +00:00
Neil Roberts
46e4bd3a82 Fix warnings in mesh tests
* tests/conform/test-mesh-mutability.c (on_paint):
	* tests/conform/test-mesh-interleved.c (on_paint):
	* tests/conform/test-mesh-contiguous.c (on_paint): Use g_usleep
	instead of sleep

	* tests/conform/test-mesh-mutability.c (queue_redraw):
	* tests/conform/test-mesh-interleved.c (queue_redraw):
	* tests/conform/test-mesh-contiguous.c (queue_redraw): Added
	missing return statement

	* clutter/cogl/cogl-mesh.h: Add a declaration for
	cogl_mesh_submit

	* clutter/cogl/common/cogl-mesh.c (cogl_mesh_submit): Move the
	documentation to cogl-mesh.h to match the rest of the functions
2008-11-12 10:55:06 +00:00
Robert Bragg
1e68a8d59e Bug 1164 - Implements the proposed Mesh API
* clutter/cogl/cogl-mesh.h
	* clutter/cogl/cogl-types.h
	* clutter/cogl/cogl.h.in
	* clutter/cogl/common/Makefile.am
	* clutter/cogl/common/cogl-mesh-private.h
	* clutter/cogl/common/cogl-mesh.c
	* clutter/cogl/gl/cogl-context.c
	* clutter/cogl/gl/cogl-context.h
	* clutter/cogl/gl/cogl-defines.h.in
	* clutter/cogl/gl/cogl.c
	* clutter/cogl/gles/cogl-context.c
	* clutter/cogl/gles/cogl-context.h
	* doc/reference/cogl/cogl-docs.sgml
	* doc/reference/cogl/cogl-sections.txt:
	The Mesh API provides a means for submitting an extensible number of
	per vertex attributes to OpenGL in a way that doesn't require format
	conversions and so that the data can be mapped into the GPU (in vertex
	buffer objects) for - hopefully - fast re-use.

	There are a number of things we can potentially use this API for, but
	right now this just provides a foundation to build on. Please read
	the extensive list of TODO items in cogl-mesh.c for examples.

	Please refer to the cogl-mesh section in the reference manual for
	documentation of the API.

	* tests/conform/Makefile.am
	* tests/conform/test-conform-main.c
	* tests/conform/test-mesh-contiguous.c
	* tests/conform/test-mesh-interleved.c
	* tests/conform/test-mesh-mutability.c:
	Privides basic coverage testing for the mesh API.
2008-11-10 18:53:14 +00:00
Neil Roberts
d0ab4856b5 * clutter/cogl/gles/cogl.c (cogl_perspective):
* clutter/cogl/common/cogl-fixed.c (cogl_fixed_sin)
	(cogl_angle_sin, cogl_angle_tan, cogl_fixed_sqrt): Replaced uses
	of 1 + ~x with just -x which is equivalent and easier to
	understand.
2008-11-06 11:42:11 +00:00
Neil Roberts
a41624276c * clutter/cogl/gl/cogl.c (cogl_perspective): Use the accurate
64-bit multiplication macro instead of COGL_FIXED_FAST_DIV for
	calculating xmax as was done previously. This fixes
	test-perspective and other tests that had a gone a bit skewiff.
2008-11-04 12:43:06 +00:00
Emmanuele Bassi
54cecff923 2008-11-03 Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/cogl/gl/Makefile.am: Whitespace fixes.

	* clutter/cogl/gles/Makefile.am: Put back a missing backslash
	that broke the GLES build.
2008-11-03 23:58:13 +00:00
Emmanuele Bassi
b98ea01939 2008-11-03 Emmanuele Bassi <ebassi@linux.intel.com>
Bug 1231 - Build fails in gles flavour in revision 3442

	* clutter/cogl/gles/cogl-context.h: Fix remaining use of
	ClutterFixed over CoglFixed. (Michael Boccara)
2008-11-03 23:54:38 +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
Emmanuele Bassi
90dbfcd78f 2008-10-30 Emmanuele Bassi <ebassi@linux.intel.com>
Bug 1212 - Allow only a single include file for Clutter

	* clutter/*.h: Only allow including clutter.h in third
	party code.

	* clutter/cogl/cogl-color.h:
	* clutter/cogl/cogl-fixed.h:
	* clutter/cogl/cogl.h.in: Only allow including cogl.h in
	third party code.

	* clutter/cogl/common/Makefile.am:
	* clutter/cogl/gl/Makefile.am:
	* clutter/cogl/gles/Makefile.am:
	* clutter/eglnative/Makefile.am:
	* clutter/eglx/Makefile.am:
	* clutter/fruity/Makefile.am:
	* clutter/glx/Makefile.am:
	* clutter/glx/clutter-glx.h:
	* clutter/osx/Makefile.am:
	* clutter/pango/Makefile.am:
	* clutter/sdl/Makefile.am:
	* clutter/win32/Makefile.am:
	* clutter/x11/Makefile.am: Fix build environment.

	* clutter/x11/clutter-x11-texture-pixmap.h:
	* clutter/x11/clutter-x11.h: Fix inclusion rules.

	* tests/test-pixmap.c: Fix inclusion of GdkPixbuf header.

	* README: Update release notes.
2008-10-30 17:04:34 +00:00
Emmanuele Bassi
f26827c7d1 2008-10-30 Emmanuele Bassi <ebassi@linux.intel.com>
Bug 1211 - Drop ClutterFeatureFlags usage from COGL

	* clutter/cogl/cogl.h.in:
	* clutter/cogl/gl/cogl.c:
	* clutter/cogl/gles/cogl.c: Do not use ClutterFeatureFlags
	when CoglFeatureFlags will do. This removes the last usage
	of Clutter API inside COGL.
2008-10-30 16:52:56 +00:00
Emmanuele Bassi
d1f6dbaa79 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.
2008-10-30 16:50:07 +00:00
Emmanuele Bassi
71a0be6fff 2008-10-30 Emmanuele Bassi <ebassi@linux.intel.com>
Bug 1209 - Move fixed point API in COGL

	* clutter/cogl/cogl-fixed.h:
	* clutter/cogl/cogl.h.in:
	* clutter/cogl/common/Makefile.am:
	* clutter/cogl/common/cogl-fixed.c: Add fixed point API, modelled
	after the ClutterFixed. The CoglFixed API supercedes the ClutterFixed
	one and avoids the dependency of COGL on Clutter's own API.

	* clutter/cogl/common/cogl-clip-stack.c:
	* clutter/cogl/common/cogl-primitives.c:
	* clutter/cogl/common/cogl-primitives.h: Update internal usage of
	ClutterFixed to CoglFixed.

	* clutter/cogl/gl/Makefile.am:
	* clutter/cogl/gl/cogl-primitives.c:
	* clutter/cogl/gl/cogl-texture.c:
	* clutter/cogl/gl/cogl.c: Ditto, in the GL implementation of the
	COGL API.

	* clutter/cogl/gles/Makefile.am:
	* clutter/cogl/gles/cogl-fbo.c:
	* clutter/cogl/gles/cogl-gles2-wrapper.c:
	* clutter/cogl/gles/cogl-primitives.c:
	* clutter/cogl/gles/cogl-texture.c:
	* clutter/cogl/gles/cogl.c: Ditto, in the GLES implementation of
	the COGL API.

	* clutter/pango/pangoclutter-glyph-cache.c:
	* clutter/pango/pangoclutter-glyph-cache.h: Ditto, in the Pango
	renderer glyphs cache.

	* clutter/clutter-fixed.c:
	* clutter/clutter-fixed.h: ClutterFixed and related API becomes
	a simple transition API for bindings and public Clutter API.

	* clutter/clutter-actor.c:
	* clutter/clutter-alpha.c:
	* clutter/clutter-backend.c:
	* clutter/clutter-behaviour-depth.c:
	* clutter/clutter-behaviour-ellipse.c:
	* clutter/clutter-behaviour-path.c:
	* clutter/clutter-behaviour-rotate.c:
	* clutter/clutter-behaviour-scale.c:
	* clutter/clutter-clone-texture.c:
	* clutter/clutter-color.c:
	* clutter/clutter-entry.c:
	* clutter/clutter-stage.c:
	* clutter/clutter-texture.c:
	* clutter/clutter-timeline.c:
	* clutter/clutter-units.h: Move from the internal usage of
	ClutterFixed to CoglFixed.

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

	* tests/test-cogl-tex-tile.c:
	* tests/test-project.c: Fix tests after the API change

	* README: Add release notes.
2008-10-30 16:37:55 +00:00
Neil Roberts
1b619c3843 Bug 1074 - FBOs on GLES
* clutter/cogl/gles/cogl-fbo.c: Copy the code from gl/cogl-fbo but
	use the API calls directly instead of loading an extension because
	it is part of the core in GLES 2.

	* clutter/cogl/gles/cogl.c (_cogl_features_init): Report
	COGL_FEATURE_OFFSCREEN.

	* clutter/cogl/gles/cogl-fbo.h (CoglFbo): Add gl_stencil_handle.

	* clutter/cogl/gles/cogl-context.h (CoglContext): Add
	viewport_store

	* tests/test-fbo.c (make_shader): Conditionally use the GLES 2
	names of the shader variables
2008-10-29 14:52:48 +00:00