Sign in to follow this  
NeonLibra

[DX10] 2D Camera Control

Recommended Posts

NeonLibra    100
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
NeonLibra    100
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
NeonLibra    100
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this