GL_LINES and GL_QUADS

Started by
0 comments, last by fcoelho 14 years, 10 months ago
I am having a problem using GL_LINE_SMOOTH and GL_LINES. I have boiled down the problem to the following. I am basically rendering a quad with a texture map onto it. The texture is mapped snugly to the quad. I then render smooth lines using the same vertex and texture coordinates of the quad to give an antialiased look, rather than using GL_POLYGON_SMOOTH. Even though the lines have the same local space and texture coords, the lines are not fit within the quad, rather they extend outside of the quad. However, the sides with which they render outside of the quad are not reliable and appear to be affected by the projection matrix. Is there any good reasoning for why this is occurring? I have set the line smooth hint to nicest, and attempted to set the line width below 1.0. An additional problem is that the texture is now mapped outside of its extents onto the smooth outline, but I may be able to modify the texture matrix to take this into account, if I can an idea of when the lines would not fit inside the quad.
Advertisement
Is alpha blending enabled?
The antialiased parts of the rendered primitive have an alpha component to get rid of aliasing. If you don't enable blending, you get full-color pixels, no alpha, no antialiasing.

This topic is closed to new replies.

Advertisement