Jump to content
  • Advertisement


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


OpenGL Outlining Objects in OpenGL

This topic is 6193 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

I woiuld display some Obejcts for example a simple Cube who is filled with a color (drawed in Mode GL_FILLED) and whos edges are drawn as black lines. I will outline the cube. Exists there a another possibilty to do this instead of drawing the filled cube first and overdraw it with black lines ?? Thanks for your help Peter Gmeiner

Share this post

Link to post
Share on other sites
no i think thats the easiest way
glPolygonMode( GL_FRONT, GL_FILL )
draw cube
glPolygonMode( GL_FRONT, GL_LINE )
draw cube // the vertices should still be in hardware thus this shouldnt be so slow

perhaps also for the line version u need glDepthFunc( GL_EQUAL ) or glPolygonOffSet(..)

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!