Prepare for multiple render backends #50
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR prepares Trial for multiple render backends (Vulkan, Metal, DirectX, whatever). The work of this PR won't actually implement any other backends or ensure that they would work, but instead simply focuses on moving all of the references to the gl and %gl packages are moved out of core and into resources and a single file instead.
Anything else should call functions that interact with the context or a resource, instead. That should allow creating graphics library specific resource mixins and context mixins, paving the way for other backends.
The main goal is to create a cleaner separation and present a cleaner interface for users to depend upon. Ideally users would not ever call any GL specific functions on their own at all.
Raw GLSL will remain, with the intention being that future backends will have to implement a GLSL transpiler to whatever code format they require. This may need extra changes for more metadata depending on the needs of the target language, but for now we'll omit that problem.