OpenGL will then map these coordinates onto the viewport that was configured with glViewport. The bottom left corner will be at (-1, -1), and the top right corner will be at (1, 1). These coordinates range from -1 to +1 on each axis, regardless of the shape or size of the actual screen. OpenGL only requires that when all of your transformations are done, things should be in normalized device coordinates. Normalized device coordinatesĪt the heart of things, OpenGL 2.0 doesn’t really know anything about your coordinate space or about the matrices that you’re using. To better understand OpenGL’s matrices, and how and why we use them, we first need to understand the OpenGL coordinate space. This is a topic that I have been frequently confused by, myself, and I feel that it warrants further explanation. I often get questions related to OpenGL’s matrices: how do they work, how do they get built, and so forth.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |