SHARE
TWEET

Untitled

a guest Oct 28th, 2015 5 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         @Override
  2.         public void render(float delta) {
  3.                 buf.begin();
  4.                 Gdx.gl.glClearColor(0.6f, 0.8f, 0.2f, 1);
  5.                 Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
  6.                 viewport.update(viewportWidth, viewportHeight);
  7.                 stage.act(delta);
  8.                 stage.draw();
  9.                 viewport.update(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
  10.                 buf.end();
  11.                
  12.                 Texture t = buf.getColorBufferTexture();
  13.                 t.setFilter(TextureFilter.Linear, TextureFilter.Linear);
  14.                 t.unsafeSetFilter(TextureFilter.Linear, TextureFilter.Linear, true);
  15.                 Gdx.gl.glClearColor(0.6f, 0.8f, 0.2f, 1);
  16.                 Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
  17.                 batch.getProjectionMatrix().setToOrtho2D(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
  18.                 batch.begin();
  19.                 batch.draw(t, 0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), 0, 0, t.getWidth(), t.getHeight(), false, true);
  20.                 batch.end();
  21.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top