Exemple #1
0
            public PostEffect(asd.Graphics g)
            {
                if (g.GraphicsDeviceType == GraphicsDeviceType.DirectX11)
                {
                    m_shader = g.CreateShader2D(
                        shader2d_dx_ps
                        );
                }
                else if (g.GraphicsDeviceType == GraphicsDeviceType.OpenGL)
                {
                    m_shader = g.CreateShader2D(
                        shader2d_gl_ps
                        );
                }
                else
                {
                    throw new Exception();
                }

                m_material2d = g.CreateMaterial2D(m_shader);
            }
Exemple #2
0
        private static void SetupMembers()
        {
            CurrentScene = null;
            Logger = new Log(core.GetLogger());
            Keyboard = new Keyboard(core.GetKeyboard());

            if(core.GetMouse() != null)
            {
                Mouse = new Mouse(core.GetMouse());
            }

            if(core.GetFile() != null)
            {
                File = new File(core.GetFile());
            }

            if(core.GetJoystickContainer() != null)
            {
                JoystickContainer = new JoystickContainer(core.GetJoystickContainer());
            }

            Sound = new Sound(core.GetSound());
            Graphics = new Graphics(core.GetGraphics_Imp());
            ObjectSystemFactory = new asd.ObjectSystemFactory(core.GetObjectSystemFactory());
            Profiler = new Profiler(core.GetProfiler());
            AnimationSystem = new AnimationSystem(core.GetAnimationSyatem());

            layerProfiler = core.GetLayerProfiler();
        }