Thursday 18 February 2010

Mesh format

When Direct3D 10 was released way back in 2007, lots of people were surprised at the lack of a decent mesh class. Whilst there is one, it cannot load from file in the same way that Direct3D 9's could, and it is essentially more of container for the vertex and index buffers.
With this is mind, designing an engine that supports both Direct3D 9 and 10 is difficult. What I was doing was loading everything through DirectX 9, then converting in to 10 when that was running. The problem with this is that two Direct3D devices need to be running simultaneously, which not only hits the performance but also makes it very difficult to debug using PIX.
What I have been working on for pdEngine today is my own mesh format that can render to Direct3D 9 and 10 (and hopefully 11 when I buy a card that supports it), and can load from file. The file loading is not yet done, but it won't be .x, it will be my own format probably similar to .sdkmesh.

No comments:

Post a Comment