PDA

View Full Version : Tri and Quad Outlines Rendering to a Bitmap



Mitch
03-17-2006, 07:09 AM
Using the same rendering code as when I render to the screen, I get outlines around my quad's and tri's. The outlines are the same color as the baclkground clear color. It would seem there's a state that I'm missing but I can't find it. How do I get rid of these outlines?

Mitch
03-17-2006, 10:29 AM
I discovered its the blending:

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

Turning it off removes the borders but of course I lose any transparency. So why dows it work to the screen but not a bitmap?

sqrt[-1]
03-17-2006, 01:11 PM
Just a guess, have you got polygon smooth mode on?

Mitch
03-20-2006, 08:37 AM
You got it. It was the combo of Polygon Smoothing and setting

glHint ( GL_LINE_SMOOTH_HINT , GL_NICEST ) ;
glHint ( GL_POLYGON_SMOOTH_HINT , GL_NICEST ) ;