DirectX Mesh Question
I'm still a little newbish of DirectX and still trying to get a grip with everything I can do.
My question involves actual loaded Meshes and optimization.
After loading a single DirectX Mesh, can I redraw it multiple times within the same BeginScene() EndScene() calls.
Say, for example, I had two entities that used the same model source. Instead of loading the same model twice into memory, is it possible to simply draw the same mesh twice (after altering the position, of coarse) on the same frame.
Certainly. Create a translation matrix for each position and call:
dev->SetTransform(D3DTS_WORLD,&trans);
before you render the mesh.
Set the world transform for another location and draw the mesh again.
dev->SetTransform(D3DTS_WORLD,&trans);
before you render the mesh.
Set the world transform for another location and draw the mesh again.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement