View Full Version : Rotating 2D and changing size?

01-30-2016, 04:58 AM
I can't understand why OpenGL uses range [-1...1] for local coords. For example, if I render square texture on viewport 800x600 it looks like rectangle. Of course I can change vertices coords in a way to fit screen dimensions ratio and it will be square again. But when I rotate it by, for example 90 degs it will again mess up. So... the main problem is rotating without changing size and I would also be grateful to someone to explain to me why is that [-1 ... 1].

01-30-2016, 10:25 AM
You need to set a suitable projection matrix based upon the window dimensions. Any introductory tutorial should explain this.