Пример #1
0
        public Warmup()
        {
            Message.Intercept("TextMsG", (Action <string, string>)EventGameStart);

            Player.RegisterCommand("warmup_start", (player, cmd) => {
                int t;
                if (cmd.Arguments.Length > 1)
                {
                    if (!int.TryParse(cmd.Arguments[1], out t))
                    {
                        t = time.GetInt();
                    }
                }
                else
                {
                    t = time.GetInt();
                }
                StartWarmup(t);
            });
        }
Пример #2
0
        public void Storage2D(int W, int H, int Levels = 1, InternalFormat IntFormat = InternalFormat.Rgba)
        {
            Width     = W;
            Height    = H;
            MipLevels = Levels;

            if (Multisampled)
            {
                Gl.TextureStorage2DMultisample(ID, CVar.GetInt("gl_samples"), IntFormat, W, H, false);
            }
            else
            {
                Gl.TextureStorage2D(ID, Levels, IntFormat, W, H);
            }
        }