pfCAVE Program Shell

#include <Performer/pf.h>
#include <pfcave.h>

pfScene * create_scene(void);

int main(int argc,char **argv)
{
 pfInit();
 pfCAVEConfig(&argc,argv,NULL);
 pfConfig();
 pfCAVEInitChannels();
/*  In C++, do this instead: */
 pfCAVEMasterChan()->setScene(create_scene());
/*  In C, do this:
 pfChanScene(pfCAVEMasterChan(),create_scene());
*/
 while (!getbutton(ESCKEY))
	{
	pfSync();
	pfCAVEPreFrame();
	pfFrame();
	pfCAVEPostFrame();
	}
 pfCAVEHalt();
 pfExit();
}

pfScene * create_scene(void)
{
 return pfNewScene();
}

Compiling

OpenGL:
CC -I/usr/local/CAVE/include -L/usr/local/CAVE/lib prog.cxx -lpfcave_ogl
	-lpfdu -lpfutil -lpf -lGLU -lGL -lXi -lX11 -lm -lfpe -limage
IrisGL:
CC -I/usr/local/CAVE/include -DIRISGL prog.cxx -L/usr/local/CAVE/lib
	-lpfcave_igl -lpfdu_igl -lpfutil_igl -lpf_igl -lgl -lm -lfpe -lC -limage


Sample program

pfnav.cxx - basic loading objects & navigation

Makefile - makefile for pfnav.cxx


Previous page    Next page

Last modified 21 July 1997.

Dave Pape, pape@evl.uic.edu