1
0
Fork 0
A repository that has original sources for patches used in the Arch User Repository package called "mutter-performance". https://aur.archlinux.org/packages/mutter-performance
Find a file
Robert Bragg 2503f7b321 Fully integrates CoglMaterial throughout the rest of Cogl
This glues CoglMaterial in as the fundamental way that Cogl describes how to
fill in geometry.

It adds cogl_set_source (), which is used to set the material which will be
used by all subsequent drawing functions

It adds cogl_set_source_texture as a convenience for setting up a default
material with a single texture layer, and cogl_set_source_color is now also
a convenience for setting up a material with a solid fill.

"drawing functions" include, cogl_rectangle, cogl_texture_rectangle,
cogl_texture_multiple_rectangles, cogl_texture_polygon (though the
cogl_texture_* funcs have been renamed; see below for details),
cogl_path_fill/stroke and cogl_vertex_buffer_draw*.

cogl_texture_rectangle, cogl_texture_multiple_rectangles and
cogl_texture_polygon no longer take a texture handle; instead the current
source material is referenced. The functions have also been renamed to:
cogl_rectangle_with_texture_coords, cogl_rectangles_with_texture_coords
and cogl_polygon respectivly.

Most code that previously did:
  cogl_texture_rectangle (tex_handle, x, y,...);
needs to be changed to now do:
  cogl_set_source_texture (tex_handle);
  cogl_rectangle_with_texture_coords (x, y,....);

In the less likely case where you were blending your source texture with a color
like:
  cogl_set_source_color4ub (r,g,b,a); /* where r,g,b,a isn't just white */
  cogl_texture_rectangle (tex_handle, x, y,...);
you will need your own material to do that:
  mat = cogl_material_new ();
  cogl_material_set_color4ub (r,g,b,a);
  cogl_material_set_layer (mat, 0, tex_handle));
  cogl_set_source_material (mat);

Code that uses the texture coordinates, 0, 0, 1, 1 don't need to use
cog_rectangle_with_texure_coords since these are the coordinates that
cogl_rectangle will use.

For cogl_texture_polygon; as well as dropping the texture handle, the
n_vertices and vertices arguments were transposed for consistency. So
code previously written as:
  cogl_texture_polygon (tex_handle, 3, verts, TRUE);
need to be written as:
  cogl_set_source_texture (tex_handle);
  cogl_polygon (verts, 3, TRUE);

All of the unit tests have been updated to now use the material API and
test-cogl-material has been renamed to test-cogl-multitexture since any
textured quad is now technically a test of CoglMaterial but this test
specifically creates a material with multiple texture layers.

Note: The GLES backend has not been updated yet; that will be done in a
following commit.
2009-01-27 14:26:39 +00:00
common Fully integrates CoglMaterial throughout the rest of Cogl 2009-01-27 14:26:39 +00:00
doc/reference/cogl Merge commit 'origin/master' into cogl-material 2009-01-23 15:23:49 +00:00
gl Fully integrates CoglMaterial throughout the rest of Cogl 2009-01-27 14:26:39 +00:00
gles Merge commit 'origin/master' into cogl-material 2009-01-23 15:23:49 +00:00
cogl-color.h [Automatic fixed-to-float.sh change] Applies a number fixed to float patches 2009-01-20 16:20:54 +00:00
cogl-deprecated.h 2008-11-12 Emmanuele Bassi <ebassi@linux.intel.com> 2008-11-12 13:57:58 +00:00
cogl-fixed.h [Automatic fixed-to-float.sh change] Applies a number fixed to float patches 2009-01-20 16:20:54 +00:00
cogl-material.h Fully integrates CoglMaterial throughout the rest of Cogl 2009-01-27 14:26:39 +00:00
cogl-matrix.h [doc] Hooks up cogl-matrix reference documentation 2008-12-22 16:35:52 +00:00
cogl-offscreen.h 2008-10-30 Emmanuele Bassi <ebassi@linux.intel.com> 2008-10-30 17:57:41 +00:00
cogl-path.h Fully integrates CoglMaterial throughout the rest of Cogl 2009-01-27 14:26:39 +00:00
cogl-shader.h 2008-11-18 Emmanuele Bassi <ebassi@linux.intel.com> 2008-11-18 15:21:02 +00:00
cogl-texture.h Fully integrates CoglMaterial throughout the rest of Cogl 2009-01-27 14:26:39 +00:00
cogl-types.h Change the COGL texture constructor to use flags 2009-01-21 10:14:29 +00:00
cogl-vertex-buffer.h [docs] Remove sources of warnings in API references 2009-01-21 16:41:18 +00:00
cogl.h.in Fully integrates CoglMaterial throughout the rest of Cogl 2009-01-27 14:26:39 +00:00
Makefile.am Fixed 'make dist' 2008-04-28 16:57:44 +00:00
TODO Merged clutter-ivan branch into trunk. 2008-04-25 13:37:36 +00:00