Tuesday, 6 August 2013

Should I set the world matrix before rendering polygons in XNA?

Should I set the world matrix before rendering polygons in XNA?

In XNA, I can change the world matrix when rendering polygons with
vertexes (either buffered or dynamic) to shift their position in the
world, without having to reconstruct the vertex arrays. In OpenGL, popping
and pushing matrixes (i.e. changing the world matrix) is how you render
things at various positions, however, I'm not sure whether this is
considered to be the correct way of doing this in XNA.
Is adjusting the world matrix on a per model / per object basis to render
them the correct way of doing it in XNA, or should I reconstruct the
vertex arrays when I want to draw something at a different position?

No comments:

Post a Comment