jmg

03-25-2000, 09:01 PM

i'm just starting out trying to learn ogl but i need to know the grand scheme of things before this stuff clicks for me. the following is my thinking. please help me clear it up:

when you open a window ready for OpenGL to draw in it, you specify a coordinate system, like, "the center of the world shown in the window is (0,0,0)".

you then draw a shape, series of connected lines, etc.. by specifying vertices between glBegin() and glEnd() commands. the coordinates of these vertices are with respect to the world c.s. specified above.

you then tell ogl: where you're looking at the scene from (x,y,z) and whether it's a wide angle view or a close-up. this gets done after (?) the glBegin()/glEnd() business...

now suppose i want to move the specified object about the screen (err,... about the "world"). does ogl keep special 4x4 matrices around for this purpose? how often are the values of these matrices changed? suppose a scene with many different moving objects is being rendered; do each of these objects have their own transformation/translation matrices or is the same one matrix constantly changed and used one-by-one on each of the different objects?

and... i really have no idea how glPushMatrix() and glPopMatrix fit it to this whole thing.

thanks in advance for your comments. please begin sermon now. :-)

when you open a window ready for OpenGL to draw in it, you specify a coordinate system, like, "the center of the world shown in the window is (0,0,0)".

you then draw a shape, series of connected lines, etc.. by specifying vertices between glBegin() and glEnd() commands. the coordinates of these vertices are with respect to the world c.s. specified above.

you then tell ogl: where you're looking at the scene from (x,y,z) and whether it's a wide angle view or a close-up. this gets done after (?) the glBegin()/glEnd() business...

now suppose i want to move the specified object about the screen (err,... about the "world"). does ogl keep special 4x4 matrices around for this purpose? how often are the values of these matrices changed? suppose a scene with many different moving objects is being rendered; do each of these objects have their own transformation/translation matrices or is the same one matrix constantly changed and used one-by-one on each of the different objects?

and... i really have no idea how glPushMatrix() and glPopMatrix fit it to this whole thing.

thanks in advance for your comments. please begin sermon now. :-)