View Full Version : glOrtho aspect ratio question?
09-10-2000, 06:00 PM
I have noticed in certain cad appz that no matter if you resize the window the actual drawing keeps it's size and dimension's how do I recreate this?
Thanx in Advance http://www.opengl.org/discussion_boards/ubb/smile.gif
Just call glOrtho again with the new windowsize and coordinates.
gluOrtho2D(winpos.x, winsize.x+winpos.x, winpos.y, winpos.y+winsize.y)
Where winsize is the size of the current window you want to display the drawing in. winpos is the coordinate in worldspace where you want the top bottom corner of the window to start draw the drawing.
And also, don't forget to update the viewport with glViewport too.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.