Sign in to follow this  
rpreller

GL_LINES and GL_QUADS

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this