Jump to content
  • Advertisement
Sign in to follow this  
AndreTheGiant

OpenGL Easy Anti-Aliasing in OpenGL

This topic is 5395 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
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);

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!