How do I enable FSAA in OpenTK?

by Dmitry Fedorkov   Last Updated January 14, 2018 12:13 PM

All I could find about it is this question, but GraphicsMode alone doesn't enable anti-aliasing:

using System.Drawing;
using OpenTK;
using OpenTK.Graphics;
using OpenTK.Graphics.OpenGL;

class Program
{
    static void Main()
    {
        using (var window = new GameWindow(800, 60, new GraphicsMode(32, 24, 0, 8)))
        {
            window.Resize += (sender, e) => { GL.Viewport(window.Size); };
            window.RenderFrame += (sender, e) =>
            {
                GL.Clear(ClearBufferMask.ColorBufferBit);
                GL.Color3(Color.Red);
                GL.Begin(PrimitiveType.Triangles);
                GL.Vertex2(-1, 1);
                GL.Vertex2(-1, 0);
                GL.Vertex2(1, 0);
                GL.End();
                window.SwapBuffers();
            };
            window.Run();
        }
    }
}

enter image description here



Related Questions


Adaptive super sampling

Updated May 24, 2015 22:05 PM

What "create" aliasing?

Updated August 19, 2015 17:05 PM

How do I implement anti-aliasing in OpenGL?

Updated August 19, 2015 18:05 PM

Unity5.6 + Distorion + antialiasing doesn't work

Updated April 19, 2017 10:13 AM