Jump to content
  • Advertisement
Sign in to follow this  

DirectX: meshes assembled into model VS ID3DX10Mesh

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, currently I'm looking into supporting 3D models for my graphics engine.

This is how the core parts of my graphics engine work atm:

class Geometry: consists of a vertexbuffer and an indexbuffer (optional)
class Mesh: consists of the data for a single mesh to be drawn: geometry, material, etc
class Renderer: sorts Meshes according to material and does some additional optimising for execution speed, also renders the actual meshes.

Now, I was planning to create a model class, which could hold several meshes, so 3d models could be drawn with multiple geometries all having their own material.
However, I recently came across something called ID3DX10Mesh. Apparently ID3DX10Mesh has the option to do this:

// Reorder the vertices according to subset and optimize the mesh for this graphics
// card's vertex cache. When rendering the mesh's triangle list the vertices will
// cache hit more often so it won't have to re-execute the vertex shader.
HR( m_pID3DX10Mesh ->GenerateAdjacencyAndPointReps( 1e-6f ) );

They also allow different materials for one ID3DX10Mesh

I'm wondering if I should go through with my original idea, or use these ID3DX10Meshes. I do have the problem however that using those ID3DX10Meshes might mess up my renderer quite a bit.

What is generally done for good performance regarding this matter?

Thanks in advance.

Share this post

Link to post
Share on other sites
Hi there!

Usually the built in functions are faster than a thing you write, because they are working directly with the DX "core". But testing is always a good idea, nobody is a god, so there can be functions that fit more for you.
In your case maybe I would go for the hand written one, maybe some day that knowledge will be useful.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!