本文整理汇总了C++中sgct::SharedBool::getVal方法的典型用法代码示例。如果您正苦于以下问题:C++ SharedBool::getVal方法的具体用法?C++ SharedBool::getVal怎么用?C++ SharedBool::getVal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sgct::SharedBool
的用法示例。
在下文中一共展示了SharedBool::getVal方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: myPreSyncFun
void myPreSyncFun()
{
if( gEngine->isMaster() )
{
curr_time.setVal( sgct::Engine::getTime() );
//if texture is uploaded then iterate the index
if (serverUploadDone.getVal() && clientsUploadDone.getVal())
{
texIndex++;
serverUploadDone = false;
clientsUploadDone = false;
}
}
}
示例2: myPostSyncPreDrawFun
void myPostSyncPreDrawFun()
{
if (takeScreenshot.getVal())
{
gEngine->takeScreenshot();
takeScreenshot.setVal(false);
}
}
示例3: myDecodeFun
void myDecodeFun()
{
sgct::SharedData::instance()->readDouble(&curr_time);
sgct::SharedData::instance()->readFloat(&sharedSpeed);
speed = sharedSpeed.getVal();
sgct::SharedData::instance()->readBool(&sharedTextureOnOff);
use_texture = sharedTextureOnOff.getVal();
sgct::SharedData::instance()->readObj(&sharedClearColor);
clear_color.x = sharedClearColor.getVal().x;
clear_color.y = sharedClearColor.getVal().y;
clear_color.z = sharedClearColor.getVal().z;
}
示例4: threadWorker
void threadWorker(void *arg)
{
while (running.getVal())
{
//runs only on master
if (transfer.getVal() && !serverUploadDone.getVal() && !clientsUploadDone.getVal())
{
startDataTransfer();
transfer.setVal(false);
//load texture on master
uploadTexture();
serverUploadDone = true;
if(sgct_core::ClusterManager::instance()->getNumberOfNodes() == 1) //no cluster
{
clientsUploadDone = true;
}
}
sgct::Engine::sleep(0.1); //ten iteration per second
}
}
示例5: myPostSyncPreDrawFun
void myPostSyncPreDrawFun()
{
gEngine->setWireframe(wireframe.getVal());
gEngine->setDisplayInfoVisibility(info.getVal());
gEngine->setStatsGraphVisibility(stats.getVal());
if( takeScreenshot.getVal() )
{
gEngine->takeScreenshot();
takeScreenshot.setVal(false);
}
light.getVal() ? mRootNode->getOrCreateStateSet()->setMode( GL_LIGHTING, osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE) :
mRootNode->getOrCreateStateSet()->setMode( GL_LIGHTING, osg::StateAttribute::OFF | osg::StateAttribute::OVERRIDE);
mSceneTrans->setMatrix(osg::Matrix::rotate( glm::radians(curr_time.getVal() * 8.0), 0.0, 1.0, 0.0));
mSceneTrans->postMult(osg::Matrix::translate(0.0, -0.1, dist.getVal()));
//transform to scene transformation from configuration file
mSceneTrans->postMult( osg::Matrix( glm::value_ptr( gEngine->getModelMatrix() ) ));
//update the frame stamp in the viewer to sync all
//time based events in osg
mFrameStamp->setFrameNumber( gEngine->getCurrentFrameNumber() );
mFrameStamp->setReferenceTime( curr_time.getVal() );
mFrameStamp->setSimulationTime( curr_time.getVal() );
mViewer->setFrameStamp( mFrameStamp.get() );
mViewer->advance( curr_time.getVal() ); //update
//traverse if there are any tasks to do
if (!mViewer->done())
{
mViewer->eventTraversal();
//update travelsal needed for pagelod object like terrain data etc.
mViewer->updateTraversal();
}
}
示例6: myPostSyncPreDrawFun
void myPostSyncPreDrawFun()
{
if( reloadShader.getVal() )
{
reloadShader.setVal(false); //reset
sgct::ShaderProgram sp = sgct::ShaderManager::instance()->getShaderProgram( "xform" );
sp.reload();
//reset location variables
sgct::ShaderManager::instance()->bindShaderProgram( "xform" );
time_loc = sgct::ShaderManager::instance()->getShaderProgram( "xform").getUniformLocation( "curr_time" );
matrix_loc = sgct::ShaderManager::instance()->getShaderProgram( "xform").getUniformLocation( "MVP" );
sgct::ShaderManager::instance()->unBindShaderProgram();
}
}
示例7: myPostSyncPreDrawFun
void myPostSyncPreDrawFun()
{
gEngine->setDisplayInfoVisibility(info.getVal());
gEngine->setStatsGraphVisibility(stats.getVal());
}