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

Add a null rendering backend #120

Merged
merged 11 commits into from
Jul 18, 2023
Merged

Conversation

Wunkolo
Copy link
Collaborator

@Wunkolo Wunkolo commented Jul 17, 2023

This adds the null rendering backend, which just stubs all of the implementation details of the rendering backend, allowing for "headless" emulation of 3DS roms.
This also adds support for multiple rendering backends, based on an index within the user's config.toml.

Virtual classes need to override the base-type deconstructor so that they are proper called when referred to by their base-type.
Doesn't implement any functions, currently not selectable or
configurable
There are still some initialization errors to work through, such as
config not being initialized properly by the time GPU tries to utilize
it too. Also some life-time issues. But manually forcing it to use the
Null backnd successfully works and allows games to be "played"
headlessly.
`config` was being consumed much too early before it has a chance to
call `load`. This caused GPU to read weird uninitialized data, and then
`load` called, and then further initialization to occur based on default
data and the data inside of `config.toml`. `EmulatorConfig` needs to be
loaded in first before any sort of initialization happens, by adding a
new constructor so that it can be initialized sooner.
@wheremyfoodat
Copy link
Owner

Sir I tried this and I can't see the Pokemans, I think you have a bug, please fix

@skylersaleh
Copy link
Contributor

Sir I tried this and I can't see the Pokemans, I think you have a bug, please fix

Wdym, its playing Pokemon Black perfectly.

@wheremyfoodat
Copy link
Owner

Reshiram pic or lying

@Wunkolo Wunkolo marked this pull request as ready for review July 17, 2023 22:22
Rather than using integer-indices, just use plaintext case-insensitive
names and leave the actual enum indexes as an implementation detail.
@wheremyfoodat
Copy link
Owner

CI seems to be dying to IWYU stuff (no in renderer.hpp)
Also likely best to move the renderer text name functions as static functions in the Renderer class.

So you'd do Renderer::typeFromString and it would be self-explanatory without global baggage.

@Wunkolo
Copy link
Collaborator Author

Wunkolo commented Jul 18, 2023

Addressed CI issues 👍

@wheremyfoodat wheremyfoodat merged commit 5b4f6ef into wheremyfoodat:master Jul 18, 2023
3 checks passed
@Wunkolo Wunkolo deleted the renderer-null branch July 19, 2023 02:47
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.

3 participants