Answer the question
In order to leave comments, you need to log in
How to properly scale 2d objects in opengl?
Let's say I want to draw a square on the screen. If you use the standard orthographic projection, then with an aspect ratio of 1:1, the square will be a square, but when the window is stretched, it will be a rectangle. How to avoid it? Should I use a projection that can be measured in pixels to take a percentage of a side?
Answer the question
In order to leave comments, you need to log in
In my opinion, it's not about 2d, but just about the viewport. Most likely you need to "dig" in the direction of glOrtho . Example .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question