Modified the ShaderChunkRenderer to allow for API use where the activeProgram being null is a valid state, such as when the shader is managed externally.
With changes to DefaultChunkRenderer where parts of the render() method that reference the activeProgram isolated.
The canRender() function now serves as the primary null check, which is expected to be overwritten by API users, alongside the other functions which now do individual null checks and throw if activeProgram is null.
Finally within the render() method, calls to begin() and end() no longer invoke the super implementation, as this prevented them from being used when overridden.
Modified the `ShaderChunkRenderer` to allow for API use where the `activeProgram` being null is a valid state, such as when the shader is managed externally.
With changes to `DefaultChunkRenderer` where parts of the `render()` method that reference the `activeProgram` isolated.
The `canRender()` function now serves as the primary null check, which is expected to be overwritten by API users, alongside the other functions which now do individual null checks and throw if `activeProgram` is null.
Finally within the `render()` method, calls to `begin()` and `end()` no longer invoke the super implementation, as this prevented them from being used when overridden.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Modified the
ShaderChunkRendererto allow for API use where theactiveProgrambeing null is a valid state, such as when the shader is managed externally.With changes to
DefaultChunkRendererwhere parts of therender()method that reference theactiveProgramisolated.The
canRender()function now serves as the primary null check, which is expected to be overwritten by API users, alongside the other functions which now do individual null checks and throw ifactiveProgramis null.Finally within the
render()method, calls tobegin()andend()no longer invoke the super implementation, as this prevented them from being used when overridden.Closing as I believe the latest commits provide alternate ways to accomplish what you need.
Pull request closed