glOrtho aspect ratio question?

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

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.