Add PBOs and PBO support for default rendering

This commit is contained in:
johni0702
2015-07-16 16:19:20 +02:00
parent 787942aef2
commit 6a5b6fdac5
5 changed files with 270 additions and 6 deletions

View File

@@ -54,7 +54,7 @@ public abstract class OpenGlFrameCapturer<F extends Frame, D extends CaptureData
return renderInfo.getFrameSize().getHeight();
}
private Framebuffer frameBuffer() {
protected Framebuffer frameBuffer() {
if (frameBuffer == null) {
frameBuffer = new Framebuffer(getFrameWidth(), getFrameHeight(), true);
}
@@ -82,6 +82,10 @@ public abstract class OpenGlFrameCapturer<F extends Frame, D extends CaptureData
frameBuffer().unbindFramebuffer();
popMatrix();
return captureFrame(frameId);
}
protected OpenGlFrame captureFrame(int frameId) {
GL11.glPixelStorei(GL11.GL_PACK_ALIGNMENT, 1);
GL11.glPixelStorei(GL11.GL_UNPACK_ALIGNMENT, 1);