Add .blend export

This commit is contained in:
Jonas Herzig
2018-03-03 14:31:10 +01:00
parent 78ad02bc84
commit 6794b58524
41 changed files with 3180 additions and 17 deletions

View File

@@ -1,13 +1,32 @@
package com.replaymod.render.rendering;
import com.replaymod.render.RenderSettings;
import com.replaymod.render.capturer.*;
import com.replaymod.render.frame.*;
import com.replaymod.render.blend.BlendFrameCapturer;
import com.replaymod.render.capturer.CubicOpenGlFrameCapturer;
import com.replaymod.render.capturer.CubicPboOpenGlFrameCapturer;
import com.replaymod.render.capturer.ODSFrameCapturer;
import com.replaymod.render.capturer.RenderInfo;
import com.replaymod.render.capturer.SimpleOpenGlFrameCapturer;
import com.replaymod.render.capturer.SimplePboOpenGlFrameCapturer;
import com.replaymod.render.capturer.StereoscopicOpenGlFrameCapturer;
import com.replaymod.render.capturer.StereoscopicPboOpenGlFrameCapturer;
import com.replaymod.render.frame.CubicOpenGlFrame;
import com.replaymod.render.frame.ODSOpenGlFrame;
import com.replaymod.render.frame.OpenGlFrame;
import com.replaymod.render.frame.RGBFrame;
import com.replaymod.render.frame.StereoscopicOpenGlFrame;
import com.replaymod.render.hooks.EntityRendererHandler;
import com.replaymod.render.processor.*;
import com.replaymod.render.processor.CubicToRGBProcessor;
import com.replaymod.render.processor.DummyProcessor;
import com.replaymod.render.processor.EquirectangularToRGBProcessor;
import com.replaymod.render.processor.ODSToRGBProcessor;
import com.replaymod.render.processor.OpenGlToRGBProcessor;
import com.replaymod.render.processor.StereoscopicToRGBProcessor;
import com.replaymod.render.utils.PixelBufferObject;
import lombok.experimental.UtilityClass;
import java.io.IOException;
@UtilityClass
public class Pipelines {
public static Pipeline newPipeline(RenderSettings.RenderMethod method, RenderInfo renderInfo, FrameConsumer<RGBFrame> consumer) {
@@ -22,6 +41,8 @@ public class Pipelines {
return newEquirectangularPipeline(renderInfo, consumer);
case ODS:
return newODSPipeline(renderInfo, consumer);
case BLEND:
throw new UnsupportedOperationException("Use newBlendPipeline instead!");
}
throw new UnsupportedOperationException("Unknown method: " + method);
}
@@ -76,4 +97,19 @@ public class Pipelines {
new ODSFrameCapturer(new EntityRendererHandler(settings), renderInfo, settings.getVideoWidth() / 4);
return new Pipeline<>(capturer, new ODSToRGBProcessor(settings.getVideoWidth() / 4), consumer);
}
public static Pipeline<RGBFrame, RGBFrame> newBlendPipeline(RenderInfo renderInfo) throws IOException {
RenderSettings settings = renderInfo.getRenderSettings();
FrameCapturer<RGBFrame> capturer = new BlendFrameCapturer(new EntityRendererHandler(settings), renderInfo);
FrameConsumer<RGBFrame> consumer = new FrameConsumer<RGBFrame>() {
@Override
public void consume(RGBFrame frame) {
}
@Override
public void close() throws IOException {
}
};
return new Pipeline<>(capturer, new DummyProcessor<>(), consumer);
}
}