示例#1
0
        public void Set(int w, int h)
        {
            GL.ClearColor(System.Drawing.Color.AliceBlue);
            GL.Enable(EnableCap.DepthTest);
            AppInfo.W    = w;
            AppInfo.H    = h;
            AppInfo.RW   = w;
            AppInfo.RH   = h;
            AppInfo.Full = false;
            AppInfo.App  = "GLApp";
            VImport.RegDefaults();
            for (int i = 0; i < 32; i++)
            {
                VInput.MB[i] = false;
            }
            VPen.InitDraw();
            VInput.InitInput();
            Vivid.Sound.VSoundSys.Init();
            GL.Viewport(0, 0, w, h);
            GL.Scissor(0, 0, w, h);
            GL.Disable(EnableCap.Blend);
            GL.Disable(EnableCap.Texture2D);
            GL.Enable(EnableCap.CullFace);
            GL.CullFace(CullFaceMode.Back);
            GL.Disable(EnableCap.StencilTest);
            GL.Disable(EnableCap.ScissorTest);
            GL.Enable(EnableCap.DepthTest);
            GL.DepthRange(0, 1);

            GL.ClearDepth(1.0f);
            GL.DepthFunc(DepthFunction.Less);
            // UI.UISys.ActiveUI.OnResize(Width, Height);
            VPen.SetProj(0, 0, w, h);
        }
示例#2
0
        public StarApp(string app, int width, int height, bool full) : base(width, height, OpenTK.Graphics.GraphicsMode.Default, app, full ? GameWindowFlags.Fullscreen : GameWindowFlags.Default, DisplayDevice.Default, 4, 5, OpenTK.Graphics.GraphicsContextFlags.ForwardCompatible)

        {
            Link         = this;
            _Title       = app;
            AppInfo.W    = width;
            AppInfo.H    = height;
            AppInfo.RW   = width;
            AppInfo.RH   = height;
            AppInfo.Full = full;
            AppInfo.App  = app;
            W            = width;
            H            = height;
            RW           = width;
            RH           = height;
            Import.Import.RegDefaults();
            VPen.InitDraw();
            StarEngine.Sound.StarSoundSys.Init();
        }
示例#3
0
        public VApp(string app, int width, int height, bool full) : base(width, height, OpenTK.Graphics.GraphicsMode.Default, app, full ? GameWindowFlags.Fullscreen : GameWindowFlags.Default, DisplayDevice.Default, 4, 5, OpenTK.Graphics.GraphicsContextFlags.ForwardCompatible)

        {
            Link         = this;
            _Title       = app;
            AppInfo.W    = width;
            AppInfo.H    = height;
            AppInfo.RW   = width;
            AppInfo.RH   = height;
            AppInfo.Full = full;
            AppInfo.App  = app;
            VImport.RegDefaults();
            for (int i = 0; i < 32; i++)
            {
                VInput.MB[i] = false;
            }
            VPen.InitDraw();
            VInput.InitInput();
            Vivid.Sound.VSoundSys.Init();
        }