PDA

View Full Version : konvex = planar or quad = polygon



cybadepp
01-16-2003, 08:30 AM
hi there,

maybe a stupid simple question but i do not get all the desired information out of the api specs.

- does a open gl polygon have to be planar to ensure that is rendered corretly and

- does also a quad and the quads in a quad_stip need to be planar too?

i need this information, cause i want to create some kind of triangle-iterator for all open gl face types. does anyone has done this before?

sorry 'bout bad english, long time not really using it ;-)

greetz

depp

Halcyon
01-16-2003, 09:02 AM
The GL_QUADS and GL_QUAD_STRIP flags do not have to be coplanar. OpenGL would probably just split them into triangles if the points were not coplanar. The polygon does not have to be coplanar either...but I'm not so sure about the polygon. I just remember the red book saying it has to be convex.

- Halcyon

Jan
01-16-2003, 09:08 AM
Hi

if you use a GL_POLYGON, than all vertices have to lie on a plane.
If you draw one GL_QUAD itīs the same. However if you draw more than one quad (or a quadstrip), than they donīt have to lie in one plane.
That means, if you draw 2 GL_QUADS, then the first 4 vertices have to be on one plane (to form the first quad), and the second 4 vertices have to be on one plane (to form the second quad). However the first quad does not have to lie on the plane of the second quad.

Hope one can understand this explanation ;-)

Jan.

cybadepp
01-17-2003, 02:58 AM
Thanks a lot.

that's exactly what i want to know!

greetz

depp