Easy Anti-Aliasing in OpenGL
Is there an easy way to do anti-aliasing in OpenGL? Something like
gl_Antialiasing(true);
or something like that?
Or do you have to do all the math and stuff youself?
I don't know if it's realy anti aliasing but you could do this:
glEnable(GL_POLYGON_SMOOTH);
glEnable(GL_POLYGON_SMOOTH_HINT);
glEnable(GL_LINE_SMOOTH);
glEnable(GL_POLYGON_SMOOTH);
glEnable(GL_POLYGON_SMOOTH_HINT);
glEnable(GL_LINE_SMOOTH);
Quote:Original post by BTierens
I don't know if it's realy anti aliasing but you could do this:
glEnable(GL_POLYGON_SMOOTH);
glEnable(GL_POLYGON_SMOOTH_HINT);
glEnable(GL_LINE_SMOOTH);
Actually OpenGL's antialiasing looks kind of crap, and I'd recommend using the ARB_multisample extension.
If you decide to do it with the built in OpenGL functionality, then you need to first enable GL_POLYGON_SMOOTH, and then set the hint option:
glEnable(GL_POLYOGON_SMOOTH);glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST);
Where glHint takes a hint parameter of either GL_NICST, GL_FASTEST, or GL_DONT_CARE (default).
Thanks all.
I tried the OpenGL version, and I didn't get any noticeable difference in visual quality (the aliasing is currently pretty bad from certain camera angles).
I want to try the ARB_Multisample method, but where can I get the necessary files? (arb_multisample.h, arb_multisample.cpp, and anything else).
Thanks.
I tried the OpenGL version, and I didn't get any noticeable difference in visual quality (the aliasing is currently pretty bad from certain camera angles).
I want to try the ARB_Multisample method, but where can I get the necessary files? (arb_multisample.h, arb_multisample.cpp, and anything else).
Thanks.
Quote:Original post by AndreTheGiant
Thanks all.
I tried the OpenGL version, and I didn't get any noticeable difference in visual quality (the aliasing is currently pretty bad from certain camera angles).
I want to try the ARB_Multisample method, but where can I get the necessary files? (arb_multisample.h, arb_multisample.cpp, and anything else).
Thanks.
Necessary files? ARB_multisample is an extension, load it as such.
Edit: Grammar fix.
[Edited by - MikeMJH on October 7, 2004 1:58:57 PM]
Quote:Original post by AndreTheGiant
?
To use any function beyond OpenGL 1.1 (which is what the Windows OpenGL library/header support) you must load the procedure from OpenGL32.dll. I now refer you to the FAQ.
Why not just use the AA built in to the video cards driver. Is there any need for your app to directly support it. In fact AA works in many games that existed before AA.
because that relies on the end user setting AA as on in the control panel, personally I prefer to have per application control over AA which can be done by asking for a pixel format with multi-sample buffers, for which the gfx card needs to support that extension
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement