Esempio n. 1
0
        public override void Draw(TextureArray2D texture)
        {
            // draw checkerss
            base.Draw(texture);

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

            shader.Bind();
            shader.SetTransform(GetTransform());
            shader.SetFarplane(CalcFarplane());
            shader.SetLevel((float)models.Display.ActiveMipmap);
            shader.SetGrayscale(models.Display.Grayscale);

            models.GlData.BindSampler(shader.GetTextureLocation(), true, models.Display.LinearInterpolation);
            texture.BindAsCubemap(shader.GetTextureLocation());
            // draw via vertex array
            models.GlData.Vao.DrawQuad();

            GL.Disable(EnableCap.Blend);
            Program.Unbind();
        }