void State::frameCompleted()

20 views
Skip to first unread message

david.h...@gmail.com

unread,
Jan 13, 2021, 11:12:30 AM1/13/21
to OpenSceneGraph Users
From running NVidia Nsight, I traced down periodic stalls to the  glGetInteger64v on frameCompleted(). This was especially true if I had multiple OSG windows running at the same time. This is on Windows. Basically its in the code: 

State.cpp

void State::frameCompleted()
{

if (getTimestampBits())

{

     GLint64 timestamp;

     _glExtensions->glGetInteger64v(GL_TIMESTAMP, &timestamp);

     setGpuTimestamp(osg::Timer::instance()->tick(), timestamp);

     //OSG_NOTICE<<"State::frameCompleted() setting time stamp. timestamp="<<timestamp<<std::endl;

} }

2 questions, if I am not currently collecting stats, are there any known side effects for disabling the stat collection? Second what would be the preferable way of disabling the stat collection. getTimestampBits(), basically checks if the system supports 64 bit time stamp.  I added a static public variable to State to disable the time stamp collection just to make a deadline, this is obviously not an ideal way of doing this. It did however take care of my periodic hangs, and let me make my deadline.  
Reply all
Reply to author
Forward
0 new messages