Skip to content
This repository was archived by the owner on Aug 13, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants