Пример #1
0
        protected override void OnLoad(EventArgs events)
        {
            base.OnLoad(events);

            Width  = _defaultWidth();
            Height = _defaultHeight();
            Title  = _defaultTitle();
            Icon   = new Icon(Assets.GetImage(_defaultIcon()));

            GL.ClearColor(_defaultBackground());
            GL.Viewport(0, 0, Width, Height);

            SubscribeEvents();
            LoadModels();
            _shader = new Shader(_defaultVertShader(), _defaultFragShader());

            GL.UseProgram(_shader.ProgramId);
            GL.GenBuffers(1, out _buffers);
            GL.Enable(EnableCap.Blend);
            GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);

            AudioService.Connect();
        }