I'm not sure if I correctly understand 3D transformations in OpenGL. Let's assume I'm using the typical matrix stack.
It seems like you move the world X units over, drop in a bag of verts (a mesh) and move the world back by popping the matrix off the stack, then you repeat the process to place another model?
Say I wanted to place a model at (10, 0, 0)
and another at (0, 10, 0)
. I think I would...
PUSH move(10,0,0);
DRAW model A;
POP;
PUSH move(0,10,0);
DRAW model B;
POP;
Some questions come to mind, like for example what does loading an identity matrix do in the stack?
Am I right to assume that these operations in effect move the world around, then you draw the mesh at 0,0,0 in world space when you've moved the world to your liking?
Or is it the other way around, does GL "apply" the matrix stack to your mesh as you draw it?
Thanks, -Cody