title: Scrolling in a Stage in Libgdx seems to be laggy
body: <p>So I am trying to implement scrolling using <a href="http://www.gamefromscratch.com/post/2013/11/06/LibGDX-Tutorial-7-Camera-basics.aspx" rel="nofollow">this tutorial</a> as a starting point.</p>
  
  <p>I am running the tests on a Desktop.</p>
  
  <p>I added an <code>ActionGestureListener</code> to the stage so I could call the <code>pan(...) function</code>.  It works, but when I try to scroll, it looks really laggy, sort of like it's "vibrating".</p>
  
  <p>What am I missing?</p>
  
  <p>Here is what I have so far:</p>
  
  <pre><code>public class Store extends ScreenAdapter {
  
  
      SpriteBatch spritebatch;
      Stage stage;
      Texture texture;
      Image image;
      Group background, foreground;
  
  
      @Override
      public void show() {
          spritebatch = new SpriteBatch();
          stage = new Stage();
          background = new Group();
          foreground = new Group();
          texture = new Texture("badlogic.jpg");
          image = new Image(texture);
  
          //Building background/foreground.
          background.addActor(image);
  
          //Adding to stage.
          stage.addActor(background);
          stage.addActor(foreground);
  
          stage.addListener(new ActorGestureListener() {
              // TODO Auto-generated method stub
  
              @Override
                  public void pan(InputEvent event, float x, float y, float deltaX, float deltaY) {
  
                  stage.getCamera().translate(-deltaX, -deltaY, 0);
                  stage.getCamera().update();
                  //System.out.println(x + ", " + y + ", " + "      " + deltaX + ", " + deltaY);
              }
          });
          Gdx.input.setInputProcessor(stage);
      }
  
  
      @Override
      public void render(float delta){
  
          Gdx.gl.glClearColor(1, 1, 1, 1);
          Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
          spritebatch.setProjectionMatrix(stage.getCamera().combined);
  
          spritebatch.begin();
          stage.draw();
          spritebatch.end();
      }
  
      @Override
      public void resize(int width, int height){
          System.out.println("resize() executed.");
          //stage.getViewport().update(width, height, true);
      }
  
  
      @Override
      public void dispose(){
          stage.dispose();
          texture.dispose();
          spritebatch.dispose();
      }
  }
  </code></pre>