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

Refactor EFB switching #71

Merged
merged 3 commits into from
Sep 29, 2024
Merged

Refactor EFB switching #71

merged 3 commits into from
Sep 29, 2024

Conversation

mardy
Copy link
Collaborator

@mardy mardy commented Sep 29, 2024

Refactor the existing code in stencil.c, where the EFB was saved and later restored when switching between the stencil and scene drawing targets, to make it more generic and able to support more drawing targets. Now there is a centralized function, _ogx_efb_set_content_type(), which will take care of invoking the right functions to save the current EFB contents to the appropriate buffer, as well as to load the target buffer (and set it up, if it had not been used before).

This will allow us to more easily support the accumulation buffer (see the glAccum function).

The EFB copy operation is not clearing the EFB, so setting the clear
color and Z-value here does not have any effect.
Refactor the existing code in stencil.c, where the EFB was
saved and later restored when switching between the stencil and scene
drawing targets, to make it more generic and able to support more
drawing targets. Now there is a centralized function,
_ogx_efb_set_content_type(), which will take care of invoking the right
functions to save the current EFB contents to the appropriate buffer, as
well as to load the target buffer (and set it up, if it had not been
used before).

This will allow us to more easily support the accumulation buffer
(see the glAccum function).
@WinterMute WinterMute merged commit 23d53e2 into devkitPro:master Sep 29, 2024
2 checks passed
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.

2 participants