#### Archived

This topic is now archived and is closed to further replies.

# Question about device coordinate system

## Recommended Posts

Flack    130
Hello, I was following a simple tut on directx and I have a simple question. In the app, the origin of the device is located at the center of the device. Is it possible for me to have the origin be at the top-left corner of the screen so that if the vertex value is (0,0,0) it is mapped to the top-left corner instead of the center of the screen? Im new to this stuff so if im not clear plz let me know. -Flack

D3DXMATRIX identMat;D3DXMATRIX translation;float x=1.0f;float y=0.0f;float z=0.0f;// translate matrix, to new originD3DXMatrixTranslation( &translation, x, y, z);device->SetTransform( D3DTS_WORLD, &translation);// draw your object..// restore location using the identity matrix.D3DXMatrixIdentity( &identMat);device->SetTransform( D3DTS_WORLD,  &identMat );