comment/deprecate a few API events
This commit is contained in:
+6
-4
@@ -51,14 +51,16 @@ public interface IDhApiRenderProxy
|
||||
//=======================//
|
||||
|
||||
/**
|
||||
* Returns the name of Distant Horizons' depth texture. <br>
|
||||
* Will return {@link DhApiResult#success} = false and {@link DhApiResult#payload} = -1 if the texture hasn't been created yet.
|
||||
* Returns the OpenGL name of Distant Horizons' depth texture. <br>
|
||||
* Will return {@link DhApiResult#success} = false and {@link DhApiResult#payload} = -1 if the texture hasn't been created yet
|
||||
* or a rendering API other than OpenGL is in use.
|
||||
*/
|
||||
DhApiResult<Integer> getDhDepthTextureId();
|
||||
|
||||
/**
|
||||
* Returns the name of Distant Horizons' color texture. <br>
|
||||
* Will return {@link DhApiResult#success} = false and {@link DhApiResult#payload} = -1 if the texture hasn't been created yet.
|
||||
* Returns the OpenGL name of Distant Horizons' color texture. <br>
|
||||
* Will return {@link DhApiResult#success} = false and {@link DhApiResult#payload} = -1 if the texture hasn't been created yet
|
||||
* or a rendering API other than OpenGL is in use
|
||||
*/
|
||||
DhApiResult<Integer> getDhColorTextureId();
|
||||
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ import com.seibel.distanthorizons.api.objects.math.DhApiVec3f;
|
||||
|
||||
/**
|
||||
* Called before Distant Horizons starts rendering a buffer. <br>
|
||||
* This event cannot be cancelled, use {@link DhApiBeforeRenderEvent} if you want to cancel rendering.
|
||||
* This event cannot be canceled, use {@link DhApiBeforeRenderEvent} if you want to cancel rendering.
|
||||
*
|
||||
* @author James Seibel
|
||||
* @version 2023-1-31
|
||||
|
||||
+3
@@ -31,7 +31,10 @@ import com.seibel.distanthorizons.api.methods.events.sharedParameterObjects.DhAp
|
||||
* @author James Seibel
|
||||
* @version 2025-6-9
|
||||
* @since API 4.1.0
|
||||
* @deprecated Only used for the legacy OpenGL renderer <Br>
|
||||
* Using {@link DhApiAfterColorDepthTextureCreatedEvent} instead is recommended.
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class DhApiBeforeColorDepthTextureCreatedEvent implements IDhApiEvent<DhApiTextureCreatedParam>
|
||||
{
|
||||
/** Fired before Distant Horizons creates. */
|
||||
|
||||
+3
-1
@@ -31,7 +31,9 @@ import com.seibel.distanthorizons.api.methods.events.sharedParameterObjects.DhAp
|
||||
* @author James Seibel
|
||||
* @version 2024-3-2
|
||||
* @since API 2.0.0
|
||||
* @deprecated Replaced by {@link DhApiBeforeColorDepthTextureCreatedEvent} since this event's name isn't obvious when it fires.
|
||||
* @deprecated Only used for the legacy OpenGL renderer <Br>
|
||||
* Replaced by {@link DhApiBeforeColorDepthTextureCreatedEvent} since this event's name isn't obvious when it fires.
|
||||
* Using {@link DhApiAfterColorDepthTextureCreatedEvent} instead is recommended
|
||||
*/
|
||||
@Deprecated // internal notes: this method must be kept around due to Iris using it and we don't want to break old Iris support
|
||||
public abstract class DhApiColorDepthTextureCreatedEvent implements IDhApiEvent<DhApiColorDepthTextureCreatedEvent.EventParam>
|
||||
|
||||
+10
-3
@@ -190,7 +190,12 @@ public class LodRenderer
|
||||
|
||||
if (!runningDeferredPass)
|
||||
{
|
||||
this.metaRenderer.clearDhDepthAndColorTextures(renderParams);
|
||||
// needs to be fired after all the textures have been created/bound
|
||||
boolean clearTextures = !ApiEventInjector.INSTANCE.fireAllEvents(DhApiBeforeTextureClearEvent.class, renderParams);
|
||||
if (clearTextures)
|
||||
{
|
||||
this.metaRenderer.clearDhDepthAndColorTextures(renderParams);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -202,6 +207,8 @@ public class LodRenderer
|
||||
// opaque LODs
|
||||
profiler.popPush("LOD Opaque");
|
||||
|
||||
ApiEventInjector.INSTANCE.fireAllEvents(DhApiBeforeRenderPassEvent.class, renderParams);
|
||||
|
||||
this.renderTerrain(this.terrainRenderer, renderBufferHandler, renderParams, /*opaquePass*/ true, profiler);
|
||||
|
||||
// custom objects with SSAO
|
||||
@@ -287,6 +294,8 @@ public class LodRenderer
|
||||
|
||||
if (Config.Client.Advanced.Graphics.Quality.transparency.get().transparencyEnabled)
|
||||
{
|
||||
ApiEventInjector.INSTANCE.fireAllEvents(DhApiBeforeRenderPassEvent.class, renderParams);
|
||||
|
||||
profiler.popPush("LOD Transparent");
|
||||
this.renderTerrain(this.terrainRenderer, renderBufferHandler, renderParams, /*opaquePass*/ false, profiler);
|
||||
|
||||
@@ -330,8 +339,6 @@ public class LodRenderer
|
||||
// rendering //
|
||||
//===========//
|
||||
|
||||
ApiEventInjector.INSTANCE.fireAllEvents(DhApiBeforeRenderPassEvent.class, renderEventParam);
|
||||
|
||||
SortedArraySet<LodBufferContainer> lodBufferContainer = lodBufferHandler.getColumnRenderBuffers();
|
||||
if (lodBufferContainer != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user