[GEM-dev] loop-y question

Daniel Heckenberg daniel at bogusfront.org
Mon Jul 28 08:16:49 CEST 2003


Hey jamie et all,

I'm not at a machine with GEM installed at the moment so I haven't checked
the patch you sent... but I think I understand what you're trying to do.

I've done similar things by using [counter] and the bang to trigger mode of
[gemhead].  It's a bit ugly, but things look like this:

[gemhead]
  |
[render_trigger]
  |
[counter 1 30]
  |
[t b f]
 |   | 
 |   +------+
 |          |     
[gemhead]   |
 |          |  
 |          |
[translateXYZ]
 |
[rectangle]

This ensures that the render chain is triggered at the appropriate time
(during the GEM render cycle) and does the necessary looping.  I've left out
the 0 and 1 to enable and disable the lower gemhead from triggering at its
normal time in the render order.

This would be nice if wrapped up in a [gemloop] object as you've been
discussing.  I think that a counter style outlet is probably more useful.

I've also been wondering if it would be good to have another gemhead which
takes in a list of values of length n.  It would then render n times,
passing out a value each time before it triggers the render.  Actually,
you'd probably do it so that you could send sublists of length greater than
one out at a time... and allow the possibility of using a table/array as the
list source.   This would allow nice "asynchronous" multiple iteration
rendering in GEM...

Daniel

On 28/7/03 3:53 PM, "tigital" <tigital at mac.com> wrote:

> On Saturday, July 26, 2003, at 04:50  PM, guenter geiger wrote:
>> If I understand correctly it should not be too hard to implement this
>> "looping" feature based on the new gem scheduler.
>> 
>> Currently a gemlist gets only drawn once.
>> It is possible to write a simple object ("gemloop" or the like) that
>> triggers "n" of these redraws
>> (just like the part_render does) and at the same time has a second
>> outlet
>> that tells you the number of the redraw. This way you could built more
>> complex geos with just one gemlist ..
> 
> ...excellent suggestion:  with chris egg-ing me on, I found that we can
> put a "for loop" between the glPushMatrix and glPopMatrix in
> gemhead::renderGL(), and that this will make several loops of the
> object (if you try rotateXYZ or translateXYZ quick enough)...now the
> question would be how to control this correctly?
> 
> ...Obviously it should have accept a message for the length of the
> loop, but there seems to be a need to output when the loop is done:
> Should it have a bang out on every loop iteration?  Or would it be
> bet?a!Zwith a counter-type output?
> 
> Any thoughts appreciated!
> 
> jamie
> 
> 
> _______________________________________________
> GEM-dev mailing list
> GEM-dev at iem.at
> http://iem.at/cgi-bin/mailman/listinfo/gem-dev
> 
> 





More information about the GEM-dev mailing list