title: What attributes do I need to push and pop in OpenGL?
body: <p>Here is a case, I want to do like that..</p>
  
  <pre><code>void func()
  {
          glDisable(GL_DEPTH_TEST);
          glDisable(GL_FOG);
          glDisable(GL_LIGHTING);
          glDisable(GL_TEXTURE_1D);
          glDisable(GL_TEXTURE_2D);
          glDepthFunc(GL_LEQUAL);
          glDepthRange (0.0, 0.999);
          glEnable(GL_LINE_SMOOTH);
          glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
          glEnable(GL_BLEND);
          glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
          glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
          glLineWidth(1.0f);
  
          glPushMatrix();
          {
              glTranslatef(pos.x, pos.y, pos.z);
              glRotatef(angle.x, 1.0f, 0.0f, 0.0f);
              glRotatef(angle.y, 0.0f, 1.0f, 0.0f);
              glRotatef(angle.z, 0.0f, 0.0f, 1.0f);
              draw();
  
          }
          glPopMatrix();
    }
  </code></pre>
  
  <p>I am pushing these atributes, but not sure, so just wanna know what attributes are OK with this function.</p>
  
  <pre><code>    glPushAttrib(GL_LINE_BIT | GL_TRANSFORM_BIT | GL_ENABLE_BIT | GL_LIGHTING_BIT | GL_CURRENT_BIT | GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
  
  func();
  
      glPopAttrib();
  </code></pre>