PDA

View Full Version : edge coloring



nib
03-06-2007, 11:22 AM
Funny problem here.

If I'm running on my mac nvidia card ( with no shaders on ), with multisample off and I draw a transparent model, then the edges of the triangles come out different shade of similar color. I see triangles. If I turn multisample on, then no edges are drawn with a different color.

Now, if I run on my ati card, no edges are drawn with a different color. Having multisample on or off does not appear to matter.

I tried to do something like:

glTexParameterf (GL_TEXTURE_2D,GL_TEXTURE_BORDER_COLOR, v);

But this does not seem to change anything.

Hmm... :rolleyes:

ZbuffeR
03-06-2007, 12:16 PM
Try this :
http://www.opengl.org/discussion_boards/ubb/ultimatebb.php?ubb=get_topic;f=2;t=021220;p=1#0000 02

nib
03-06-2007, 01:29 PM
Hmm, I already have GL_CLAMP_TO_EDGE and glPixelStorei(GL_UNPACK_ALIGNMENT,1). In fact, if I change those two things then some solid colored parts of the model get edges -- edges of the model lined up to other things. So, they are solving part of the problem. Probably ran across this issue in the past.

Here is a clue. I blend those polygons that have transparent colors. But if I change the color such that there is no transparency then the triangle edge colors disappear. Unfortunately, I need the transparency and it looks like blue graph paper with white lines on it. :(

glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
glDisable(GL_CULL_FACE);

nib
03-06-2007, 04:25 PM
Not to do a monologue but I think this is the culprit:

glEnable(GL_POLYGON_SMOOTH);

Your right it is something to do with filtering.