Overhaul the config and start adding summary options

also:
- add DH vs MC lighting engine option
- add a toggle for wireframe rendering
This commit is contained in:
James Seibel
2023-06-07 22:59:26 -05:00
parent add6ee6f11
commit f4ece1816d
46 changed files with 1244 additions and 1199 deletions
@@ -24,7 +24,7 @@ package com.seibel.lod.api.enums.config;
* FANCY,
*
* @author Leetom
* @version 2022-7-1
* @version 2023-6-7
*/
public enum ELightGenerationMode
{
@@ -32,9 +32,8 @@ public enum ELightGenerationMode
// when adding items up the API minor version
// when removing items up the API major version
/** Fake light values using a height map */
FAST,
DISTANT_HORIZONS,
MINECRAFT
/** Run the lighting engine though the chunk to generate proper light values */
FANCY
}
@@ -21,10 +21,10 @@
package com.seibel.lod.api.enums.config;
/**
* AUTO, <br>
* NAME_ONLY, <br>
* NAME_IP, <br>
* NAME_IP_PORT, <br> <br>
* NAME_IP_PORT, <br>
* NAME_IP_PORT_MC_VERSION, <br> <br>
*
* Determines how the multiplayer folders should be named.
*
@@ -38,12 +38,6 @@ public enum EServerFolderNameMode
// when removing items up the API major version
/**
* NAME_IP for LAN connections <Br>
* NAME_IP_PORT for all others
*/
AUTO,
/** Only use the server name */
NAME_ONLY,
@@ -0,0 +1,45 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 James Seibel
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.api.enums.config.quickOptions;
/**
* CUSTOM, <br><br>
*
* MINIMUM, <br>
* LOW, <br>
* MEDIUM, <br>
* HIGH, <br>
* EXTREME, <br>
*/
public enum EQuickQuality
{
// Reminder:
// when adding items up the API minor version
// when removing items up the API major version
CUSTOM,
MINIMUM,
LOW,
MEDIUM,
HIGH,
EXTREME;
}
@@ -0,0 +1,45 @@
/*
* This file is part of the Distant Horizons mod (formerly the LOD Mod),
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2022 James Seibel
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.seibel.lod.api.enums.config.quickOptions;
/**
* CUSTOM, <br><br>
*
* MINIMAL_IMPACT, <br>
* LOW_IMPACT, <br>
* BALANCED, <br>
* FAST_LOADING, <br>
* I_PAID_FOR_THE_WHOLE_CPU, <br>
*/
public enum EQuickThread
{
// Reminder:
// when adding items up the API minor version
// when removing items up the API major version
CUSTOM,
MINIMAL_IMPACT,
LOW_IMPACT,
BALANCED,
FAST_LOADING,
I_PAID_FOR_THE_WHOLE_CPU;
}
@@ -20,20 +20,15 @@
package com.seibel.lod.api.enums.rendering;
/**
* OFF, <br>
* SHOW_WIREFRAME, <br>
* SHOW_DETAIL, <br>
* SHOW_DETAIL_WIREFRAME, <br>
* SHOW_GENMODE, <br>
* SHOW_GENMODE_WIREFRAME, <br>
* SHOW_OVERLAPPING_QUADS, <br>
* SHOW_OVERLAPPING_QUADS_WIREFRAME, <br>
* SHOW_RENDER_SOURCE_FLAG, <br>
* SHOW_RENDER_SOURCE_FLAG_WIREFRAME, <br>
* OFF, <br>
* SHOW_DETAIL, <br>
* SHOW_GENMODE, <br>
* SHOW_OVERLAPPING_QUADS, <br>
* SHOW_RENDER_SOURCE_FLAG, <br>
*
* @author Leetom
* @author James Seibel
* @version 2022-7-2
* @version 2023-6-7
*/
public enum EDebugMode
{
@@ -44,68 +39,40 @@ public enum EDebugMode
/** LODs are rendered normally */
OFF,
/** LOD draws in wireframe. */
SHOW_WIREFRAME,
/** LOD colors are based on their detail */
SHOW_DETAIL,
/** LOD colors are based on their detail, and draws in wireframe. */
SHOW_DETAIL_WIREFRAME,
/** LOD colors are based on their gen mode. */
SHOW_GENMODE,
/** LOD colors are based on their gen mode, and draws in wireframe. */
SHOW_GENMODE_WIREFRAME,
/** Only draw overlapping LOD quads. */
SHOW_OVERLAPPING_QUADS,
/** Only draw overlapping LOD quads, and draws in wireframe. */
SHOW_OVERLAPPING_QUADS_WIREFRAME,
/** LOD colors are based on renderSource flags. */
SHOW_RENDER_SOURCE_FLAG,
/** LOD colors are based on renderSource flags, and draws in wireframe. */
SHOW_RENDER_SOURCE_FLAG_WIREFRAME;
/** returns the next debug mode */
// Deprecated: use DebugMode.next() instead
@Deprecated
public EDebugMode getNext()
SHOW_RENDER_SOURCE_FLAG;
public static EDebugMode next(EDebugMode type)
{
return next(this);
}
public static EDebugMode next(EDebugMode type) {
switch (type) {
case OFF: return SHOW_WIREFRAME;
case SHOW_WIREFRAME: return SHOW_DETAIL;
case SHOW_DETAIL: return SHOW_DETAIL_WIREFRAME;
case SHOW_DETAIL_WIREFRAME: return SHOW_GENMODE;
case SHOW_GENMODE: return SHOW_GENMODE_WIREFRAME;
case SHOW_GENMODE_WIREFRAME: return SHOW_OVERLAPPING_QUADS;
case SHOW_OVERLAPPING_QUADS: return SHOW_OVERLAPPING_QUADS_WIREFRAME;
case SHOW_OVERLAPPING_QUADS_WIREFRAME: return SHOW_RENDER_SOURCE_FLAG;
case SHOW_RENDER_SOURCE_FLAG: return SHOW_RENDER_SOURCE_FLAG_WIREFRAME;
switch (type)
{
case OFF: return SHOW_DETAIL;
case SHOW_DETAIL: return SHOW_GENMODE;
case SHOW_GENMODE: return SHOW_OVERLAPPING_QUADS;
case SHOW_OVERLAPPING_QUADS: return SHOW_RENDER_SOURCE_FLAG;
default: return OFF;
}
}
public static EDebugMode previous(EDebugMode type) {
switch (type) {
case OFF: return SHOW_RENDER_SOURCE_FLAG_WIREFRAME;
case SHOW_RENDER_SOURCE_FLAG_WIREFRAME: return SHOW_RENDER_SOURCE_FLAG;
case SHOW_RENDER_SOURCE_FLAG: return SHOW_OVERLAPPING_QUADS_WIREFRAME;
case SHOW_OVERLAPPING_QUADS_WIREFRAME: return SHOW_OVERLAPPING_QUADS;
case SHOW_OVERLAPPING_QUADS: return SHOW_GENMODE_WIREFRAME;
case SHOW_GENMODE_WIREFRAME: return SHOW_GENMODE;
case SHOW_GENMODE: return SHOW_DETAIL_WIREFRAME;
case SHOW_DETAIL_WIREFRAME: return SHOW_DETAIL;
case SHOW_DETAIL: return SHOW_WIREFRAME;
public static EDebugMode previous(EDebugMode type)
{
switch (type)
{
case OFF: return SHOW_RENDER_SOURCE_FLAG;
case SHOW_RENDER_SOURCE_FLAG: return SHOW_OVERLAPPING_QUADS;
case SHOW_OVERLAPPING_QUADS: return SHOW_GENMODE;
case SHOW_GENMODE: return SHOW_DETAIL;
default: return OFF;
}
}
@@ -46,12 +46,6 @@ public interface IDhApiWorldGenerationConfig extends IDhApiConfigGroup
/** Defines to what level fake chunks will be generated. */
IDhApiConfigValue<EDhApiDistantGeneratorMode> getDistantGeneratorMode();
/** Defines how generated fake chunks will be lit. */
IDhApiConfigValue<ELightGenerationMode> getLightingMode();
/** Defines the order in which fake chunks will be generated. */
IDhApiConfigValue<EGenerationPriority> getGenerationPriority();
/**
* Defines what blocks will be ignored when generating LODs. <br><br>
*
@@ -81,7 +81,7 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup
* 2 = blending of 5x5 <br>
* ... <br>
*/
IDhApiConfigValue<Integer> getBiomeBlending();
// IDhApiConfigValue<Integer> getBiomeBlending();
@@ -89,15 +89,6 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup
// advanced graphic settings //
//===========================//
/** If directional culling is disabled fake chunks will be rendered behind the camera. */
IDhApiConfigValue<Boolean> getDisableDirectionalCulling();
/** Determines how fake chunks are rendered in comparison to vanilla MC's chunks. */
IDhApiConfigValue<EVanillaOverdraw> getVanillaOverdraw();
/** Modifies how far the vanilla overdraw is rendered in chunks. */
IDhApiConfigValue<Integer> getVanillaOverdrawOffset();
/**
* If enabled the near clip plane is extended to reduce
* overdraw and improve Z-fighting at extreme render distances. <br>
@@ -130,9 +121,6 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup
/** If enabled vanilla chunk rendering is disabled and only fake chunks are rendered. */
IDhApiConfigValue<Boolean> getEnableLodOnlyMode();
/** Defines how often the geometry should be rebuilt when the player moves. */
IDhApiConfigValue<EBufferRebuildTimes> getGeometryRebuildFrequency();
}
@@ -87,7 +87,7 @@ public interface IDhApiGraphicsFogConfig extends IDhApiConfigGroup
IDhApiConfigValue<Double> getFogMaxThickness();
/** Defines how the fog changes in thickness. */
IDhApiConfigValue<EFogFalloff> getFogFalloff();
IDhApiConfigValue<EFogFalloff> getFarFogFalloff();
/** Defines the fog density. */
IDhApiConfigValue<Double> getFogDensity();