void myPreSyncFun() { if( gEngine->isMaster() ) { curr_time.setVal( sgct::Engine::getTime() ); if( arrowButtons[FORWARD] ) dist.setVal( dist.getVal() + (navigation_speed * gEngine->getDt())); if( arrowButtons[BACKWARD] ) dist.setVal( dist.getVal() - (navigation_speed * gEngine->getDt())); } }
void myPreSyncFun() { if( gEngine->isMaster() ) { curr_time.setVal( sgct::Engine::getTime() ); } }
void myPreSyncFun() { if( gEngine->isMaster() && !mPause) { curr_time.setVal( curr_time.getVal() + gEngine->getAvgDt()); } }
void myPreSyncFun() { //set the time only on the master if( gEngine->isMaster() ) { //get the time in seconds curr_time.setVal(sgct::Engine::getTime()); } }
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; } } }
void myPreSyncFun() { //set the time only on the master if( gEngine->isMaster() ) { //get the time in seconds curr_time.setVal(sgct::Engine::getTime()); } float f = static_cast<float>( curr_time.getVal() ) / 2.0f; audio.setSoundPositionAndVelocity( 0, glm::vec3(-2.0f * sinf( f ), 0.0f, 1.0f), glm::vec3(0.0f, 0.0f, 0.0f) ); audio.setSoundPositionAndVelocity( 1, glm::vec3(2.0f * sinf( f ), 0.0f, 1.0f), glm::vec3(0.0f, 0.0f, 0.0f) ); audio.update(); //const float * spectrum = audio.getSoundItemAtIndex(0)->mChannel }