test worked

This commit is contained in:
2026-06-30 11:44:24 +04:00
parent a4c8dafa07
commit 646577e97f
9 changed files with 302 additions and 1 deletions

View File

@@ -0,0 +1,39 @@
package com.replaymod.render.frame;
import com.replaymod.render.rendering.Frame;
import org.apache.commons.lang3.Validate;
public class RealLensOpenGlFrame implements Frame {
private final OpenGlFrame[] frames;
public RealLensOpenGlFrame(OpenGlFrame[] frames) {
Validate.notNull(frames, "frames");
Validate.isTrue(frames.length > 0, "frames must not be empty");
int frameId = frames[0].getFrameId();
int remaining = frames[0].getByteBuffer().remaining();
for (OpenGlFrame frame : frames) {
Validate.isTrue(
frame.getFrameId() == frameId,
"Frame ids do not match."
);
Validate.isTrue(
frame.getByteBuffer().remaining() == remaining,
"Buffer sizes do not match."
);
}
this.frames = frames;
}
@Override
public int getFrameId() {
return frames[0].getFrameId();
}
public OpenGlFrame[] getFrames() {
return frames;
}
}