public override void Init()
        {
            _entityManager  = EngineSystems.GetSystem <EntityManager>();
            _worldManager   = EngineSystems.GetSystem <WorldManager>();
            _openGlRenderer = EngineSystems.GetSystem <OpenGLRendererCore>();
            _uiManager      = EngineSystems.GetSystem <UIManager>();

            _entityManager.RegisterForUpdates <RenderableComponent>(this);
        }
Exemplo n.º 2
0
        public override void Init()
        {
            _logger        = EngineSystems.GetSystem <Logger>();
            _windowManager = EngineSystems.GetSystem <WindowManager>();
            _windowManager.GetActiveWindow().MakeCurrent();

            _resourceManager = EngineSystems.GetSystem <ResourceManager>();

            GL.Viewport(0, 0, _windowManager.GetActiveWindow().Width, _windowManager.GetActiveWindow().Height);
            GL.Enable(EnableCap.DepthTest);
            GL.Enable(EnableCap.Blend);
            GL.BlendFunc(BlendingFactor.SrcAlpha, BlendingFactor.OneMinusSrcAlpha);
            GL.CullFace(CullFaceMode.Back);

            fontRenderer = new FontRenderer(_windowManager.GetActiveWindow().Width, _windowManager.GetActiveWindow().Height);
            uiRenderer   = new UIRendererCore(_windowManager.GetActiveWindow().Width, _windowManager.GetActiveWindow().Height);
            uiRenderer.LoadUIObjectMeshData();

            CreateDebugVertexBuffer();

            CreateVertexDataBuffers();

            CreateLightUniformBuffer(0);

            testShader = _resourceManager.LoadShader("Shaders/Main.vert", "Shaders/Main.frag");
            testShader.Use();

            debugShader = _resourceManager.LoadShader("Shaders/debug.vert", "Shaders/debug.frag");

            textShader = _resourceManager.LoadShader("Shaders/Text.vert", "Shaders/Text.frag");

            uiShader = _resourceManager.LoadShader("Shaders/ui.vert", "Shaders/ui.frag");

            view       = Matrix4.CreateTranslation(0.0f, 0.0f, 0.0f);
            projection = Matrix4.CreatePerspectiveFieldOfView(MathHelper.DegreesToRadians(75.0f),
                                                              (float)_windowManager.GetActiveWindow().Width / (float)_windowManager.GetActiveWindow().Height, 1.0f, 1000.0f);

            LoadModelData(_resourceManager.LoadModel("Models/2b.obj"));
        }
Exemplo n.º 3
0
 public override void Init()
 {
     _renderManager = EngineSystems.GetSystem <RenderManager>();
 }
 public override void Init()
 {
     _inputManager = EngineSystems.GetSystem <InputManager>();
     _worldManager = EngineSystems.GetSystem <WorldManager>();
 }
 public override void Init()
 {
     _windowManager = EngineSystems.GetSystem <WindowManager>();
 }
 public override void Init()
 {
     _logger = EngineSystems.GetSystem <Logger>();
 }