Add high performance rendering mode which does not render the GUI every frame

This commit is contained in:
johni0702
2015-07-16 16:18:26 +02:00
parent cbdaff9e41
commit 787942aef2
3 changed files with 9 additions and 1 deletions

View File

@@ -516,6 +516,10 @@ public class GuiRenderSettings extends GuiScreen {
options.setIgnoreCameraRotation(ignoreCamDir.isChecked());
if (isCtrlKeyDown()) {
options.setHighPerformance(true);
}
if(commandInput.getText().trim().length() > 0) {
options.setExportCommand(commandInput.getText().trim());
}

View File

@@ -27,6 +27,7 @@ public final class RenderOptions {
private int height = Minecraft.getMinecraft().displayHeight;
// Highly advanced
private boolean highPerformance;
private String exportCommand = "ffmpeg";
private String exportCommandArgs = "";
@@ -55,6 +56,7 @@ public final class RenderOptions {
copy.skyColor = this.skyColor;
copy.width = this.width;
copy.height = this.height;
copy.highPerformance = this.highPerformance;
copy.exportCommand = this.exportCommand;
copy.exportCommandArgs = this.exportCommandArgs;
return copy;

View File

@@ -115,7 +115,9 @@ public class VideoRenderer implements RenderInfo {
@Override
public float updateForNextFrame() {
drawGui();
if (!options.isHighPerformance() || framesDone % fps == 0) {
drawGui();
}
updateTime(mc.timer, framesDone);