PDA

View Full Version : distorted polys



holy_moly
04-05-2000, 12:47 AM
hi there,

i've drawn a simple polygon which can be rotated around all axis.i used glHint(GL_PERSPECTIVE_CORRECTION_HINT,GL_FASTEST), to speed things up a little..
i then noticed that the polygon openGL should draw looks differnet and distorted,i.e. it kind of switches between 2 states while rotating.

normally,the poly should look like this:
________
/ \
| |--| |
|__| |__|

but it looks like this!
_______
/ ___ \
| ____\|
|_/ \ and at some other angle it changes the direction

sorry for the f***** up picture,but i guess you know what i mean...
quads and triangles look normally, changing the hint to GL_NICEST doesnt do anything.
maybe i'll post some code here,but i think i did the setup right...

ben
04-05-2000, 09:02 AM
A couple things to check: ( I didn't understand your picture

- The polygon should be convex, which means that a line between any two points within the polygon will lie completely in the polygon.

- The polygon should be planar. I.e. all the points that define the polygon should be in a plane.

- The polygon must not intersect itself. I.e. no figure 8 looking things.

The results are undefined when any of the above conditions hold.