Skip to content
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

Prepare for multiple render backends #50

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

Conversation

Shinmera
Copy link
Member

@Shinmera Shinmera commented Jul 8, 2023

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.

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.

None yet

1 participant