Hey,
is there a way to smooth the Visual Optic of a Graphic Object in OpenTK. Like this:
GL.Hint(HintTarget.LineSmoothHint, HintMode.Nicest); GL.Hint(HintTarget.PolygonSmoothHint, HintMode.Nicest);
But i dont see any effect...
Thx
you are using old stuff. try to create a MSAA opengl context instead.
And, if you are using the compatibility profile (the "old stuff") - you can refer to this information for anti-aliasing lines and polygons:
http://www.opengl.org/resources/code/samples/sig99/advanced99/notes/node119.html
For instance, this OpenTK fragment works for lines:
GL.Enable(EnableCap.LineSmooth); GL.Enable(EnableCap.Blend); GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha); GL.Hint(HintTarget.LineSmoothHint, HintMode.DontCare);
Wow, thats pretty good! But just to understand this better. Am i using MSAA by using the code you have posted or is it still "old-stuff". If yes, how can i use MSAA?
thx
That's the "old-stuff", and will only apply anti-aliasing to the line primitives.
I haven't used MSAA, however, if you look in the OpenTK Sample Browser, in the OpenTK samples, there is a sample named "GameWindow MSAA"
The main item is the specification of 4 samples in the GraphicsMode construction of the OpenTK GameWindow:
public FullscreenAntialias() : base(800, 600, new GraphicsMode(32, 0, 0, 4)) { Keyboard.KeyDown += Keyboard_KeyDown; }
Have fun!
Comments
Re: Smooth Visual Effect
you are using old stuff. try to create a MSAA opengl context instead.
Re: Smooth Visual Effect
And, if you are using the compatibility profile (the "old stuff") - you can refer to this information for anti-aliasing lines and polygons:
http://www.opengl.org/resources/code/samples/sig99/advanced99/notes/node119.html
For instance, this OpenTK fragment works for lines:
Re: Smooth Visual Effect
And, if you are using the compatibility profile (the "old stuff") - you can refer to this information for anti-aliasing lines and polygons:
http://www.opengl.org/resources/code/samples/sig99/advanced99/notes/node119.html
For instance, this OpenTK fragment works for lines:
Wow, thats pretty good! But just to understand this better. Am i using MSAA by using the code you have posted or is it still "old-stuff". If yes, how can i use MSAA?
thx
Re: Smooth Visual Effect
That's the "old-stuff", and will only apply anti-aliasing to the line primitives.
I haven't used MSAA, however, if you look in the OpenTK Sample Browser, in the OpenTK samples, there is a sample named "GameWindow MSAA"
The main item is the specification of 4 samples in the GraphicsMode construction of the OpenTK GameWindow:
Have fun!