-
Notifications
You must be signed in to change notification settings - Fork 30
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
Revamped per-engine renderers #158
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yoloooo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Dear community, I come to you with an even worse PR than #156, which is now superseded by this one.
Due to the unacceptable performances of the composition in Dx9 and OpenGL3, I decided to scrap that approach altogether and go back to the basics. This PR fully reimplements, from scratch, all four renderers internally. As I now have a much better grasp on how all our supported engines work, I was able to end up with a cleaner and more maintainable design for all of them, one that relies on traits to factor together common behavior which is now starkly separated: renderers only care about rendering the draw data when given a render target, and the
Pipeline
cares about all the other stuff in a 100% renderer agnostic manner.Changes
Press F for the unified renderer
There is of course no more unified renderer as per #156. The four separate renderers fit much better our use case workflow and aren't much bigger than the compositors were in the previous PR; in fact, the net change in LoC is about the same (~2000 added).
Asynchronous input processing
Same as #156.
Wine support
The library works seamlessly under Wine/Proton with the games tested: Dark Souls, Dark Souls III, Elden Ring. OpenGL 3 has not been tested against a game but the test harnesses work well.
Texture support in all renderers
All renderers have their own texture support. For the time being, textures can only be added in the
ImguiRenderLoop::initialize
method through a callback function which results in an ugly breaking change. I'm fine with iterating on this and do breaking changes as the effort required to the users won't be much at all -- just a couple lines of code -- but I do eventually want to settle for something cleaner that doesn't require adding all those lifetimes to the trait method.One common window procedure
Window procedure setup responsibility has been moved away from the hooks and into the
Pipeline
. This means that the behavior will always be consistent across hooks.Exposed some utility methods
Useful parts of the
hudhook::util
crate were made public and other methods were added. Not sure I will want to make any guarantees with respect to semver there, as they aren't really core to the library, but they're there if someone wants to use them.Affected issues
Closed issues
DirectComposition
is not implemented on Wine #151.Issues that need review
If you are/were directly impacted by any of the issues below, please test them or let me know if I can close them.
Conclusion
We did it. Thank you everyone.
I will keep working to fix a few more things and add a couple more features, but we are looking at a new release soon ™️ .