I'm using XNA and I understand that I will need a world transform (scale, rotate and translate). What I don't understand is that if I am batch drawing the quadrangles then how do I pass the world transform to the graphics card.
With individual quads it is easy, you just send the world transform for each quad and draw with 4 vertices/6 indices. What I don't understand is, if I am sending say 16 vertices/24 indices in one draw call, how I can set the individual world transform for all 4 quads?
Main Topics
Browse All Topics





by: ikeworkPosted on 2009-11-03 at 01:42:16ID: 25727291
>> The problem I am having is if I am to change a parameter such as width or the normal then I have to update all the vertices each time.
The solution is to store the entire object, vertices and normals in object's local space. Then apply transformations that puts the object in world space, then you dont have to update the object local data.
>> How can I create a transform matrix that can be passed to the graphics card so the quad can stay in local space coordinates and then be transformed to world space by the graphics card.
What do you use? DirectX, OpenGl, XNA?