示例#1
0
文件: main.cpp 项目: 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()));
	}
}
示例#2
0
void myPreSyncFun()
{
	if( gEngine->isMaster() )
	{
		curr_time.setVal( sgct::Engine::getTime() );
	}
}
示例#3
0
文件: main.cpp 项目: Risca/sgct
void myPreSyncFun()
{
	if( gEngine->isMaster() && !mPause)
	{
		curr_time.setVal( curr_time.getVal() + gEngine->getAvgDt());
	}
}
示例#4
0
文件: main.cpp 项目: 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());
	}
}
示例#5
0
文件: main.cpp 项目: 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;
		}
	}
}
示例#6
0
文件: main.cpp 项目: 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
}