コード例 #1
0
void ArmyDemoApp::setup()
{

	mSender.bind();
#if ! USE_UDP
	mSender.connect();
#endif

	model::Skeleton::sRenderMode = model::Skeleton::RenderMode::CLEANED;

	mLightPos = vec3(10.0f, 20.0f, 20.0f);
	mMouseHorizontalPos = 0;
	mMeshIndex = 0;
	mParams = params::InterfaceGl( "Parameters", ivec2( 200, 250 ) );
	mParams.addParam( "Fps", &mFps, "", true );
	mParams.addSeparator();
	mDrawMesh = true;
	mParams.addParam( "Draw Mesh", &mDrawMesh );
	mDrawSkeleton = false;
	mParams.addParam( "Draw Skeleton", &mDrawSkeleton );
	mDrawAbsolute = true;
	mParams.addParam( "Relative/Abolute skeleton", &mDrawAbsolute );
	mEnableWireframe = false;
	mParams.addParam( "Wireframe", &mEnableWireframe );
	
	gl::enableDepthWrite();
	gl::enableDepthRead();
	gl::enableAlphaBlending();
	
	mSkeletalMesh = model::SkeletalMesh::create( model::AssimpLoader( loadAsset( "maggot3.md5mesh" ) ) );
}
コード例 #2
0
void SimpleMultiThreadedSenderApp::setup()
{
	mSender.bind();
#if ! USE_UDP
	mSender.connect();
#endif
	mThread = std::thread( std::bind(
	[]( std::shared_ptr<asio::io_service> &service ){
		service->run();
	}, mIoService ));
}