Add high performance rendering mode which does not render the GUI every frame
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user