[GEM-dev] Re: GEM shader usage
james tittle
tigital at mac.com
Mon Nov 21 21:40:47 CET 2005
...picking up this thread again:
...I've now got [glsl_vertex] & [glsl_fragment] working (ie. loading
and compiling), but am temporarily stuck at how to pass on the
GLhandleARB (which is actually a void*) to [glsl_program]? In
[pix_multitexture] I just used outlets with casts to t_float for the
texture ID's, but I'm not sure how we should just pass a pointer to
an opaque driver object (guess I need to re-consult IO's "how to
write and external")...? Should it be auto-paired with a message,
like [vertex GLhandleARB< ? This then would trigger an auto-
registration of compiled shader objects in a kind of hash table,
which would then be linked if something changed...then if linking
goes ok, it would auto-discover the active Attrib and Uniform
variables, and output a list of them to console (to remind the user/
programmer), but also set up named/numerical messages to accept...
...I figured this method would work better than trying to add some
kind of stuff to GemState, because we'd be true to glsl's flexibility
in linking...
...how's this sound?
james
More information about the GEM-dev
mailing list