Ejemplo n.º 1
0
Scene::Scene(uint32 _systemsMask /* = SCENE_SYSTEM_ALL_MASK */)
	: Entity()
    , mainCamera(0)
    , drawCamera(0)
	, imposterManager(0)
    , systemsMask(_systemsMask)
    , transformSystem(0)
    , renderUpdateSystem(0)
    , lodSystem(0)
    , debugRenderSystem(0)
    , particleEffectSystem(0)
    , updatableSystem(0)
    , lightUpdateSystem(0)
    , switchSystem(0)
    , soundSystem(0)
    , actionSystem(0)
    , skyboxSystem(0)
    , staticOcclusionSystem(0)
	, materialSystem(0)
    , foliageSystem(0)
    , windSystem(0)
    , staticOcclusionDebugDrawSystem(0)
	, sceneGlobalMaterial(0)
    , isDefaultGlobalMaterial(true)
    , clearBuffers(RenderManager::ALL_BUFFERS)
{   
	CreateComponents();
	CreateSystems();

    // this will force scene to create hidden global material
    SetGlobalMaterial(NULL);
    
    SceneCache::Instance()->InsertScene(this);
}
Ejemplo n.º 2
0
Scene::Scene()
	:   Entity()
    ,   currentCamera(0)
    ,   clipCamera(0)
//    ,   forceLodLayer(-1)
	,	imposterManager(0)
	,	entityManager(0)
	,	referenceNodeSuffixChanged(false)
{   

//	entityManager = new EntityManager();

	CreateComponents();
	CreateSystems();
}
Ejemplo n.º 3
0
bool CEngine::Init() 
{
    Message("Engine Init\n");

	Timer()->Start();

    CreateSystems();

    if ( !InitSystems() ) 
    {
        return false;
    }
    
    Message("Engine Init Successful\n");
    return true;
}
Ejemplo n.º 4
0
 //-----------------------------------------
 //-----------------------------------------
 void State::Init()
 {
     m_canAddSystems = true;
     
     //Create the default systems
     m_scene = CreateSystem<Scene>();
     CreateSystem<CSInput::GestureSystem>();
     
     //create user systems.
     CreateSystems();
     
     m_canAddSystems = false;
     
     u32 numSystems = m_systems.size();
     for(u32 i=0; i<numSystems; ++i)
     {
         m_systems[i]->OnInit();
     }
     
     OnInit();
 }
Ejemplo n.º 5
0
        //----------------------------------------------------
        //----------------------------------------------------
		void Application::Init()
		{
            CS_ASSERT(s_application == nullptr, "Application already initialised!");
            s_application = this;
            
			Logging::Create();

            //Create all application systems.
            m_isSystemCreationAllowed = true;
            CreateDefaultSystems();
			CreateSystems();
            m_isSystemCreationAllowed = false;
            
			PostCreateSystems();
            
            //initialise all of the application systems.
            for (const AppSystemUPtr& system : m_systems)
            {
                system->OnInit();
            }
            
            OnInit();
            PushInitialState();
		}