I'm resending this with a new Subject: line.  Worried that it was a little too 
cryptic.

I'm trying to understand how the threading works in OSG when 
DrawThreadPerContext with respect to which process is on which frame at which 
time.  It appears to me that the draw frame is skipping values in the frame 
count, as reported from FrameStamp::getFrameNumber().

My test code fills a map<int,bool> (the int is the frame time, and bool is just 
there ;) ) in a cull traversal by using the following code:

//
const osg::FrameStamp* frameStamp = cv->getFrameStamp();

frameMap[frameStamp->getFrameNumber()] = true;


//
And in a PostDrawCallback on a camera I'm printing out the current frame # : 
the frames #'s in the map, and then I clear the current frame number entry:

// Get the current frame number
osg::FrameStamp* frameStamp = renderInfo.getState()->getFrameStamp();

int frameNumber = frameStamp->getFrameNumber();

std::cout << frameNumber << " : ";

std::map<int, bool>::const_iterator framei = frameMap.begin();

for (; framei != frameMap.end(); framei++ )
    std::cout << framei->first << ", ";

std::cout << "\n\n";

frameMap.erase( frameNumber );


The following is the output on the console.  Again, the first number is the 
current frame number in the PostDrawCallback of the camera.  The following 
numbers, on the same line, are the frame numbers placed in the map during the 
cull traversal.


746 : 

747 : 

749 : 748, 749, 

750 : 748, 750, 

751 : 748, 751, 

752 : 748, 752, 

753 : 748, 753, 

754 : 748, 

755 : 748, 755, 

756 : 748, 

757 : 748, 756, 757, 

758 : 748, 756, 758, 

759 : 748, 756, 759, 

759 : 748, 756, 

761 : 748, 756, 760, 761,


My question is, why is the draw skipping frame numbers?

---
Brad Colbert
Renaissance Sciences Corporation

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to