Пример #1
0
App::App(bool showDebugWindow)
	: mKeyboard(nullptr)
	, mRoot(nullptr)
	, mSceneMgr(nullptr)
	, mWindow(nullptr)
	, mSmallWindow(nullptr)
	, mShutdown(false)
	, mScene(nullptr)
	, mRift(nullptr)
	, mTracker(nullptr)
	, mVideoPlayerLeft(nullptr), mVideoPlayerRight(nullptr)
    , mDebugDrawer(nullptr)
    , mDynamicsWorld(nullptr)
{
	std::cout << "Creating Ogre application:" << std::endl;

	showDebugWindow = false; // overrides the command line option

	initARLib(showDebugWindow);
	initOgre(showDebugWindow);
    initBullet(showDebugWindow); // enable debug drawer if we also have a debug window
	initOIS();

    mScene = new Scene(mRift, mTracker, mRoot,
		mWindow, mSmallWindow, mSceneMgr, 
		mDynamicsWorld, mKeyboard,
		mVideoPlayerLeft, mVideoPlayerRight);
	mRoot->startRendering();
}
Пример #2
0
App::App()
{
    std::cout << "Creating Ogre application:" << std::endl;

    mRoot = NULL;
    mKeyboard = NULL;
    mMouse = NULL;
    mScene = NULL;
    mShutdown = false;
    mWindow = NULL;
    mSmallWindow = NULL;
    mRift = NULL;

    initOgre();
    initOIS();

    mScene = new Scene( mRoot, mMouse, mKeyboard, mRift);

    createViewports();

    initRift();

    Ogre::WindowEventUtilities::messagePump();

    mRoot->startRendering();
}
Пример #3
0
App::App()
{
	std::cout << "Creating Ogre application:" << std::endl;

	mRoot = NULL;
	mKeyboard = NULL;
	mMouse = NULL;	
	mScene = NULL;
	mShutdown = false;
	mWindow = NULL;
	mSmallWindow = NULL;
	mRift = NULL;

	//Ogre engine setup (creates Ogre main rendering window)
	initOgre();

	//Rift Setup (creates Oculus rendering window and Oculus inner scene - user shouldn't care about it)
	initRift();

	//Input/Output setup (associate I/O to Oculus window)
	initOIS();

	// Create Ogre main scene (setup and populate main scene)
	// This class implements App logic!!
	mScene = new Scene(mRoot, mMouse, mKeyboard);
	mScene->setIPD(mRift->getIPD());

	//Viewport setup (link scene cameras to Ogre/Oculus windows)
	createViewports();

	//Ogre::WindowEventUtilities::messagePump();

	// START RENDERING!
	mRoot->startRendering();
}
Пример #4
0
	bool CServer::open()
	{
		if( !initOgre() ||
			!initOIS() ||
			!initCEGUI() )
		{
			close();
			return false;
		}
		return true;	

	} // open