Sign in to follow this  
MrTheMan

Viewports

Recommended Posts

Hello, I'm creating a 3d modeling program, which is fine 'n all, but when trying to create a top, font and left viewport I'm having trouble. The viewports work fine (I just positioned the camera on top, in front of, and left of the model), but the problem is that they are still in perspective. Is there any way of getting this to work (making a left view really a left view, not just a perspective view from the left), without getting into using lines 'n stuff? Thanks in advance, -MrTheMan

Share this post


Link to post
Share on other sites
Well this does seem a little different, although I'm exactly sure what it does, and it's not really what I'm trying to achieve.

To clear thing up here are some images:

Perspective:


Orthogonal:


3dsmax (what I am trying to do):

Share this post


Link to post
Share on other sites
MrMan,
In OpenGL I just create four independent rendering contexts for each side. Three of them have orthographic projections and one of them is perspective. They are entirely there own windows, have their own HWND, WindowProc etc. Then I use some trickery to pretend that they are a part of the client window by using SetCapture and others and then translate from client to context coords. It is not hard as it sounds.

If your whole window is one entire context than you will have to do some tricks to change the projection and view matrix to where you are drawing (you do this by creating view ports). IT is why I preferred to have multiple contexts and than just use some GUI hacks to make the mouse believe it is in the client.

Does that help you?

Share this post


Link to post
Share on other sites
Nvm I set the LookAt vector at another height then the Eye vector, giving it this weird effect.
My mistake, thanks a lot for the solution :)

Share this post


Link to post
Share on other sites

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