Allow DefaultChunkRenderer to be more extensible #17

Closed
venn0 wants to merge 1 commits from venn0/celeritas:ven-dev-2 into stonecutter
pull from: venn0/celeritas:ven-dev-2
Collaborator

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.
venn0 added 1 commit 2025-07-07 10:40:39 -04:00
Owner

Closing as I believe the latest commits provide alternate ways to accomplish what you need.

Closing as I believe the latest commits provide alternate ways to accomplish what you need.
embeddedt closed this pull request 2025-07-11 21:54:00 -04:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: embeddedt/celeritas#17