title: Libgdx - FrameBuffer rendering and FitViewport
body: <p>I use ortho camera and FitViewport at my project.</p>
  
  <p>In my render() method i create a fremeBuffer to store actual state of my game, then create a pixmap of that buffer and finally i set a new shader and do my postprocess stuff with that frame:</p>
  
  <pre><code>//--- render frame to buffer
  screenBuffer.begin();
  camera.update();
  Gdx.gl.glClearColor(1, 0, 0, 1);
  Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
  batch.setProjectionMatrix(camera.combined);
  batch.begin();
  batch.draw(img, 0, 0);
  batch.end();
  stage.draw();
  //--- create pixmap from that buffer
  pixmap = ScreenUtils.getFrameBufferPixmap(0, 0,screenBuffer.getWidth(), screenBuffer.getHeight());
  batch.flush();
  screenBuffer.end();
  //--- create texture from pixmap   
  renderedScreenTexture = new Texture(pixmap);
  //--- finally render frame with postprocess shader
  camera.update();
  Gdx.gl.glClearColor(1, 0, 0, 1);
  Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
  batch.setShader(monoShader);
  batch.setProjectionMatrix(camera.combined);
  batch.begin();
  batch.draw(renderedScreenTexture, 0,0);
  batch.draw(renderedScreenTexture, 0, 0, 640, 320, 0, 0, 640, 320, false, true);
  batch.end();
  </code></pre>
  
  <p>At my resize method I have:</p>
  
  <pre><code>viewport.update(width, height);
  camera.position.set(camera.viewportWidth / 2,camera.viewportHeight / 2, 0);
  </code></pre>
  
  <p>The problem is that after resizing a window FitViewport doesen't work. 
  When i remove a creating frameBuffer from render method FitViewport works fine.
  Can anybody tell me what is wrong with my code or whole concept?</p>