Re: [clutter] Doubts about clutter_shader_bind

From: Øyvind Kolås <pippin_at_gimp.org>
Date: Thu, 3 Apr 2008 13:25:47 +0100

On Wed, Apr 2, 2008 at 9:51 PM, ere wer <garfieldhq_at_yahoo.com> wrote:
> ...But my main point is - do we really need clutter_shader_bind to be
exposed at all. Its very very low level function (much like glBlend or
> -- snip --
> In the end, from end user perspective , actor_set_shader should be enough: Its sets some "property" on my actor, that changes the way it looks. Just like set_size or set_position.

The clutter_shader_bind is the only call that allows the user of the
API to check for compilation/linking etc errros in the shader source
code, thus
it is needed assuming that the shaders used during development might
contain programming errors.

> PS In the test-shader example, is it really necessary to call clutter_actor_set_shader (<actor>, NULL), which destroys the previously set shader, before setting a new one? Looking at the set_shader code, its seams not only unnecessary, but even faster if you call it the second time because it skips the creation of the params hashtable.

The tests in clutter are not neccesarily examples of how to use the
APIs they might as well be samples that test corner cases or different
 ways of using the API.

/Øyvind K.

-- 
«The future is already here. It's just not very evenly distributed»
 -- William Gibson
http://pippin.gimp.org/ http://ffii.org/
-- 
To unsubscribe send a mail to clutter+unsubscribe_at_o-hand.com
Received on Thu Apr 03 2008 - 08:25:47 EDT

This archive was generated by hypermail 2.2.0 : Thu Apr 03 2008 - 09:00:15 EDT