I thought that the screen should be done like this glOrtho(0.0, 1.0f, 0.0f, 1.0f, -1.0f, 1.0f) . But then the coordinates for the pixel need to be set to 0.001 ... and it is not clear whether there will be the same image at different resolutions. I just want to know how they do it for 2d and 3d the same way?
|
ortho(0, ширина экрана, 0, высота экрана, -1, 1), and then the coordinates will be immediately measured in pixels. You can repeat these calculations without the help of the matrices yourself. - HolyBlackCat