PDA

View Full Version : split polygon problem when antialiasing



jameswh
09-17-2008, 02:21 PM
hi

when rendering a quad with the following settings, i have the problem that the antialiasing not only occurs on the edges of the quad, but visibly on the edges of the triangles which make up the quad.

glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST);
glEnable(GL_POLYGON_SMOOTH);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

i have the same problem when making a solid circle from a triangle fan, when i enable antialiasing i can actually see the outline of each fan

is there any way to avoid this???

thanks in advance

james

ZbuffeR
09-17-2008, 03:34 PM
The hardware always rasterize triangles.
Polygon smoothing is not the same as MSAA/FSAA. it is a kind of older/less correct ways of antialiasing.
Try disable depth testing, but it will bring other problems.

jameswh
09-17-2008, 11:31 PM
ah thanks, that brings me closer to a solution

i did a search for MSAA/FSAA, but didnt see anything OpenGL specific. i have no idea what it is, so if anyone can post some links id be very grateful.

btw tried disabling depth testing, but it didnt help.

thanks again

ZbuffeR
09-18-2008, 01:28 AM
Sorry for being unclear.
The extension you are looking for is : http://opengl.org/registry/specs/ARB/multisample.txt

jameswh
09-18-2008, 04:29 AM
great, thanks, i will check it out