GL_PROJECTION and GL_MODELVIEW.
I know there are others, but I, conceptually, can't figure out what the difference between any of them are. When you load the identity matrix after setting the mode, how is the identity matrix any different based on the mode?
One could say that the GL_PROJECTION
is for setting up the camera as what it's like, wide lens etc and one could say that GL_MODELVIEW
is for setting up the object that is to be drawn, like size and place in space etc.
To position the camera look at the gluLookAt function...
The matrix modes do not change the matrix itself, so identity matrix is identity matrix everywhere.
The matrix modes change which matrix the following commands operate on. That is, whether any subsequent commands work with the projection matrix, or with model*view matrix, or with texture matrices etc.
This might sound a bit confusing, but it's one of OpenGL's design decisions - there's a bunch of commands that operate on some state or object, and only other state settings determine which object exactly they operate on.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With