Jump to content
  • Advertisement
Sign in to follow this  
genne

Mesh compared to Device.DrawIndexedUserPrimitives

This topic is 4092 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 all, I'm confused over how the Mesh object in DirectX Managed works. I have a lot of meshes with a lot of mesh data, and when rendering them all during the same frame I get either DriverInternalError or OutOfMemory (depending on what MeshFlags I specify when constructing the Mesh objects). If I instead create two arrays of indices and vertices and use Device.DrawIndexedUserPrimitives to render them, I get no error at all. Shouldn't it be possible to get the same effect using the Mesh class by using the "correct" MeshFlags option? I've tried all possible combinations of MeshFlags (i.e. Managed, SystemMemory, WriteOnly, SoftwareProcessing) but without success. Am I missing something here? Thanks, Christian

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by genne
I have a lot of meshes with a lot of mesh data,


How much is a lot?

also, DriverInternalError indicates an error in the driver. Your first step should be checking if a newer version of your Graphics Driver software is available and upgrading if one is.

Share this post


Link to post
Share on other sites
A lot is say 5000 meshes, with from 6 to 67456 number of vertices for each mesh (average 84 vertices per mesh).

I have the latest drivers for my card (ATI Radeon Mobility X1400 at a Dell laptop, downloaded from Dell's webpage).

Christian

Share this post


Link to post
Share on other sites
5000 meshes is 5000 IBs and 5000 VBs. You'll be making 5000 IB and VB switches and 5000 DrawPrimitive calls per frame. I'll be amazed if you get anything near realtime performance with that setup. You should really re-think your setup...

Share this post


Link to post
Share on other sites
Quote:
Original post by Evil Steve
5000 meshes is 5000 IBs and 5000 VBs. You'll me making 5000 IB and VB switches and 5000 DrawPrimitive calls per frame. I'll be amazed if you get anything near realtime performance with that setup. You should really re-think your setup...


I know it's a lot of data to render, when using DrawIndexedUserPrimitives i get a frame rate of about 2 FPS (which is ok for me). Re-thinking my setup is a later problem, now I just need to get it working with these large amount of data.

Anyway, it's not that big of a problem now when it works fine with DrawIndexedUserPrimitives, I was just wondering why it crashes when using the Mesh class.

Share this post


Link to post
Share on other sites
DriverInternalError is definitely a driver problem. What happens if you create your own vertex and index buffers and use DrawIndexedPrimitives? Does it give you an internal error there too?

It's possible that the driver just hasn't been tested or can't cope with that amount of data per frame (Althoguh it's unlikely).

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!