Original Post
Hello all!
I have a simple question with a simple (I hope) answer. If I use the following code.. ("borrowed" and modified from another post)
.. I get a situation where the upper left corner has coords.
(-0.5,0.5) and the lower right corner has (0.5,-0.5). However, I want the upper left corner to have coords. (0.0,0.0) and the lower right (1.0,1.0). How do I do this?
D3DXMATRIX mat; //Projection Matrix D3DXMatrixOrthoLH(&mat, 1.0f, 1.0f, 0.0f, 1.0f); m_pDevice->SetTransform(D3DTS_PROJECTION, &mat); //World Matrix D3DXMatrixIdentity(&mat); m_pDevice->SetTransform(D3DTS_WORLD, &mat); //View Matrix D3DXMatrixLookAtLH(&mat, &D3DXVECTOR3(0.0f, 0.0f, -0.5f), &D3DXVECTOR3(0.0f, 0.0f, 0.0f), &D3DXVECTOR3(0.0f, 1.0f, 0.0f)); m_pDevice->SetTransform(D3DTS_VIEW, &mat);