Archived

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

Transformations - D3D

This topic is 5986 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Folks, I am trying to define my viewport in D3D to be specific coordinates. What I mean by that is, I create a window which is 640x480. Then I initialize D3D. However I want D3D to be 0 to 100, no matter which resoloution I change it to. In OpenGL I would use: void glOrtho( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far ); However, in D3D I am not sure which matrix to change (View or World or Projection), and then which value(s) in the matrix to change. What I need to due is to set the left , right, top, bottom values of the viewport. Thanks in Advance for your help! MikeH

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
D3DVIEWPORT8 ViewData = { X, Y, Width, Height, MinZ, MaxZ };

pd3dDevice->SetViewport(&ViewData);

Share this post


Link to post
Share on other sites