bool Main::Run()
	{
		ResetConfig();
		GetConfig();

#if		_DEBUG
		mRoot = new Ogre::Root("","","ogre.graphics.log");
#else
		mRoot = new Ogre::Root("","","ogre.graphics.log");
#endif

		setupRenderSystem();

		Log::Instance().LogMessage("Main Run");

		mWindow = mRoot->initialise(true, "Blackstar Engine");

		size_t window_hwnd;
		mWindow->getCustomAttribute("WINDOW", &window_hwnd);
		createInputSystem(window_hwnd);

		initScene();

		CreateMainLoopThreads();

		return true;
	}
Beispiel #2
0
 InputSystem::InputSystem(Ogre::Root* p_ogreRoot) :
     m_inputManager(createInputSystem(p_ogreRoot)),
     m_keyboard(dynamic_cast<OIS::Keyboard*>(m_inputManager->
                                             createInputObject(OIS::OISKeyboard, true))),
     m_mouse(dynamic_cast<OIS::Mouse*>(m_inputManager->createInputObject(OIS::OISMouse, true)))
 {
     unsigned int width, height, depth;
     p_ogreRoot->getRenderTarget("main_window")->getMetrics(width, height, depth);
     const OIS::MouseState& ms = m_mouse->getMouseState();
     ms.width = width;
     ms.height = height;
 }
	bool Main::Run(Ogre::RenderWindow *window, size_t OISInputWindow)
	{
		Log::Instance().LogMessage("Main (Embedded) Run");

		mWindow = window;

		createInputSystem(OISInputWindow, true);

		initScene();

		return true;
	};