|
Helloteapot - A simple OpenGL Performer application
Please go to Hellocube for an introduction to Performer on Linux and code description of hellocube.cc since teapot.cc is basically the same code, except for the geometry loading part. You might also want to check out Performer Basic Concepts In teapot.cc instaed of creating a pfNode from basic geometric primitives we just load a pre-created geometry from a 3D model file. Here we load the geometry from teapot.dxf - an autocad file.
static pfNode *load_model( ) {
const char meshFile[80] = "teapot.dxf";
pfNode *myObject = pfdLoadFile(meshFile);
return myObject;
}
Download the files teapot.cc teapot.dxf hellocube.cc g++ teapot.cc -lpf -lpfdu -lpfutil -o teapot g++ hellocube.cc -lpf -o hellocube ![]() |
| Monday, 14-Jan-2002 16:17:43 PST | kishan at hackorama dot com |


