Esempio n. 1
0
File: main.cpp Progetto: Risca/sgct
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()));
	}
}
Esempio n. 2
0
void myPreSyncFun()
{
	if( gEngine->isMaster() )
	{
		curr_time.setVal( sgct::Engine::getTime() );
	}
}
Esempio n. 3
0
File: main.cpp Progetto: Risca/sgct
void myPreSyncFun()
{
	if( gEngine->isMaster() && !mPause)
	{
		curr_time.setVal( curr_time.getVal() + gEngine->getAvgDt());
	}
}
Esempio n. 4
0
File: main.cpp Progetto: Risca/sgct
void myPreSyncFun()
{
	//set the time only on the master
	if( gEngine->isMaster() )
	{
		//get the time in seconds
		curr_time.setVal(sgct::Engine::getTime());
	}
}
Esempio n. 5
0
File: main.cpp Progetto: Risca/sgct
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;
		}
	}
}
Esempio n. 6
0
File: main.cpp Progetto: Risca/sgct
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
}