This will be a short tutorial on making custom Pipes.
The Pipe class has two functions that you might be altering. The render function, and the init function. Each function is called when the Pipeline is processed, the init function before rendering. The init function should be used for all setup that doesn’t require rendering, and the render function should be used for its namesake.
In the render function, the Pipe is going to have to traverse the Pipeline SceneGraph. The way I do this is a “traverseNode(Node* n, Vec3f global)” function. The render function calls this with the root node of the function and 0,0,0. The function crawls through the SceneGraph, performing whatever duties it must on the nodes that qualify for treatment. For most Pipes, this would mean that the Node has “hidden” set to false, and has either its primary or secondary shader set to that Pipe’s shader.
I hope this tutorial will someday be useful. Now it’s time to get back to work on the GelFX library, rather than typing these tutorials.