DRY (Iris)ODSFrameCapturer
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package com.replaymod.render.capturer;
|
||||
|
||||
import com.mojang.blaze3d.platform.GlStateManager;
|
||||
import com.replaymod.render.rendering.Channel;
|
||||
import de.johni0702.minecraft.gui.utils.EventRegistrations;
|
||||
import com.replaymod.render.RenderSettings;
|
||||
@@ -20,12 +19,6 @@ import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.replaymod.core.versions.MCVer.popMatrix;
|
||||
import static com.replaymod.core.versions.MCVer.pushMatrix;
|
||||
import static com.replaymod.core.versions.MCVer.resizeMainWindow;
|
||||
import static org.lwjgl.opengl.GL11.GL_COLOR_BUFFER_BIT;
|
||||
import static org.lwjgl.opengl.GL11.GL_DEPTH_BUFFER_BIT;
|
||||
|
||||
public class ODSFrameCapturer implements FrameCapturer<ODSOpenGlFrame> {
|
||||
private static final Identifier vertexResource = new Identifier("replaymod", "shader/ods.vert");
|
||||
private static final Identifier fragmentResource = new Identifier("replaymod", "shader/ods.frag");
|
||||
@@ -166,25 +159,8 @@ public class ODSFrameCapturer implements FrameCapturer<ODSOpenGlFrame> {
|
||||
|
||||
@Override
|
||||
protected OpenGlFrame renderFrame(int frameId, float partialTicks, CubicOpenGlFrameCapturer.Data captureData) {
|
||||
resizeMainWindow(mc, getFrameWidth(), getFrameHeight());
|
||||
|
||||
pushMatrix();
|
||||
frameBuffer().beginWrite(true);
|
||||
|
||||
GlStateManager.clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT
|
||||
//#if MC>=11400
|
||||
, false
|
||||
//#endif
|
||||
);
|
||||
GlStateManager.enableTexture();
|
||||
|
||||
directionVariable.set(captureData.ordinal());
|
||||
worldRenderer.renderWorld(partialTicks, null);
|
||||
|
||||
frameBuffer().endWrite();
|
||||
popMatrix();
|
||||
|
||||
return captureFrame(frameId, captureData);
|
||||
return super.renderFrame(frameId, partialTicks, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user