Jump to content
  • Advertisement
Sign in to follow this  
marcglennjamon

OpenGL OpenGL non-convex polygon... question

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

Hello everyone! Im currently doing a project that involves drawing any kind of a three-dimensional polygon. That will include drawing a non-covex type. Some articles that I've read state that drawing a non-convex polygon is not possible using GL_POLYGON function. However, when I try to draw a convex 2d plane(this is one of the planes in the three-dimensional polygon), it displays the polygon correctly. But when I try to draw all the 2d polygons to make up the 3d convex polygon, the polygon somehow become distorted... Do you have any idea what is happening to my program? Does OpenGL support drawing non-convex polygons? Please help me... Thank you very much... Btw, Im using Mesa3d 6.4.1 in mandrakelinux 10.1

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
break the polygons down into triangles by using a triangle fan. some of the clipping algorithms used break when using non convex polygons. using polygons is kind of depreciated most cases opengl hardware breaks then down to triangles anyway and it requires an additional step so just use a triangle fan.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!