Skip to content

Render state #113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Render state #113

wants to merge 6 commits into from

Conversation

Shinmera
Copy link
Member

This PR supersedes the earlier effort in #50

Specifically it adds a new resource type, the render-state, which encapsulates the relevant global OpenGL state in an object that can be swapped out wholesale to represent different state sets.

Traditional calls to more "immediately" change state are changed to operations on this state object, and old functions to do the same are deprecated.

This is notably not a complete switch to support render state objects. Parts of Trial and user code will still directly manipulate a render state object, while they should ultimately for best performance on future backends become immutable, and more importantly, discretely enumerated ahead of time like other resource types.

For now this PR merely aims to achieve two things:

  1. Implement a new, more "modern" API based on the render-state object for users to consume and switch from old operators to
  2. Remove all calls to GL feature flag wrangling
  3. Remove all direct calls to GL functions outside of resource implementations

Future efforts will need to tackle discrete enumeration of state objects and re-examine how framebuffers, shader-programs, and so on are managed and used.

@Shinmera Shinmera force-pushed the master branch 2 times, most recently from 5ba58b1 to 11b86fe Compare April 28, 2025 13:24
@Shinmera Shinmera force-pushed the master branch 2 times, most recently from 2f96f21 to 4931717 Compare August 1, 2025 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant