• Advertisement
Sign in to follow this  

[DX10] 2D Camera Control

This topic is 2437 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

I've managed to get my textured quads displaying properly but I'm not sure which DX functions I should be using for my camera control. After reading many topics here, and elsewhere there was a recommendation for the use of the ortho projection matrix. However since this flattens the z axis I don't seem to understand how to get zooming to work naturally. This also presents the simple issue of panning the view, since the D3DXMatrixOrthoLH function doesn't have any origin parameters.

Should I be using perspective or ortho projections for 2D views, I guess is the answer I'm looking for.

Share this post


Link to post
Share on other sites
Advertisement
So while I have not sat idly by awaiting an answer spoon fed to me, I have made at least some headway. I have further questions (of course :).

So I'm using D3DXMatrixLookAtLH to create my "view" matrix, and D3DXMatrixOrthoLH to create my "perspective" matrix.


I've been able to pan adjusting the "eye" parameter which makes sense to me, however I am still unable to scale. I can "fake" or effectively scale changing the volume dimension parameters of D3DXMatrixOrthoLH. I'm not sure if this is the way to do it, or if there is a better logical approach.

Any tips?

Share this post


Link to post
Share on other sites
Hidden
So while I have not sat idly by awaiting an answer spoon fed to me, I have made at least some headway. I have further questions (of course :).

So I'm using D3DXMatrixLookAtLH to create my "view" matrix, and D3DXMatrixOrthoLH to create my "perspective" matrix.


I've been able to pan adjusting the "eye" parameter which makes sense to me, however I am still unable to scale. I can "fake" or effectively scale changing the volume dimension parameters of D3DXMatrixOrthoLH. I'm not sure if this is the way to do it, or if there is a better logical approach.

Any tips?

Share this post


Link to post
Sign in to follow this  

  • Advertisement