Ejemplo n.º 1
0
        // --------------------------------------------------------------------

        public override void Init(Onyx3DInstance onyx3d)
        {
            base.Init(onyx3d);

            GL.Enable(EnableCap.CullFace);
            GL.Enable(EnableCap.DepthTest);

            GL.Enable(EnableCap.Multisample);

            GL.Enable(EnableCap.LineSmooth);
            GL.Hint(HintTarget.LineSmoothHint, HintMode.Nicest);

            GL.Enable(EnableCap.Blend);
            GL.BlendFunc(BlendingFactor.SrcAlpha, BlendingFactor.OneMinusSrcAlpha);

            GL.Enable(EnableCap.TextureCubeMapSeamless);

            GL.ClearColor(Color.SlateGray);

            Gizmos = new GizmosManager();
            Gizmos.Init(onyx3d);

            mRenderFrame = new FrameBuffer((int)MainResolution.X, (int)MainResolution.Y);

            mScreenCamera = new OrthoCamera("Cam", 1, 1, 0, 1000);
            mScreenQuad   = new ScreenQuadRenderer();
            mScreenQuad.GenerateQuad(1, 1);
            mScreenQuad.Material = onyx3d.Resources.GetMaterial(BuiltInMaterial.Screen);
        }
Ejemplo n.º 2
0
        // --------------------------------------------------------------------

        private void Init(IGraphicsContext context, IWindowInfo info)
        {
            mWindowsInfo     = info;
            mGraphicsContext = context;

            Renderer.Init(this);
            Resources.Init(this);
            Gizmos.Init(this);
        }
Ejemplo n.º 3
0
        public override void Init(Onyx3DInstance onyx3d)
        {
            base.Init(onyx3d);

            GL.Enable(EnableCap.CullFace);
            GL.Enable(EnableCap.DepthTest);

            GL.Enable(EnableCap.Multisample);
            GL.Hint(HintTarget.MultisampleFilterHintNv, HintMode.Nicest);

            GL.Enable(EnableCap.LineSmooth);
            GL.Hint(HintTarget.LineSmoothHint, HintMode.Nicest);

            GL.Enable(EnableCap.Blend);
            GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);

            GL.ClearColor(Color.SlateGray);

            Gizmos = new GizmosManager();
            Gizmos.Init(onyx3d);
        }