polygon AA problem..

Started by
6 comments, last by Boder 16 years, 1 month ago
When I turn on polygon Anti-alias and blending, I start getting some lines drawn starting from first vertex connected to each one on.. It looks like this.. Does anyone know why this happens..? Additional info: glShadeModel(GL_SMOOTH); glEnable (GL_POLYGON_SMOOTH); glEnable (GL_BLEND); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glHint (GL_POLYGON_SMOOTH_HINT, GL_DONT_CARE); -All the vertices normals are facing the same direction (perpendicular to the surface) -I tried changing the camera view angles, positions.. nothing changes.. As for the material- I've only set the front face diffuse to: GLfloat mat_blue5[] = { 0.0, 0.0, 0.5, 1.0 }; and GLfloat mat_red5[] = { 0.5, 0.0, 0.0, 1.0 }; like: glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_blue5); and glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_red5); Don't know what else could be affecting this.. PS: When I turn off blending, the lines disappear.. But the display quality also goes back to crappy.. [Edited by - experiment on March 18, 2008 9:01:26 AM]
Advertisement
Are you using indexed vertices?

Previously "Krohm"

Quote:Original post by Krohm
Are you using indexed vertices?


they aren't really indexed.. they are all unique..
(if that's what you meant)

glBegin(GL_POLYGON);
object2d.cycle_trough_all_vertex();
glEnd();
Nobody ever ran into something like this..?

Could it be a problem with my graphics card..?
(Nvidia GeForce 4 Ti with AGP8X) (pretty old stuff for
nowdays.. i know, but still quite some use..)
Quote:Original post by experiment
they aren't really indexed.. they are all unique..
(if that's what you meant)
Yes, that's it. They are not unique geometrically and they shouldn't logically. When you put two very similar vertices nearby, cracks may occur. Even if the value is the same, issues regarding algorithmic stability in the rasterizer may cause cracks to occur.

I'm rather sure this would make the issue go away (although I cannot check since you're exceeded your imgshack BW - next time use thumbnails).

Please note that waiting more than just a few hours for replies is generally a good idea.

Previously "Krohm"

Quote:Please note that waiting more than just a few hours for replies is generally a good idea.


in less than few hours I'll switch to DirectX..

I'd have done that a long time ago if DX had such great utility toolkit as glut.. simple, smart, fast, easy to use.. dxut just doesn't cut.. it's full of crap, like a politician trying to tell something practical..

glut: "include me, link me, set callbacks, use me"

dxut: "okay, include me, link me, don't forget to import all the source files into your project every time you start one, don't forget all the callbacks EXACTLY as they are shown in the examples, there's a load of them than even we don't know what they do, but you have to use them or you'll have process management problems, whatever that is, and let's not forget that Santa will kill your dog and piss in your chimney, at the very end just pray that you'll get less than 732164023915 errors, cause you'll be the first to be so close to actually compiling something that was never tested to work, so if you compile, give us a call and tell us what you got, ok..? Yeah.. you'll do just fine..

Truly yours. signed: Bill's left hand stroker"
I saw the same problem on my GeForce 8800, on ATI9600, ATI9250 and GeForce 7950 too. Using both indexed arrays and immediate modes. No idea of why.
Bye and Thanks!SiS.Professional Software Developer.
http://objectmix.com/graphics/136634-artifacts-when-using-antialiased-2d-polygons.html

This topic is closed to new replies.

Advertisement