private void SetupMogre(string pluginFileName, string configFileName, string logFileName) { // Create the main mogre object this.mogreRoot = new Mogre.Root(pluginFileName); Mogre.LogManager.Singleton.SetLogDetail(Mogre.LoggingLevel.LL_BOREME); SetupMogreResources(); SetupDirectX(); // Initialize without creating window this.mogreRoot.Initialise(false); // don't create a window this.mogitorsRoot = MogitorsRoot.Instance; }
public Core() { m_config = 0; //!config m_stateManager = 0; m_root = null; m_renderWnd = null; m_viewport = null; m_log = null; m_timer = null; m_inputMgr = null; m_keyboard = null; m_mouse = null; m_update = 1.0f / 120; m_elapsed = 0.0f; /* for (int i = 0; i < 256; ++i) m_keyStates[i] = false; */ }
private void SetupMogre(string pluginFileName, string configFileName, string logFileName) { // Create the main mogre object this.mogreRoot = new Mogre.Root(pluginFileName); Mogre.LogManager.Singleton.SetLogDetail(Mogre.LoggingLevel.LL_BOREME); SetupMogreResources(); SetupDirectX(); // Initialize without creating window this.mogreRoot.Initialise(false); // don't create a window this.mogitorsRoot = MogitorsRoot.Instance; }
public Boolean Init(String wndTitle, MOIS.KeyListener keyListener = null, MOIS.MouseListener mouseListener = null) { #if DEBUG m_resourcesCfg = "../../res/resources_d.cfg"; m_pluginsCfg = "../../res/plugins_d.cfg"; #else m_ResourcesCfg = "../../res/resources.cfg"; m_luginsCfg = "../../res/plugins.cfg"; #endif //m_ResourcesCfg = "../../res/resources.cfg"; //m_luginsCfg = "../../res/plugins.cfg"; SetupLog(); GetLog().LogMessage("Initialize SECred Framework..."); m_root = new Mogre.Root( m_pluginsCfg ); if(!m_root.ShowConfigDialog()) { return false; } m_renderWnd = m_root.Initialise(true, wndTitle); GetRoot().AddFrameListener(this); SetupViewport(); GetLog().LogMessage("ViewPort ready."); SetupInputSystem( keyListener, mouseListener ); GetLog().LogMessage("InputSystem ready."); SetupResources(); GetLog().LogMessage("Resources ready."); Mogre.TextureManager.Singleton.DefaultNumMipmaps = 5; Mogre.ResourceGroupManager.Singleton.InitialiseAllResourceGroups(); GetLog().LogMessage("TrayManager ready."); m_timer = new Mogre.Timer(); m_timer.Reset(); GetLog().LogMessage("Timer ready."); //config //m_config = new Config( "../../res/game_config.xml" ); GetLog().LogMessage("ConfigManager ready."); //!config //m_stateManager = new StateManager(); GetLog().LogMessage("StateManager ready."); /* //CEgui initialization mainRenderer = &CEGUI.OgreRenderer.bootstrapSystem(); // set the default resource groups to be used CEGUI.Imageset.setDefaultResourceGroup((CEGUI.utf8*)"Imagesets"); CEGUI.Font.setDefaultResourceGroup((CEGUI.utf8*)"Fonts"); CEGUI.Scheme.setDefaultResourceGroup((CEGUI.utf8*)"Schemes"); CEGUI.WidgetLookManager.setDefaultResourceGroup((CEGUI.utf8*)"LookNFeel"); CEGUI.WindowManager.setDefaultResourceGroup((CEGUI.utf8*)"Layouts"); //setup default group for validation schemas CEGUI.XMLParser* parser = CEGUI.System.getSingleton().getXMLParser(); if (parser->isPropertyPresent((CEGUI.utf8*)"SchemaDefaultResourceGroup")) parser->setProperty((CEGUI.utf8*)"SchemaDefaultResourceGroup", (CEGUI.utf8*)"schemas"); //wybranie stylu CEgui CEGUI.SchemeManager.getSingleton().create((CEGUI.utf8*)"SECred.scheme"); //kursor CEGUI.System.getSingleton().setDefaultMouseCursor((CEGUI.utf8*)"SECred", (CEGUI.utf8*)"MouseArrow"); //Tooltips - jeszcze nie wiem czy bedziemy tego uzywac CEGUI.System.getSingleton().setDefaultTooltip((CEGUI.utf8*)"SECred/Tooltip"); GetLog().LogMessage("CEgui has been initiliazed!"); */ m_renderWnd.IsActive = true; //MissionsCreator missions; GetLog().LogMessage("SECred Framework initialized!"); return true; }