#### Archived

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

# Odd drawing problem

This topic is 5534 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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 on other sites
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 on other sites
Aren''t the normals calculated from the transformed vertices???

Jonathan

##### Share on other sites
quote:
Original post by Dreamforger
Polygon API ? what''s that?

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

Jonathan

1. 1
2. 2
Rutin
24
3. 3
4. 4
JoeJ
16
5. 5

• 14
• 29
• 11
• 11
• 9
• ### Forum Statistics

• Total Topics
631773
• Total Posts
3002265
×