First a Makefile for making DSO under Linux or SGI. In short. A DSO for Linux is made with:
cc -fPIC -c foo.c ld -shared foo.o -o foo.so or more sincintly: cc -fPIC -shared -o foo.so foo.cUnder SGI:
cc -c foo.c ld -shared -B dynamic -o foo.so foo.oOf course the compiler will need to be told where to find any include files that are being used, such as ri.h. This Makefile assumes that ri.h is located at /usr/local/prman/include, if this isn't the case then the Makefile will need to be changed.
Red Hat Linux users DSOs are now working under version starting with prman3.8c and greater.
prman3.8c was built under RH5.1. If you are still using Red Hat 5.0 you will need the following: libstdc++-2.8.0-8.i386.rpm and libstdc++-devel-2.8.0-8.i386.rpm.
prman3.8d was built under RH5.2 and so you may need the appropriate libraries that version to work, if you are running under an older version. Also, prman188.8.131.52 has worked fine for me under RH6.0. But I have had problems with the shader compiler with prman184.108.40.206 under RH6.0. If anybody has any further information let me know.
prman3.9, I suspect will be built under RH6.0 so if you have an older version you may want to start thinking about upgrading soon.
SGI may need to set the -n32 flag when compiling and linking
AppNote#23 goes into detail describing procedural primitives and gives some example code.
So far I have only two examples here, describing procedural primitives. One example is from the appnote and the second is an example posted by Tom Burge's
As usual, if you have other examples that you would like posted, please send them onto me.
Corrected code from Application Note #23.
Corrected version of Thomas Burge's dsoproc.
More information on Shader Function DSOs, can be found at: Adding C Functions to Shading Language
RenderMan is a registered trademark of Pixar. The RenderMan Repository is maintained by Pixar's RenderMan Products GroupLast modified: Sat Oct 2 19:44:42 PDT 1999