title: What is a right way to render repeated-background in libgdx?
body: <pre><code>public render(){
  ...
          while (y &lt; Height){
              while(x &lt; Width){
              batch.draw(bg,x,y,bg.getWidth()/ratio,bg.getHeight()/ratio);    
              x += bg.getWidth()/ratio;
              }
              y += bg.getHeight()/ratio;
              x = 0;
          }
  
  ...
  }
  </code></pre>
  
  <p>I have a pattern texture(bg) which will repeat to make a repeated background, so i make it repeated in render function (code above). At first it works very well, but when the ratio get bigger (so the sprite get smaller to fit the background), it become very laggy. Can you tell me a right way to make repeated background like above code without affect performance.</p>