Archived

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

ageny6

Odd drawing problem

Recommended Posts

ageny6    122
Now, I am not sure of the source of this problem, but I though this question was best suited for this forum topic. I have a collection of solids, and each solid has a collection of faces, and each face contains 4 points. When I draw the points using the Polygon API, things work fine. But, for some reason, when I want to rotate one solid (say on the y-axis) and draw the points then, the result is a loss in face drawing. In other words, I lose some faces that should be drawn (even if they are not hidden by anything else). I verified the mathematics and the rotational matrix, and they are all good. So I suppose the logical conclusion is to blame the API function. What I beleive is that the order in which to feed the points into the Polygon API makes a difference, and when I rotate it somehow changes the proper order, and hence prevents proper completion of the polygon API. Am I right to blame the API? Is there another solution in drawing a face using the four corner coordinates??? Jonathan

Share this post


Link to post
Share on other sites
Dreamforger    122
Polygon API ? what''s that? Are you talking about the polygon drawing routines of DX or OGL?

How do you transform the vertices? By setting transformation matrices, or by recalculating each point? If the later, I''d bet you forget to rotate the normals, thus getting some faces culled that shouldn''t be

Share this post


Link to post
Share on other sites
ageny6    122
quote:
Original post by Dreamforger
Polygon API ? what''s that?

BTW, i''m talking about the Windows API (GDI) Polygon Function



Jonathan

Share this post


Link to post
Share on other sites