From Nguyen Van Truong, introduced the use of the ScratchPad when distributing the master killed message

This commit is contained in:
Robert Osfield
2010-06-17 14:36:11 +00:00
parent 776c03b9e3
commit 3ecccc4a50

View File

@@ -638,9 +638,12 @@ int main( int argc, char **argv )
{
// need to broadcast my death.
cp->setPacket(osg::Matrix::identity(),viewer.getFrameStamp());
cp->setMasterKilled(true);
cp->setMasterKilled(true);
bc.setBuffer(cp, sizeof( CameraPacket ));
scratchPad.reset();
scratchPad.write(*cp);
bc.setBuffer(scratchPad._startPtr, scratchPad._numBytes);
bc.sync();
std::cout << "Broadcasting death."<<std::endl;