Quote Originally Posted by chronozphere
I see you transforming the vertices (scaling them) before the are put into the vertexbuffer.
This is not the most efficient way of dealing with transformations.
Matrices are a lot more efficient. Take a look at this:

http://msdn2.microsoft.com/en-us/library/bb206269.aspx

Matrices describe linear transformations (translations, rotations, scale and some other things).
I think you need to study them first... they are not as easy as XY coords.

You can set world, view and projection matrices. In this case, you probably want to set the world matrix. You can set the world matrix as follows:

[pascal]
D3DDevice.SetTransform( D3DTS_WORLD, MyWorldMatrix )
[/pascal]

This is probably what you want:

[pascal]
//Scale is a single, the scale factor
//Scalemat is a TD3Dmatrix

D3DXmatrixScaling( ScaleMat, Scale, Scale , 1);

D2DDevice.SetTransform( D3DTS_WORLD, Scalemat );
[/pascal]

If you want to use multiple transformations (like Scaling and Translation) you need to multiply the matrices with D3DXMatrixMultiply.

Hope this helps.
i believe that your code only work with orthogonal camera, because i'm using a vertex with D3DFVF_XYZRHW. with this i think that D3DX transformations dont will work...