Fix render API vs Engine enum
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package com.seibel.distanthorizons.api.enums.config;
|
||||
|
||||
/**
|
||||
* VULKAN, <br>
|
||||
* OPEN_GL, <br>
|
||||
*
|
||||
* @see EDhApiRenderingEngine
|
||||
*
|
||||
* @since API 7.0.0
|
||||
* @version 2026-3-10
|
||||
*/
|
||||
public enum EDhApiRenderingApi
|
||||
{
|
||||
VULKAN,
|
||||
OPEN_GL;
|
||||
|
||||
}
|
||||
+4
-4
@@ -1,16 +1,16 @@
|
||||
package com.seibel.distanthorizons.api.enums.config;
|
||||
|
||||
import com.seibel.distanthorizons.coreapi.ModInfo;
|
||||
|
||||
/**
|
||||
* AUTO, <br>
|
||||
* OPEN_GL, <br>
|
||||
* BLAZE_3D, <br><br>
|
||||
*
|
||||
* @since API 6.0.0
|
||||
* @see EDhApiRenderingApi
|
||||
*
|
||||
* @since API 7.0.0
|
||||
* @version 2026-3-10
|
||||
*/
|
||||
public enum EDhApiRenderApi
|
||||
public enum EDhApiRenderingEngine
|
||||
{
|
||||
AUTO,
|
||||
OPEN_GL,
|
||||
+2
-2
@@ -19,14 +19,14 @@
|
||||
|
||||
package com.seibel.distanthorizons.api.interfaces.override.rendering;
|
||||
|
||||
import com.seibel.distanthorizons.api.enums.config.EDhApiRenderApi;
|
||||
import com.seibel.distanthorizons.api.enums.config.EDhApiRenderingEngine;
|
||||
import com.seibel.distanthorizons.api.interfaces.override.IDhApiOverrideable;
|
||||
import com.seibel.distanthorizons.api.interfaces.render.IDhApiRenderProxy;
|
||||
|
||||
/**
|
||||
* <b>Note: </b><br>
|
||||
* This is only used if Distant Horizons'
|
||||
* {@link IDhApiRenderProxy#getRenderingApi()} returns {@link EDhApiRenderApi#OPEN_GL}
|
||||
* {@link IDhApiRenderProxy#getRenderingApi()} returns {@link EDhApiRenderingEngine#OPEN_GL}
|
||||
* and {@link IDhApiRenderProxy#isNativeRenderer()} returns true.
|
||||
* ie this is only used when DH is doing native OpenGL rendering,
|
||||
* if DH is using Blaze3D this interface will be ignored.
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@
|
||||
|
||||
package com.seibel.distanthorizons.api.interfaces.override.rendering;
|
||||
|
||||
import com.seibel.distanthorizons.api.enums.config.EDhApiRenderApi;
|
||||
import com.seibel.distanthorizons.api.enums.config.EDhApiRenderingEngine;
|
||||
import com.seibel.distanthorizons.api.interfaces.override.IDhApiOverrideable;
|
||||
import com.seibel.distanthorizons.api.interfaces.render.IDhApiRenderProxy;
|
||||
import com.seibel.distanthorizons.api.interfaces.render.IDhApiRenderableBoxGroup;
|
||||
@@ -31,7 +31,7 @@ import com.seibel.distanthorizons.api.objects.render.DhApiRenderableBoxGroupShad
|
||||
/**
|
||||
* <b>Note: </b><br>
|
||||
* This is only used if Distant Horizons'
|
||||
* {@link IDhApiRenderProxy#getRenderingApi()} returns {@link EDhApiRenderApi#OPEN_GL}
|
||||
* {@link IDhApiRenderProxy#getRenderingApi()} returns {@link EDhApiRenderingEngine#OPEN_GL}
|
||||
* and {@link IDhApiRenderProxy#isNativeRenderer()} returns true.
|
||||
* ie this is only used when DH is doing native OpenGL rendering,
|
||||
* if DH is using Blaze3D this interface will be ignored.
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@
|
||||
|
||||
package com.seibel.distanthorizons.api.interfaces.override.rendering;
|
||||
|
||||
import com.seibel.distanthorizons.api.enums.config.EDhApiRenderApi;
|
||||
import com.seibel.distanthorizons.api.enums.config.EDhApiRenderingEngine;
|
||||
import com.seibel.distanthorizons.api.interfaces.override.IDhApiOverrideable;
|
||||
import com.seibel.distanthorizons.api.interfaces.render.IDhApiRenderProxy;
|
||||
import com.seibel.distanthorizons.api.methods.events.sharedParameterObjects.DhApiRenderParam;
|
||||
@@ -28,7 +28,7 @@ import com.seibel.distanthorizons.api.objects.math.DhApiVec3f;
|
||||
/**
|
||||
* <b>Note: </b><br>
|
||||
* This is only used if Distant Horizons'
|
||||
* {@link IDhApiRenderProxy#getRenderingApi()} returns {@link EDhApiRenderApi#OPEN_GL}
|
||||
* {@link IDhApiRenderProxy#getRenderingApi()} returns {@link EDhApiRenderingEngine#OPEN_GL}
|
||||
* and {@link IDhApiRenderProxy#isNativeRenderer()} returns true.
|
||||
* ie this is only used when DH is doing native OpenGL rendering,
|
||||
* if DH is using Blaze3D this interface will be ignored.
|
||||
|
||||
+5
-5
@@ -19,7 +19,8 @@
|
||||
|
||||
package com.seibel.distanthorizons.api.interfaces.render;
|
||||
|
||||
import com.seibel.distanthorizons.api.enums.config.EDhApiRenderApi;
|
||||
import com.seibel.distanthorizons.api.enums.config.EDhApiRenderingApi;
|
||||
import com.seibel.distanthorizons.api.enums.config.EDhApiRenderingEngine;
|
||||
import com.seibel.distanthorizons.api.methods.events.abstractEvents.DhApiAfterDhInitEvent;
|
||||
import com.seibel.distanthorizons.api.objects.DhApiResult;
|
||||
|
||||
@@ -47,9 +48,8 @@ public interface IDhApiRenderProxy
|
||||
DhApiResult<Boolean> clearRenderDataCache();
|
||||
|
||||
/**
|
||||
* Returns which specific {@link EDhApiRenderApi}
|
||||
* Distant Horizons will use for rendering. <br>
|
||||
* Will not return {@link EDhApiRenderApi#AUTO}.<br>
|
||||
* Returns which specific {@link EDhApiRenderingApi}
|
||||
* Distant Horizons will use for rendering. <br><br>
|
||||
*
|
||||
* @throws IllegalStateException if no renderer has been bound yet,
|
||||
* wait till after {@link DhApiAfterDhInitEvent} has been fired
|
||||
@@ -57,7 +57,7 @@ public interface IDhApiRenderProxy
|
||||
* @see DhApiAfterDhInitEvent
|
||||
* @since API 7.0.0
|
||||
*/
|
||||
EDhApiRenderApi getRenderingApi() throws IllegalStateException;
|
||||
EDhApiRenderingApi getRenderingApi() throws IllegalStateException;
|
||||
/**
|
||||
* Returns true if the current renderer
|
||||
* is calling the base rendering API's method calls. <br>
|
||||
|
||||
@@ -812,15 +812,15 @@ public class Config
|
||||
.addListener(IgnoredDimensionCsvHandler.INSTANCE)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<EDhApiRenderApi> renderingApi = new ConfigEntry.Builder<EDhApiRenderApi>()
|
||||
.set(EDhApiRenderApi.AUTO)
|
||||
public static ConfigEntry<EDhApiRenderingEngine> renderingEngine = new ConfigEntry.Builder<EDhApiRenderingEngine>()
|
||||
.set(EDhApiRenderingEngine.AUTO)
|
||||
.comment(""
|
||||
+ "Requires a restart to change. \n"
|
||||
+ " \n"
|
||||
+ "Options: \n"
|
||||
+ EDhApiRenderApi.AUTO + " - changes based on the most likely API for that MC version \n"
|
||||
+ EDhApiRenderApi.OPEN_GL + " - Default \n"
|
||||
+ EDhApiRenderApi.BLAZE_3D + " - Only supported on MC 1.21.11 \n"
|
||||
+ EDhApiRenderingEngine.AUTO + " - changes based on the most likely API for that MC version \n"
|
||||
+ EDhApiRenderingEngine.OPEN_GL + " - Default \n"
|
||||
+ EDhApiRenderingEngine.BLAZE_3D + " - Only supported on MC 1.21.11 \n"
|
||||
+ "")
|
||||
.build();
|
||||
|
||||
@@ -1438,8 +1438,9 @@ public class Config
|
||||
|
||||
public static ConfigEntry<EDhApiDataCompressionMode> dataCompression = new ConfigEntry.Builder<EDhApiDataCompressionMode>()
|
||||
.set(EDhApiDataCompressionMode.Z_STD_BLOCK)
|
||||
// only visible via the API since there is no reason to use any compressor except ZStandard as of 2025-11-24
|
||||
.setAppearance(EConfigEntryAppearance.ONLY_IN_API)
|
||||
// only visible via the file since there is no reason to use any compressor except ZStandard as of 2025-11-24
|
||||
// the only reason this hasn't been fully removed is due to some people having issues specifically with ZSTD
|
||||
.setAppearance(EConfigEntryAppearance.ONLY_IN_FILE)
|
||||
.build();
|
||||
|
||||
public static ConfigEntry<EDhApiWorldCompressionMode> worldCompression = new ConfigEntry.Builder<EDhApiWorldCompressionMode>()
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
|
||||
package com.seibel.distanthorizons.core.render;
|
||||
|
||||
import com.seibel.distanthorizons.api.enums.config.EDhApiRenderApi;
|
||||
import com.seibel.distanthorizons.api.enums.config.EDhApiRenderingApi;
|
||||
import com.seibel.distanthorizons.api.enums.config.EDhApiRenderingEngine;
|
||||
import com.seibel.distanthorizons.api.interfaces.render.IDhApiRenderProxy;
|
||||
import com.seibel.distanthorizons.api.objects.DhApiResult;
|
||||
import com.seibel.distanthorizons.core.api.internal.SharedApi;
|
||||
@@ -97,7 +98,7 @@ public class DhApiRenderProxy implements IDhApiRenderProxy
|
||||
}
|
||||
|
||||
@Override
|
||||
public EDhApiRenderApi getRenderingApi() throws IllegalStateException
|
||||
public EDhApiRenderingApi getRenderingApi() throws IllegalStateException
|
||||
{
|
||||
AbstractDhRenderApiDefinition apiDef = tryGetApiDef();
|
||||
if (apiDef == null)
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@
|
||||
|
||||
package com.seibel.distanthorizons.core.wrapperInterfaces;
|
||||
|
||||
import com.seibel.distanthorizons.api.enums.config.EDhApiRenderApi;
|
||||
import com.seibel.distanthorizons.api.enums.config.EDhApiRenderingEngine;
|
||||
import com.seibel.distanthorizons.coreapi.interfaces.dependencyInjection.IBindable;
|
||||
|
||||
/**
|
||||
@@ -34,6 +34,6 @@ public interface IVersionConstants extends IBindable
|
||||
{
|
||||
String getMinecraftVersion();
|
||||
|
||||
EDhApiRenderApi getDefaultRenderingApi();
|
||||
EDhApiRenderingEngine getDefaultRenderingEngine();
|
||||
|
||||
}
|
||||
|
||||
+3
-3
@@ -21,9 +21,9 @@ package com.seibel.distanthorizons.core.wrapperInterfaces.minecraft;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
import com.seibel.distanthorizons.api.enums.config.EDhApiRenderApi;
|
||||
import com.seibel.distanthorizons.core.api.internal.rendering.DhRenderState;
|
||||
import com.seibel.distanthorizons.core.enums.EDhDirection;
|
||||
import com.seibel.distanthorizons.api.enums.config.EDhApiRenderingApi;
|
||||
import com.seibel.distanthorizons.core.wrapperInterfaces.misc.ILightMapWrapper;
|
||||
import com.seibel.distanthorizons.coreapi.interfaces.dependencyInjection.IBindable;
|
||||
import com.seibel.distanthorizons.core.util.math.Vec3d;
|
||||
@@ -76,8 +76,8 @@ public interface IMinecraftRenderWrapper extends IBindable
|
||||
|
||||
boolean mcRendersToFrameBuffer();
|
||||
boolean runningLegacyOpenGL();
|
||||
/** Returns the API Minecraft is currently using for rendering */
|
||||
EDhApiRenderApi getMcRenderingApi();
|
||||
/** Returns the Graphics API Minecraft is currently using for rendering */
|
||||
EDhApiRenderingApi getMcRenderingApi();
|
||||
|
||||
/** @return -1 if no valid framebuffer is available yet */
|
||||
int getTargetFramebuffer(); // Note: Iris is now hooking onto this for DH + Iris compat, try not to change (unless we wanna deal with some annoyances)
|
||||
|
||||
+3
-3
@@ -1,6 +1,7 @@
|
||||
package com.seibel.distanthorizons.core.wrapperInterfaces.render;
|
||||
|
||||
import com.seibel.distanthorizons.api.enums.config.EDhApiRenderApi;
|
||||
import com.seibel.distanthorizons.api.enums.config.EDhApiRenderingApi;
|
||||
import com.seibel.distanthorizons.api.enums.config.EDhApiRenderingEngine;
|
||||
import com.seibel.distanthorizons.core.dependencyInjection.SingletonInjector;
|
||||
import com.seibel.distanthorizons.core.jar.EPlatform;
|
||||
import com.seibel.distanthorizons.core.render.EDhRenderDepth;
|
||||
@@ -32,8 +33,7 @@ public abstract class AbstractDhRenderApiDefinition implements IBindable
|
||||
public boolean useSingleIbo() { return this.useSingleIbo; }
|
||||
|
||||
public abstract EDhRenderDepth getRenderDepth();
|
||||
/** will not return {@link EDhApiRenderApi#AUTO} */
|
||||
public abstract EDhApiRenderApi getRenderApi();
|
||||
public abstract EDhApiRenderingApi getRenderApi();
|
||||
/**
|
||||
* Returns true if the current renderer
|
||||
* is calling the base rendering API's method calls. <br>
|
||||
|
||||
Reference in New Issue
Block a user