Original Post
Hi all, First I'd like to thanks all resources and assistance to my previous threads posted. It has boosted my understanding on D3D tremendously. Therefore, I'll like to seek help again (I'm stuck here) This time, it's exclusively on the render loop... Do I do the following per loop? 1) Clear the vertex and index cache (so that I can put in the vertices that are supposed to be rendered) 2) Loop through all my objects to be rendered (sorted or not) 3) Put the vertices and indices in the buffers, my buffers are seperated into bins that holds different FVF formats and textures. Duplicate buffers wif the same format and texture can reappear. 4) Set identity matrix to world 5) Multiply it by the object's internal matrix (or some would prefer quaternions) 6) Set the view and projection matrices (from a stored set of matrices, so that I dun recalculate every frame) 7) SetTransform into it ... here's where i'm stuck ... if each object is using its individual matrix ... then how can I perform DrawPrimitive or DrawIndexedPrimitive? next, am I right that everytime I call a - DrawPrimitive() - DrawIndexedPrimitive() D3D then sends the number of vertices or indices based on the parameters set into the pipeline. Is it true that only a small bunch of triangles are being sent? Which means, it's inefficient? 8) Restart the whole thingy again per object basis. OK ... I know I could be gravely wrong .. please correct me if I'm wrong... I've thought abt it for a very long time and haven't really came out wif an answer because my understanding wif D3D isn't solid enuf yet. Thanks for your time reading this post. Regards, thrawn80