Sign in to follow this  
  • entries
    177
  • comments
    531
  • views
    163576

Meshes

Sign in to follow this  
Scet

98 views

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.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now