Hi everyone!
I need some help here... I am trying to write a D3D-application which renders different objects depending on choises from a menu..
I just want to know:
How do I change the inbuilt( ) coordinate system in d3dx to a more standard one:
like 400,300 would be the center of the screen (using 800x600 px resolution)
any help or redirection would be appriciated!

Coordinate System
carlsonad
Not true Daniel
When you define your vertex format (FVF) you can specify D3DFVF_XYZRHW which tells D3D to use screen coords for the vertices instead of "model" coords. So you might have a vertex structure like:
struct MYVERTEX
{
float x; // 0 to MAXSCREENWIDTH
float y; // 0 to MAXSCREENHEIGHT
float z; // 0.0f
float rhw; // 1.0f
D3DCOLOR colour; // 0xARGB
};
The rhw stands for "reciprocal of homogenous W" (obvious eh !) and should always be 1.0f. The z field is not used in screen coords and should be set to 0.0f. x and y are the standard Windows screen coords with x increasing left to right and y increasing top to bottom.
Set your FVF with:
DWORD D3DFVF_MYVERTEX = D3DFVF_XYZRHW | D3DFVF_DIFFUSE;
pd3d9device->SetFVF(D3DFVF_MYVERTEX);
The D3D9 SDK tutorial goes into this in more detail.
20thCB
Imesh
They have the same structure as 20thCentury's MYVERTEX structure
For a C# example, look at Tutorial #2 in the sdk.
mtupker
Danny Chan
is there a math formula that I can use to place objects in world space to make sure they are spaced out right, all the objects will be the same size.