Original Post
I''m porting a project of mine from SDL to DX9, and learning D3D as I do so.
I''ve been following a couple tutorials for setting up a basic D3D9 app, and what I have works.. until I try to make my little two tri test texture move around the screen.
The results are exactly the same, whether I set a projection matrices or not, whether I set rotation matrices or not, whether I set translation matrices or not. Looking over my setup code for the umpteenth time has me stumped; it''s a copy and paste from the DX9 SDK tutorial I''ve been following. My rendering code does only this :
- set the texture to the main device
- set my vertex buffer stream in the main device
call my SetupMatrices() function (calling or not makes no difference at this point)
- create a new D3DXMATRIX and translate it by how far I want
- call maindevice->SetTransform() with the above (which doesn''t seem to have an effect) into the World matrix (I''ve also tested into View, no difference)
- DrawPrimitive(at least something works)
It may be informative to note that I must have something setup right, since I can texture and draw my little quad just fine - with or without any matrix setup whatsoever (it was my intention to use ortho projection until in my testing, I learned that just not having any projection matrix setup appears to be de facto ortho).
Any help that anybody can give would be much appreciated. I never had this much of a problem with OpenGL (nor following simple tutorials, for that matter).
- Pfhoenix