View Full Version : Different Projections in same window
03-15-2001, 12:46 AM
Can we apply different projections in same window.
For eg. I have to draw an object with orthogonal projection and rest of the scene with perspective projection. Is it possible.
How do I do it
Of course it's possible. Just rebuild the projectionmatrix before drawing the different objects. Set an orthographic matrix before drawing the ortho-objects, and a perspective matrix before drawing the perspective-objects.
glFrustum(...); // or gluPerspective(...);
03-16-2001, 09:32 AM
If you want the ortho. and perp. stuff to be in a seperate quadrant to make an editor or such like also change the viewport (glViewport) and use a stencil test to the same area to stop commands like glClear effect the whole screen and not just the viewport. I have some code if you want.(email me if you want)
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.