osgcluster demonstates basic clustering of machines across a local area
network using UDP packets to send camera position updates from a master viewer
to slave viewers.
Note, the broadcaster and reciever classes have currently been implement
for Linux/IRIX, hence osgcluster will only work on these systems. It should
also work with little extra work on other Unix based OS's. Support for
WinSocket needs to be added to allow support for Windows. Anybody know
WinSocket enough to tackle this? If so let us know.
-
On the master machine run:
osgcluster -m -f 30 mymodel.osg
On the slave machines run:
for left channel:
osgcluster -s -f 30 -o 30 mymodel.osg
for right channel:
osgcluster -s -f 30 -o 30 mymodel.osg
The options are :
-m set to viewer to master so that it broadcasts its camera postion.
-s set to viewer to slave so that it recivers its camera postion.
-n set the socket number to communicate over, defaults to 8100.
-o set offset the slave camera from the master position by specified
number of degress. positive offset turns camera towards right.
-f set the horizontal field of view of the camera.
Sepetember 2001.
Robert Osfield.
Note: Using sgv with Peformer (for IRIX and Linux users only)
=============================================================
If you find problems with loading .pfb files its likely that its due to undefined
symbols. This isn't a problem with the OSG implementation, but alas the only
current solution is to directly link you app with the Performer libraries. The
Makefile contains two library list. In Makefile you'll see something like :
#note, use this library list when using the Performer osgPlugin.
#LIBS = ${PFLIBS} -losgGLUT -losgDB -losg -lGLU -lGL -lm -lXmu -lX11 -lXi
#note, standard library list.
LIBS = -losgGLUT -losgDB -losg -lGLU -lGL -lm -lXmu -lX11 -lXi
Simple comment in the LIBS line with PFLIBS and comment out the standard LIBS,
then :
make clean
make
Hopefully the Performer distribution will eventually work as a dynamic plugin
but until that day we're stuck with this 'hack'...
Robert Osfield,
March 2001.