Пример #1
0
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()));
	}
}
Пример #2
0
void myPreSyncFun()
{
	if( gEngine->isMaster() )
	{
		curr_time.setVal( sgct::Engine::getTime() );
	}
}
Пример #3
0
void myPreSyncFun()
{
	if( gEngine->isMaster() && !mPause)
	{
		curr_time.setVal( curr_time.getVal() + gEngine->getAvgDt());
	}
}
Пример #4
0
void myPreSyncFun()
{
	//set the time only on the master
	if( gEngine->isMaster() )
	{
		//get the time in seconds
		curr_time.setVal(sgct::Engine::getTime());
	}
}
Пример #5
0
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;
		}
	}
}
Пример #6
0
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
}