   Transformations problem
  I have problem with seperating various transformations from different objects (so that they affect only objects I want and leave the rest in piece). My OpenGL main rendering loop looks something like this:{glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity();//some initial stuff//position the camera:glRotatef(lookupdown,1.0f,0,0); //left/rightglRotatef(sceneroty,0,1.0f,0); //up/downglTranslatef(xp, yp, zp); //forward/backward//draw the levelglScalef(...) //i need to scale my modelglTranslatef(...) //try to move my modelDrawModel1();glScalef(...)  //scaling 2nd modelglTrsnslatef(...)  //moving 2nd objectDrawModel2();}The problem is that transformations for the first model affect also the second model and rest of stuff. I tried to put glPushMatrix(), glPopMatrix() and glLoadIdentity() and it didn''t work also, but maybe I didn''t do it right way. If someone know solution to this I would be gratefuk.Thanks in advance,Olek 
  {glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity();//some initial stuff//position the camera:glRotatef(lookupdown,1.0f,0,0); //left/rightglRotatef(sceneroty,0,1.0f,0); //up/downglTranslatef(xp, yp, zp); //forward/backwardglPushMatrix();//draw the levelglScalef(...) //i need to scale my modelglTranslatef(...) //try to move my modelDrawModel1();glPopMatrix();glPushMatrix();glScalef(...) //scaling 2nd modelglTrsnslatef(...) //moving 2nd objectDrawModel2();glPopMatrix();}i put spaces between the parts that i changed   "A soldier is a part of the 1% of the population that keeps the other 99% free"  - Lt. Colonel Todd, 1/38th Infantry, Ft. Benning, GA   [edited by - ncsu121978 on February 6, 2004 6:59:30 AM]