Jump to content
  • Advertisement
Sign in to follow this  
opabinia

OpenGL Anti-aliasing Question (new to opengl)

This topic is 5072 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

I'm puzzled by the opengl settings for anti-aliasing polygons. I'm new to opengl (and graphics programming). The program basically draws a rotating cube with grey faces and black edges and with some colored polygons as "decals" on the faces. Everything is working pretty much as I would expect, except that the edges of the colored polygons show no signs of anti-aliasing. Using the Red book, here are the settings I've come up with for drawing the decals:
glEnable(GL_POLYGON_SMOOTH);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glDepthMask(GL_FALSE);
glEnable(GL_POLYGON_OFFSET_FILL);
glPolygonOffset(-1.0, -1.0);
glPolygonMode(GL_FRONT, GL_FILL);
glColor4fv(aColor);
// draw a rectangle...
// reset attributes...
Anyone ideas on what I'm doing wrong? Are there other specifics I need to give to make the problem clear? This is the first time I've tried a feature in opengl that has looked like it has absolutely no effect.

Share this post


Link to post
Share on other sites
Advertisement
perhaps its working
try it first with lines (u can see it better)
http://www.opengl.org/resources/faq/technical/rasterization.htm#rast0150

also look into fsullscreen antialiasing

Share this post


Link to post
Share on other sites
I had already tried anti-aliasing on the cube edges, so I knew it worked for lines. I didn't know it was ok for opengl to ignore GL_POLYGON_SMOOTH though.

So from that I thought to draw the decal polygon both filled and as a line in the same color, and that looks quite good (at least for this purpose).

I had read about scene anti-aliasing in the red book, and I'm sure I'll give it a try pretty soon. I was just concerned that I was misunderstanding the opengl commands somehow.

The vendor for the opengl library is ATI and the version is "1.3.3561 WinXP Release". I should probably look at the ATI site for technical info. If the kind of details that were causing this problem aren't easy to find, any pointers as to how to dig them out of ATI's site or to other sites that might track this kind of stuff would be appreciated.

Thanks!

Share this post


Link to post
Share on other sites
from what ive seen on standard cards glEnable(GL_POLYGON_SMOOTH); has looked crap (ie u can hardly see it) youre better off with FSAA

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!