Stop assuming that our render pipeline will only process RGB frames

For one, we have already switched to RGBA some time ago, so the name was
technically incorrect already.
But the main reason is that we'll want to use them for depth maps as well (and
potentially maybe even for HDR images if that's possible with canvas?).
This commit is contained in:
Jonas Herzig
2020-10-03 14:41:08 +02:00
parent 4c4c052d8a
commit aee486c4f3
19 changed files with 165 additions and 136 deletions

View File

@@ -53,7 +53,7 @@ public abstract class MultiFramePboOpenGlFrameCapturer<F extends Frame, D extend
pboBuffer.limit(pboBuffer.position() + frameBufferSize);
frameBuffer.put(pboBuffer);
frameBuffer.rewind();
frames[i] = new OpenGlFrame(framesDone - 2, frameSize, frameBuffer);
frames[i] = new OpenGlFrame(framesDone - 2, frameSize, 4, frameBuffer);
}
pbo.unmap();

View File

@@ -112,7 +112,7 @@ public abstract class OpenGlFrameCapturer<F extends Frame, D extends CaptureData
frameBuffer().endWrite();
buffer.rewind();
return new OpenGlFrame(frameId, new Dimension(getFrameWidth(), getFrameHeight()), buffer);
return new OpenGlFrame(frameId, new Dimension(getFrameWidth(), getFrameHeight()), 4, buffer);
}
protected void resize(int width, int height) {

View File

@@ -47,7 +47,7 @@ public class SimplePboOpenGlFrameCapturer extends OpenGlFrameCapturer<OpenGlFram
buffer.rewind();
pbo.unmap();
pbo.unbind();
frame = new OpenGlFrame(framesDone - 2, frameSize, buffer);
frame = new OpenGlFrame(framesDone - 2, frameSize, 4, buffer);
}
if (framesDone < renderInfo.getTotalFrames()) {