# Opengl Es 1.1 Setting Different Transformations For Different Parts of Array

I have the following code:

glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

glPushMatrix();
glTranslatef(.03f * state, 0.0f, 0.0f);

state = 0;

glDrawArrays(GL_TRIANGLES, 0, LOC);

glPopMatrix();


I pop the matrix at the end so that I can apply a different transformation to a different part of the array. The problem is, when glPopMatrix() is present at the end of this code, the object drawn keeps wiggling instead of moving like its supposed to.

Note: State is set somewhere out of the loop and does not cause the draw function to stop working (as the function works without glPopMatrix()).

I can't comment, and you did not supply enough information. From what I can see though, state never changes, since you set it to 0 in the display loop. Thus, the object will not move.