title: libgdx ShapeRenderer renders multiple times with moving camera
body: <p>I decided to use Libgdx <code>ShapeRenderer</code> for drawing polygons. I wanted to see how efficient this is and let the camera go through the x-axis while rendering, but something strange happened, see this picture:</p>
  
  <p><img src="https://i.stack.imgur.com/uvA75.png" alt="http://img255.imageshack.us/img255/2523/testfl.png"></p>
  
  <p>On the right side, I didn't move the camera, but on the left I moved the camera via </p>
  
  <pre><code>camera.translate(0.1f, 0);
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>public void setSize (int width, int height) {
      float aspectRatio = (float) width / (float) height;
      camera = new OrthographicCamera(30f * aspectRatio, 30f);
  }
  public void render() {
      camera.update();
      shapeRenderer.setProjectionMatrix(camera.combined);
      shapeRenderer.begin(ShapeType.Line);        
      shapeRenderer.identity();
      camera.translate(0.1f, 0);      
      shapeRenderer.setColor(0, 0, 1, 1);
      shapeRenderer.polygon(new float[] {0,0,5,5,5,2.5f, 10,12.5f, 10,0});                
      shapeRenderer.end();
  }
  </code></pre>
  
  <p>I don't know what the problem is, but I think it doesn't delete the image below it.</p>