Anti-aliasing Question (new to opengl)

Started by
3 comments, last by zedzeek 19 years, 8 months ago
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.
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

NeHe's FullScreen AA tutorial (#46)


~Main
==Colt "MainRoach" McAnlisGraphics Engineer - http://mainroach.blogspot.com
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!
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

This topic is closed to new replies.

Advertisement