Separate rendering into its own module

This commit is contained in:
johni0702
2016-06-14 17:01:32 +02:00
parent 65cfdd13ec
commit 25582b6a51
68 changed files with 1822 additions and 2635 deletions

View File

@@ -0,0 +1,22 @@
package com.replaymod.render.frame;
import com.replaymod.render.rendering.Frame;
import lombok.Getter;
import org.apache.commons.lang3.Validate;
public class StereoscopicOpenGlFrame implements Frame {
@Getter
private final OpenGlFrame left, right;
public StereoscopicOpenGlFrame(OpenGlFrame left, OpenGlFrame right) {
Validate.isTrue(left.getFrameId() == right.getFrameId(), "Frame ids do not match.");
Validate.isTrue(left.getByteBuffer().remaining() == right.getByteBuffer().remaining(), "Buffer size does not match.");
this.left = left;
this.right = right;
}
@Override
public int getFrameId() {
return left.getFrameId();
}
}