title: OpenGL - How do you scroll a texture?
body: <p>I am creating a texture from a pango layout and mapping the texture to the screen using OpenGL and GLUT. I want to scroll the texture in the window. I'm not concerned with the controls to scroll, but how do I cause map the portion of the texture I want to see onto the screen? I assume I use glTranslate, but where do I apply it?</p>
  
  <p>Thanks in advance.</p>
  
  <p>Here is what I currently do:</p>
  
  <pre><code>glEnable(GL_TEXTURE_2D);
  
  {  
    glBegin(GL_QUADS);  
  
    {  
          glTexCoord2f(0.0f, 0.0f); glVertex2f(  0.0f+x,   0.0f+y);  
          glTexCoord2f(1.0f, 0.0f); glVertex2f(_width+x,   0.0f+y);  
          glTexCoord2f(1.0f, 1.0f); glVertex2f(_width+x, _height+y);  
          glTexCoord2f(0.0f, 1.0f); glVertex2f(  0.0f+x, _height+y);    
    }  
  
    glEnd();  
  }
  
  glFlush();    
  
  glDisable(GL_TEXTURE_2D);
  </code></pre>