Commit Graph

11 Commits

Author SHA1 Message Date
Emmanuele Bassi
7d842079ca conform: Add named object property unit for ClutterScript
We should exercise the resolution of the object properties containing a
string pointing to an object previously defined using ClutterScript.
2009-11-30 19:11:00 +00:00
Emmanuele Bassi
c8d5703788 tests: Add unit for Animation definitions
Verify that an Animation can be defined using ClutterScript.

No initial/final state of the animation, yet.
2009-11-13 15:01:17 +00:00
Emmanuele Bassi
f1ed8be066 conform: Add unit for properties holding objects
Exercise the definition of GObjects for properties defined using
GParamSpecObject.
2009-11-06 11:39:30 +00:00
Emmanuele Bassi
185107c6cf conformance: Add unit on the implicit alpha definition
Exercise the implicit alpha and timeline definition to catch
regressions in the ClutterScript parser code.
2009-11-06 11:39:30 +00:00
Emmanuele Bassi
95d78acb4c script: Allow parsing child properties
The ClutterScript parser needs to be extended to parse child properties
and apply them after an actor has been added to a container. In order to
distinguish child properties from regular GObject properties we can use
the "child::" prefix, e.g.:

  {
    "type" : "ClutterRectangle",
    "id" : "child-01",
    "child::has-focus" : true,
    ...
  }

Parsing child properties can be deferred to the ClutterScriptable
interface, just like regular properties.
2009-11-04 16:50:35 +00:00
Emmanuele Bassi
d7cfa15851 conform: Add the beginnings of a ClutterScript test suite
ClutterScript is a very complicated piece of machinery, with a
parser that has custom variations on top of the basic JSON
format; it could also be extended in the future, so if we don't
want to introduce regressions or break existing ClutterScript
definitions, we'd better have a conformance test suite.
2009-11-04 11:50:45 +00:00
Emmanuele Bassi
ecfa0c4f92 [build] Split out the custom silent rules
The silent rules we use for custom targets should be moved into a
separate Makefile.am that gets included from all the others.
2009-09-16 17:47:59 +01:00
Emmanuele Bassi
b766a1cc10 [tests] Update the script test JSON
The test-script.json UI definition still used old types, like
ClutterLabel and ClutterCloneTexture. It should move to the classes
that have replaced them.
2009-08-26 16:50:37 +01:00
Robert Bragg
40b0bb4e95 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
fc7a86fd0d [tests] Adds an interactive unit test for multi-texturing
This simply gives an example of blending a red o-hand logo with an alpha mask
and a changing light map.
2008-12-22 16:35:51 +00:00
Robert Bragg
603f936745 Bug 1162 - Re-works the tests/ to use the glib-2.16 unit testing
framework

	* configure.ac:
	* tests/*:
	The tests have been reorganised into different categories: conformance,
	interactive and micro benchmarks.
	- conformance tests can be run as part of automated tests
	- interactive tests are basically all the existing tests
	- micro benchmarks focus on a single performance metric

	I converted the timeline tests to conformance tests and also added some
	tests from Neil Roberts and Ebassi.

	Note: currently only the conformance tests use the glib test APIs,
	though the micro benchmarks should too.

	The other change is to make the unit tests link into monolithic binaries
	which makes the build time for unit tests considerably faster. To deal
	with the extra complexity this adds to debugging individual tests I
	have added some sugar to the makefiles so all the tests can be run
	directly via a symlink and when an individual test is run this way,
	then a note is printed to the terminal explaining exactly how that test
	may be debugged using GDB.

	There is a convenience make rule: 'make test-report', that will run all
	the conformance tests and hopefully even open the results in your web
	browser. It skips some of the slower timeline tests, but you can run
	those using 'make full-report'
2008-11-07 19:32:28 +00:00