[GEM-dev] Lua an GEM

IOhannes m zmoelnig zmoelnig at iem.at
Wed Jan 16 10:33:11 CET 2008


hi

sorry for not answering any earlier.
i have been away...

Wesley Smith wrote:
> I've only dabbled with GEM about 4 years ago, so please pardon my
> ignorance here.  I found the signal for context destruction here:
> 
>  void gemhead :: outputRenderOnOff(int state)
>   164 {
>   165   // continue sending out the cache message
>   166   t_atom ap[1];
>   167   SETFLOAT(ap, state);
>   168   outlet_anything(this->m_out1, gensym("gem_state"), 1, ap);
>   169 }
>   170
> 
> 
> What exactly happens in a patch when this executes?  Does a "gem_state
> 0" message propagate through the gemhead chain to all objects

yes.

> connected?  What is the normal message that passes through this chain?


it's like this

"gem_state 1" is sent whenever the rendering is turned on and triggers 
the "startRendering"-method of each class.
"gem_state (pointer) (pointer)" triggers the actual rendering in each 
cycle; the actual gemstate (image-data, texcoords,...) is available in 
the structure the pointer points to.
"gem_state 0" is sent whenever the rendering is turned off.

all of the above messages propagate through all gem-objects.
turning rendering on/off is not the same as creating/destroying the 
window (but probably you are fine with that)

i hope this helps.


mfga.sdr
IOhannes




More information about the GEM-dev mailing list