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

DrawPrimitive Vertex sorting...

Started by Harvester Aug 28, 2000 at 2:05 AM 0 replies 450+ views
Original Post
Harvester
Harvester
I got some problems with DrawPrimitive again. I can''t figure out what rules to follow in order to have my triangles rendered every time. To the present i sort the vertexes using two rules (TOP to BOTTOM and LEFT to RIGHT). However this doesn''t work. I''ve tried sorting from LEFT to RIGHT and TOP to BOTTOM, and again nothing. Anyone knows what rules i should follow? Every tip is welcomed. p.s. BTW, D3DIM doesn''t have any MeshLoader functions, etc... what do i do if i want to load a .x file? Thanks.
... LEMMINGS ... LEMMINGS ... LEMMINGS ... LEM..... SpLaSh!...Could this be what we stand like before the mighty One?Are we LeMmIngS or WhAt!? ;)
WitchLord
WitchLord
If you look at the triangle from in front of it the vertices should be ordered in a clockwise order for the triangle to be seen.

You''ll have to write your own loader for the files. However I believe there is source code available that can help you with that, I don''t know where though as I haven''t written a .x file loader.

- WitchLord
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - <a href="http://www.angelcode.com/tower" rel

Topic Locked

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

Sign in to reply to this topic.