Meshes

Published December 23, 2006
Advertisement
I added support for "mesh" faces into my Q3 viewer. Normal polygonal faces and mesh faces can actually use the same function to render.

Device.DrawIndexedPrimitives( Direct3D.PrimitiveType.TriangleList, Face.Array.VertexIndex, Face.Array.MinimumIndex, Face.Array.MeshVertices, Face.Array.MeshVertexIndex, Face.Array.MeshVertices / 3 );

Everything except MinimumIndex is supplied in the BSP file. All I had to do was load the "Vertexes" lump into a vertex buffer and the "MeshVerts" lump, which is just integer indices into "Vertexes", into an index buffer.





Also fixed the problem I was having with the leaves. All that was wrong was that I was loading the wrong lump. So I'm off to try and implement the PVS system.
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement