Beginner with big performance problems

Started by
0 comments, last by Aiursrage2k 18 years, 6 months ago
Hi, I have uploaded my source: http://phynet.de/private/sequa/d3d.rar I want to draw a map that I can load from a txt later which should just consist of 1 (there is something) and 0 (there is nothing). And for each 1 I want to draw a cube. For now I just tested drawing many cubes but with the way I do it I have very bad performance. Please have a look at my source. Is there anything wrong with drawing the same object 20000 times (for a map with the size 100*200)? And another problem is that when I draw one cube next to each other I still can see a bit of their 'walls' which should actually be covered. Thank you.
Advertisement
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directx/technicalarticles/faq.asp
Quote:
How can I improve the performance of my Direct3D application?

The following are key areas to look at when optimizing performance:
Batch size

Direct3D is optimized for large batches of primitives. The more polygons that can be sent in a single call, the better. A good rule of thumb is to aim to average 1000 vertices per primitive call. Below that level you're probably not getting optimal performance, above that and you're into diminishing returns and potential conflicts with concurrency considerations (see below).
State changes

...


I would first look at doing some batching, and also frustrum culling is a cheap and easy technique you might look up.
Insufficent Information: we need more infromationhttp://staff.samods.org/aiursrage2k/

This topic is closed to new replies.

Advertisement