OpenGL and concave meshes
hey
I am constantly running in to a very annoying problem and I was wondering if anyone knew how to combat it. For the longest while I've been trying to draw concave meshes with OpenGL and can't seem to get it done right because OpenGL always draws the mesh with a polygon right across the concave part of the mesh, so if anyone knows how to solve this problem please post it here.
Thanks in advance.
I am constantly running in to a very annoying problem and I was wondering if anyone knew how to combat it. For the longest while I've been trying to draw concave meshes with OpenGL and can't seem to get it done right because OpenGL always draws the mesh with a polygon right across the concave part of the mesh, so if anyone knows how to solve this problem please post it here.
Thanks in advance.
Concave *meshes* aren't an issue. You mean you're trying to draw concave polygons? That is not possible. For concave polygons you'll need to tessellate them. gluTess works great for that.
No, seriously I mean concave meshes. For instance I've tried drawing a compass (as in the mathematical instrument), but when it get drawn on the screen a polygon goes right across the legs of the compass. The only thing that I suspected is that OpenGL probably loops the mesh and draws a polygon across the first and last vertices.
But thanks for the advice anyway because I didn't know I could draw concave meshes
But thanks for the advice anyway because I didn't know I could draw concave meshes
Ashford Wrote:The only thing that I suspected is that OpenGL probably loops the mesh and draws a polygon across the first and last vertices.
No, it won't loop when drawing triangles. You're either loading the model incorrectly, and/or you're sending the wrong info to OpenGL: e.g. wrong number of indices [which would be my most likely guess], or wrong base address, etc. It should draw any mesh just fine, as long as all the faces match the primitive you specify. If you're specifying GL_POLYGON, those polygons have to be convex.
[edit] It could also be that the model file is corrupt or incorrect.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Breaking down a concave mesh into convex pieces | Willem | 5 | 3,929 |
Aug 10, 2008 05:49 AM Last Post: Willem |
|
| Calculating tangent coords for arbitrary poly meshes | TomorrowPlusX | 8 | 4,782 |
Jul 9, 2007 03:10 PM Last Post: Hog |
|
| Indexed Face Sets (meshes) | wyrmmage | 4 | 3,141 |
Dec 15, 2006 11:18 AM Last Post: wyrmmage |
|
| Texture mapping meshes | wyrmmage | 9 | 3,785 |
Nov 30, 2006 08:45 PM Last Post: OneSadCookie |
|
| Will VBOs be faster than display lists for simple meshes? | TomorrowPlusX | 14 | 5,159 |
Nov 30, 2004 03:32 PM Last Post: arekkusu |
|

