Commit Graph

10 Commits

Author SHA1 Message Date
Øyvind Kolås
2994de63ef * tests/test-shader.c: (button_release_cb): added simplified
implementation of a box-blur shader from Gwenole Beauchesne that
should work on GLSL implementing low-end IGPs not implementing
dynamic branching. The original code used crashed some of these
due to bugs in drivers or similar. Resolves bug #710.
2008-02-07 16:52:12 +00:00
Øyvind Kolås
545e323ec1 * tests/test-fbo.c: (make_shader):
* tests/test-shader.c: (main): multiply the resulting gl_FragColor
with gl_Color before being done to take opacity into account in the
GLSL fragments.
2008-02-04 13:05:16 +00:00
Øyvind Kolås
1fe08217b7 * clutter/clutter-actor.[ch]: added clutter_actor_get_shader and
renamed clutter_actor_apply_shader to be clutter_actor_set_shader.
Reindented/aligned header.
* clutter/clutter-texture.c: (clutter_texture_paint): temporarily
disable the shader on top of the clutter context's shader stack while
rendering into the FBO.
* tests/test-fbo.c: (main): s/apply_shader/set_shader/
* tests/test-shader.c: (button_release_cb), (main):
s/apply_shader/set_shader/
2008-02-04 11:45:12 +00:00
Øyvind Kolås
e58d0d7f34 * tests/test-shader.c: fix incompatible types in shader programs
Apparently floats can't be multiplied or divided with ints without
explicit type casts. Use 2.0 or float(var) where appropriate. Patch
from Tommi Komulainen (#715).
2008-01-21 11:27:53 +00:00
Emmanuele Bassi
ee4bcf6465 2007-12-21 Emmanuele Bassi <ebassi@openedhand.com>
* Makefile.am: Move tests build before docs, to cut down the
	distcheck failure discovery

	* clutter.symbols: Add clutter_texture_set_area_from_rgb_data()

	* clutter/clutter-actor.c:
	* clutter/clutter-script.c:
	* clutter/clutter-texture.c:
	* clutter/json/json-generator.c:
	* clutter/json/json-parser.c: Compilation fixes for passing distcheck

	* tests/test-grab.c:
	* tests/test-score.c:
	* tests/test-script.c:
	* tests/test-shader.c:
	* tests/test-unproject.c: Ditto as above
2007-12-21 15:25:00 +00:00
Emmanuele Bassi
6193beb8be 2007-12-14 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour.c:
	(clutter_knot_get_type): Use the I_() macro.

	* clutter/clutter-model.[ch]: Make ClutterModel and ClutterModelIter
	abstract classes; also, provide more virtual functions inside the
	ClutterModel vtable, to allow subclasses and language bindings to
	override the entire ClutterModel using other/native data types
	to store the rows.
	
	* clutter/clutter-model-default.[ch]: ClutterModelDefault is a
	default implementation of ClutterModel and ClutterModelIter using
	GSequence.

	* clutter/Makefile.am:
	* clutter/clutter.h: Build glue for ClutterModelDefault.

	* tests/test-model.c: Update for constructor changes.

	* tests/test-shader.c: Fix a typo.
2007-12-14 17:25:55 +00:00
Øyvind Kolås
5220f68e17 Refined the ClutterShader API based on a patch from Emmanuele Bassi.
* clutter/clutter-actor.c: (clutter_actor_paint),
(clutter_actor_apply_shader): queue a redraw of actor when shader is
set.
* clutter/clutter-actor.h: indentation.
* clutter/clutter-shader.[ch]: made the fragment and vertex shader
sources properties. Report error through GError when binding shaders.
* tests/test-shader.c: modified to use newer API.
2007-12-11 14:49:41 +00:00
Emmanuele Bassi
6e25c4ef96 Rever accidental commit 2007-12-06 10:58:42 +00:00
Emmanuele Bassi
b1eca511d6 Update the svn:ignore property 2007-12-06 10:57:29 +00:00
Øyvind Kolås
e92b864dff Support for shaders in clutter. At the moment limited to drivers
providing GLSL support.
* clutter/cogl/cogl.h: added rather direct binding of needed for glsl
shaders.
* clutter/cogl/gl/cogl-defines.h.in:
* clutter/cogl/gl/cogl.c:
* clutter/cogl/gles/cogl-defines.h: added stubs.
* clutter/cogl/gles/cogl.c: added stubs.
* clutter/glx/clutter-stage-glx.c:
(clutter_stage_glx_realize): unrelated memory management sanity fix.
(clutter_stage_glx_unrealize): unbind all shaders on stage unrealize.
* clutter/Makefile.am: added clutter-shader.[ch]
* clutter/clutter-actor.[ch]: adding shader capability to 
actors.
* clutter/clutter-feature.h: added CLUTTER_FEATURE_SHADERS_GLSL
* clutter/clutter-private.h: added stack of shaders to context.
* clutter/clutter-shader.[ch]: new.
* tests/Makefile.am: added shader test.
* tests/test-shader.c: (frame_cb), (main): simple shader test,
cycle through the inline shader with right/left mouse buttons.
2007-12-03 16:29:18 +00:00