Tell me more ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Outside of the DirectX class I have objects that hold their own transform matrix (this is calculated every frame by the physics system) held in a linear array of floats

//rotation Mat|Position
[m0, m1,  m2,  m3]
[m4, m5,  m6,  m7]
[m8, m9, m10, m11]  // know the last four elements by default so they are not stored
                    // no scaling, or skewing will be taking place

When I have used Direct3D in the past I have always just gone through the steps to calculate the WorldMatrix (calculate full rotation matrix multiplied by Position Matrix), but how would I use this matrix to set the WorldMatrix so I can render the object?

share|improve this question
Basically, you make the matrix available to your vertex shader through shader variables and then transform every vertex via multiplication. – melak47 May 5 '12 at 4:20
isn't there some way that I can just override the values of a world matrix with the values of the array without having to go through shaders. it just seems a little convoluted to just set a matrix to specific values. – gardian06 May 5 '12 at 15:47
That really depends if you are working with the fixed function pipeline or not. I only have experience with the programmable pipeline. – melak47 May 5 '12 at 17:15
"know the last four elements by default so they are not stored no scaling, or skewing will be taking place" The last four elements of the matrix have nothing to do with scaling or skewing. At least, not in the usual meaning of those terms. – Nicol Bolas May 6 '12 at 21:51

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.