Allan Schaffer (aschaffe)
Thu, 21 Jul 1994 17:30:06 -0700
Performer doesn't handle 3D textures, so yes, you would need to make
direct calls to IRIS GL in one of the DRAW callbacks. For 3D texture
I'd presume you'd want to use a node's DRAW traversal callback.
> If somebody can provide me with a short example code, it will be
> much appreciated.
I don't have a sample handy (even in IRIS GL) that demonstrates 3D
texture, but you could probably use the same idea as for a reflection
mapped texture. Set up PreDrawCallback and PostDrawCallback routines
for a particular node (which will "contain" your 3D texture), and
bind them to the node with pfNodeTravFuncs:
pfNodeTravFuncs (node, PFTRAV_DRAW, PreDrawCallback, PostDrawCallback);
In the pre-draw callback, turn the 3D texture "on" using IRIS GL;
turn it "off" in the post-draw callback. Take a look at the code in
/usr/src/Performer/src/lib/libpfutil/callbacks.c for a sample of
how the same thing is done for reflection-map texture.
As an aside, an upcoming issue of Pipeline (perhaps the July/August
issue) will have a long article on the topic of "Extending Performer"
by the use of callback routines. Keep an eye out..
Allan
-- Allan Schaffer Silicon Graphics aschaffe++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:23 PDT