Add renderEventParam to generic rendering shader binding by IMS request

This commit is contained in:
James Seibel
2024-07-12 17:27:17 -05:00
parent e7dda9590a
commit 6bb832a488
4 changed files with 5 additions and 4 deletions
@@ -52,7 +52,7 @@ public interface IDhApiGenericObjectShaderProgram extends IDhApiOverrideable
void free();
/** Runs any necessary binding this program needs so rendering can be done. */
void bind();
void bind(DhApiRenderParam renderEventParam);
/** Runs any necessary unbinding this program needs so rendering can be done by another program. */
void unbind();
@@ -133,7 +133,8 @@ public class SharedApi
* Used to prevent getting a full chunk from MC if it isn't necessary. <br>
* This is important since asking MC for a chunk is slow and may block the render thread.
*/
public static boolean isChunkAtBlockPosAlreadyUpdating(int blockPosX, int blockPosZ) { return UPDATING_CHUNK_POS_SET.contains(new DhChunkPos(new DhBlockPos2D(blockPosX, blockPosZ))); }
public static boolean isChunkAtBlockPosAlreadyUpdating(int blockPosX, int blockPosZ)
{ return UPDATING_CHUNK_POS_SET.contains(new DhChunkPos(new DhBlockPos2D(blockPosX, blockPosZ))); }
/** handles both block place and break events */
@@ -383,7 +383,7 @@ public class GenericObjectRenderer implements IDhApiCustomRenderRegister
shaderProgram = shaderProgramOverride;
}
shaderProgram.bind();
shaderProgram.bind(renderEventParam);
shaderProgram.bindVertexBuffer(this.boxVertexBuffer.getId());
this.boxIndexBuffer.bind();
@@ -92,7 +92,7 @@ public class GenericObjectShaderProgram extends ShaderProgram implements IDhApiG
//=========//
@Override
public void bind()
public void bind(DhApiRenderParam renderEventParam)
{
super.bind();
this.va.bind();