Scroll below to see the newest Q&As. Some of the earlier questions regard later OpenGL versions and vise-versa, so if you’re looking at this topic to see an answer, make sure you look around. It’s a little muddled up.
Old question
I wasn’t really sure where to start with OpenGL so I had a look at SHC’s tutorials and started there. Hopefully I’m wording this correctly (a lot of my confusion is with the wording of things).
Let me start off with what I think I know:
- Everything is done in a line in the order you call functions
- The modelview matrix is used to manipulate objects in the world
- The projection matrix adjusts the view of the camera
- You use the glMatrixMode() function to select the matrix you want to manipulate
- The glLoadIdentity() function resets the matrix to its original state
- You need to use glOrtho() to set up an orthographic projection to view the modelview matrix
- You manipulate a matrix between the glPushMatrix() and glPopMatrix() functions
- The glTranslatef() function moves the modelview matrix position
- You draw vertices between the glBegin() and glEnd() function. The parameter of glBegin() is the shape you want to draw.
- The glViewport() function resizes the orthographic camera
I’ve probably got half that wrong and I’d really appreciate if someone could tell me exactly what I’ve got wrong and in the simplest possible way you can think of, the correct definitions.
Also I have a question:
Why are modelview and projection both matrices. I see a lot of references to the modelview matrix but I don’t understand what makes it a matrix. I also have seen references to the matrix stacks. I understand what a stack is, but how are these processed?
Thanks in advance to anyone who helps me. This is confusing. ???