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?).
37 lines
917 B
Java
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;
|
|
}
|
|
}
|