Skip to main content
GameDev.net gamedev.net
🔒 Locked

Odd drawing problem

Started by ageny6 May 27, 2003 at 7:39 PM 2 replies 550+ views
Original Post
ageny6
ageny6
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
My signature used to suck. But it's much better and more accurate now.
Dreamforger
Dreamforger
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
I may be getting older, but I refuse to grow up
ageny6
ageny6
Aren''t the normals calculated from the transformed vertices???

Jonathan
My signature used to suck. But it's much better and more accurate now.
ageny6
ageny6
quote:
Original post by Dreamforger
Polygon API ? what''s that?

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



Jonathan
My signature used to suck. But it's much better and more accurate now.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.