I must confess that I am not a RenderMonkey expert. But if you want to move your object in the preview window around with the mouse you should use ViewProjection or WorldViewProjection as semantic.
But what ive done is, im using rendermonkey and have created a new 4x4
matrix but not given it a semantic, and have hard coded in the values
to rotate it 45 degrees.
This works but is there a semantic i can apply to the matrix so i dont
need to hard code in the variables or is there generally a better more
flexible way of doing it
To rotate an object you will need a rotation transform matrix. Set this matrix as constant value for the vertex shader. In the vertex shader you have to multiply your vertex position with this matrix. You can do all your translation and scaling with a matrix, too. If you multiply all your matrixes with the CPU and then send only the result to the vertex shader you can translate, scale and rotate with only one vector matrix multiplication.
Rotate an object using a vertex shader
Jonas Bergman
Jaypee
I have got it to rotate which is excellent.
But what ive done is, im using rendermonkey and have created a new 4x4 matrix but not given it a semantic, and have hard coded in the values to rotate it 45 degrees.
This works but is there a semantic i can apply to the matrix so i dont need to hard code in the variables or is there generally a better more flexible way of doing it
Thank you
stuart
Luke Waters
You can read more about transform matrixes in the Direct3D documentation: http://msdn.microsoft.com/library/en-us/directx9_c/Transforms.asp frame=true