Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


This topic is 5645 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I have a pb with line antialising. I display a 2D structure with plain polygons, then i display the same structure with Wired polygone to make a wired and solid display. if antialiasing is enabled, the lines (white color) use the black background color to make antialiasing, it doesnt use the color of the polygons. It''s ugly. How to chose the antialiasing color ?

Share this post

Link to post
Share on other sites
There is no "antialiasing color". Line antialiasing (if you''re using GL_LINE_SMOOTH) just blends with the color of the pixel that is already rendered behind him.
You need to enable blending and to setup with something like that :

Also, the rendering order is important since I guess you''re using the Z-Buffer, n''est-ce pas ? You should render the wireframe model after the solid model.

Share this post

Link to post
Share on other sites
Also, you should depth-test but not depth-write while you''re rendering the wireframe model :
glDepthMask(GL_FALSE); // Don''t write to the depth buffer, but read it to test it anyway
glDepthMask(GL_TRUE); // Write to the depth buffer again

Also, the universal question : what is your graphics card / driver / OS combo ?

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!