Make the desktop backend easier to port to non-desktop platforms#294
Draft
Un1q32 wants to merge 2 commits into
Draft
Make the desktop backend easier to port to non-desktop platforms#294Un1q32 wants to merge 2 commits into
Un1q32 wants to merge 2 commits into
Conversation
This file contains hidden or 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
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.
Separates the parseCommandLineArgs bit from the rest, eventually it will be in another file. This way stuff like consoles can pass a struct directly instead of having to create its own argv or whatever.
Sets up the OpenGL FBO calls to use the hostFramebuffer thingy instead of hardcoding 0. Android and iOS and possibly other platforms need this.
When this is done it should be a lot easier to do stuff like use the SDL 2 backend for a console port.
I'm thinking there would be a standard CLI main() file that just does the normal parseCommandLineArgs stuff, and console ports would make their own main() with either just hardcoded preset args, or something configured through some king of options menu.
I was thinking of maybe folding the other backends (PS2/3/vita/android) into the desktop backend, my understanding is all the backend files have a lot of duplicated logic that could be eliminated. If not this would still prolly be useful to make SDL 2 console ports easy.