Archived

This topic is now archived and is closed to further replies.

Objects and buffers

This topic is 5500 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

Hey, i''m not really sure how most people do this.... so i bring it to the forums. I''m making a simple app, using directX with a 3d model that is used repeatedly. As the app goes on, the model is going to appear more and more. So, my idea is to create a class with one set of vertex info and a matrix for each instance (i''m assuming this is how most people would do it??) My question: What''s the best way to render all the shapes to screen?? In the render method, should i just copy the verices into the buffer, and render for each instance of the object i need on screen?? Question 2: If i''m on the right track above, do i have to worry about the order i render the instances of the objects (i.e. The ones in back first) or does it not matter Thanks in advance (and please no "it depends" or "practice" answers, i want to know how YOU do it) --Ninj4D4n

Share this post


Link to post
Share on other sites
Yeah that''s how I''d do it, one model with it''s vertices defined in local space and each instance of the model specifies it''s own local-to-world matrix.

The order you draw things in shouldn''t matter if you''re using a Z-buffer, but if your model has translucent sections you''ll want to render all of the opaque stuff first and the translucent stuff at the end.

Share this post


Link to post
Share on other sites