Files
ReplayModCinematic/src/main/java/com/replaymod/render/frame/OpenGlFrame.java
Jonas Herzig aee486c4f3 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?).
2020-10-03 14:50:44 +02:00

37 lines
917 B
Java

package com.replaymod.render.frame;
import com.replaymod.render.rendering.Frame;
import de.johni0702.minecraft.gui.utils.lwjgl.ReadableDimension;
import java.nio.ByteBuffer;
public class OpenGlFrame implements Frame {
private final int frameId;
private final ReadableDimension size;
private final int bytesPerPixel;
private final ByteBuffer byteBuffer;
public OpenGlFrame(int frameId, ReadableDimension size, int bytesPerPixel, ByteBuffer byteBuffer) {
this.frameId = frameId;
this.size = size;
this.bytesPerPixel = bytesPerPixel;
this.byteBuffer = byteBuffer;
}
public int getFrameId() {
return this.frameId;
}
public ReadableDimension getSize() {
return this.size;
}
public int getBytesPerPixel() {
return bytesPerPixel;
}
public ByteBuffer getByteBuffer() {
return this.byteBuffer;
}
}