Objects and buffers
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
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement