Hi, i am trying to play with d3d10 over the last few days (actually
porting my engine from ogl 2.1 to d3d10). I have to say, i am a bit
confused with how i should make use of the buffers. I am going to lay down a few questions I have.
So far, I was creating two large buffers, one for static objects and one for dynamic which i was filling with data. I was copying during init the data from all my meshes chunk by chunk to the static buffer and i was keeping my dynamic buffer empty which i was filling before rendering. During rendering i was binding the appropriate buffer and was moving the pointer to render the data i need.
Is this the approach i should use for d3d10 too? Create two large buffers, one for static (D3D10_USAGE_DEFAULT and D3D10_USAGE_DYNAMIC) plus a few more for constant buffer data? Most of the samples i have seen on dx10 sdk
create a buffer for each individual mesh and d3d10 allows 16 buffers to
run simultaneously. Is it better to have two big buffers or many
smaller ones? What is the best approach?
As for the static buffer(or buffers) is it better to gather all the data onto a buffer array and then initialize the d3d10buffer with it, or create an empty buffer and then copy the data chunk by chunk? The latter seems more convienient in terms of the extra storage i would need to have on my app.
In case i do the latter, do i use the Map or SubResource method? I assume the SubResource functions are mostly for texture data.
I am a bit lost :).
Thank you.