My purpose is to render the scene 2 times with different camera per frame, the first rendering will render to full screen, the second rendering will render to a smaller(1/4w、1/4h of the screen). But my code seems useless(the result seems like which don't do the second rendering).
private void init(){
mTexture = new Texture(256, 128);
mTexture.setMipmap(false);
TextureManager.getInstance().addTexture("rt", mTexture);
}
private void update(World world, FrameBuffer frameBuffer){
int screenWidth = 800;
int screenHeight = 480;
//first rendering
world.renderScene(frameBuffer);
world.draw(frameBuffer);
//second rendering
frameBuffer.setRenderTarget(mTexture);
world.renderScene(frameBuffer);
world.draw(frameBuffer);
frameBuffer.blit(mTexture, 0, 0, 0, 0, screenWidth/4, screenHeight/4, false);
frameBuffer.removeRenderTarget();
}