Why the bold portions?glPushMatrix()
glTranslate(-mainWidth, -1, 0)
glColor(1, 1, 1, 1)
glTexture(IMAGE_DIRNAME .. "ResComIcon.png")
glTexRect(0, 0, 1, 1)
glTexture(false)
glPopMatrix()
Luagl question
Moderator: Moderators
Luagl question
Re: Luagl question
It makes a temporary version of the current matrix for you to work on, so you can Rotate, Scale, Translate, etc. without altering things past your block of code.
Re: Luagl question
think of it as a stack of matrices, and all your coordinates etc are multiplied by each one, by pushing a stack on the top you can do transformations etc, then 'undo' the stack by popping it, returning to the state you were before hand.
This way you don't need to do an extra set of operations in the opposite direction to return to the original rotation scale and displacement.
Keep in mind its a function of the fixed function pipeline
This way you don't need to do an extra set of operations in the opposite direction to return to the original rotation scale and displacement.
Keep in mind its a function of the fixed function pipeline