This is un-possible with any OpenGL implementation afaik. OpenGl only allows one shader to be bound at a single time, and as far as I know must be unbound before another is activated. The solution typically is, if you need more than one vertex shader, you much make a new one with the combined operations. If you need vertex/texture effects and then want to apply global blurs, etc, use render to texture (or, in QC, render to image).
This is a design limitation of GLSL, not QC. QC could make some kind of thin GLSL wrapper where you code functions that can get nested, but that's kind of icky, and I'm not sure (after 5 seconds of thought) how well it would work. *shrugs*
I've tried nesting a shader inside another in QC 3.0, and sadly, it doesn't appear to work. I can see the output of the inner GLSL patch, but shader code in the containing patch has no effect. It is however possible to use an Iterator inside a GLSL patch, to, for example, create a number of Sphere primitives, which can be processed by the GLSL Vertex and Fragment shaders programs in the containing patch. It's also possible to nest a GLSL patch inside a 3D Transform or Trackball patch, so I know that the GLSL patch is outputting geometry data, rather than just a pre-rendered image. It seems a shame that you can't access this from a second shader...
The inner GLSL thing is expected behaviour: the GLSL patch just replaces the existing GLSL program with the one it's programmed with, and replaces it when it's done. The 3D Transform patch modifies OpenGL's modelview (I think?) matrix, so any geometry is correctly transformed: It's perfectly normal for GLSL to honour this (the whole "gl_Position = ftransform();" stuff makes that take effect. No magic.)
The "output" from GLSL's vertex shader is fed directly to the video card, so the inability to chain vertex shaders out of the box is also a limitation of GLSL, and thus QC by proxy. Again, a thin wrapper in a future version could work around this, possibly (no additional thought, so still 5 seconds :)
I know it's possible to cascade GLSL shaders in this way in other programs- for example, it's possible to create multi-shader effects using RenderMonkey (though admittedly this is under Windows).
If the infrastructure to plug in multiple programs is there(or perhaps multipass rendering), it's not difficult. QC doesn't have a facility to do this though.
-- [ christopher wright ] [EMAIL PROTECTED] http://kineme.net/ _______________________________________________ Do not post admin requests to the list. They will be ignored. Quartzcomposer-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]

