Skip to main content
1 of 2
khanhhh89
  • 243
  • 3
  • 13

Draw call optimization for multiple meshes in DirectX11

I have a large scene in a B3D model, which includes about 120 meshes as in the following pictures:

large B3D scene http://s22.postimg.org/d1h75hr0v/Untitled.png

Each mesh contain a vertex buffer and material information such as diffuse, specular, ambient...

I'm using Directx 11 for rendering, and it takes me about 120 IndexedDraw calls per frame, and the frame rate is down to 30f/s. This speed is so slow and I can't apply physics to the application.

Now I want to group these IndexedDraw call into only one DrawCall per frame. To do this, I'm thinking about creating multiple vertex buffers in Directx, and each of these will own its own material information. For each draw call, DirectX will loop over such vertex buffers and pass the corresponding material information.

I want to ask you there's any way to do this in DirectX11, and if not, could you please suggest me some way to optimize my application.

Thanks in advance.

khanhhh89
  • 243
  • 3
  • 13