I am trying to figure out how to maintain an objects size when resizing a window?
ex. A rectangle is 40 pixels high and 40 pixels wide when my window is 600x600. I want it to be 40 pixels high and 40 pixels wide when I shrink the window to 300x300.
If you’re doing something 2d like a gui there is a much easier way. call gluOrtho2D(width/-2, width/2, height/-2, height/2)where width and height are the window dimensions in pixels. Then each vertex should approximately map to each pixel. It should exactly map to each pixel if the width and height are equal to the renderable space of the window and both are even numbers.