drawBuffer(rttFormat, location, r, cam.getWidth() / 6.25);
}
public static void drawBuffer(final TextureStoreFormat rttFormat, final int location, final Renderer r,
final double size) {
final Camera cam = Camera.getCurrentCamera();
r.flushGraphics();
double locationX = cam.getWidth(), locationY = cam.getHeight();
bQuad.resize(size, (cam.getHeight() / (double) cam.getWidth()) * size);
if (bQuad.getLocalRenderState(RenderState.StateType.Texture) == null) {
final TextureState ts = new TextureState();
bufTexture = new Texture2D();
ts.setTexture(bufTexture);
bQuad.setRenderState(ts);
}
int width = cam.getWidth();
if (!MathUtils.isPowerOfTwo(width)) {
int newWidth = 2;
do {
newWidth <<= 1;
} while (newWidth < width);
bQuad.getMeshData().getTextureBuffer(0).put(4, width / (float) newWidth);
bQuad.getMeshData().getTextureBuffer(0).put(6, width / (float) newWidth);
width = newWidth;
}
int height = cam.getHeight();
if (!MathUtils.isPowerOfTwo(height)) {
int newHeight = 2;
do {
newHeight <<= 1;