devkitPro / opengx

OpenGL-like wrapper for Nintendo Wii/GameCube
19 stars 2 forks source link

Refactor EFB switching #71

Closed mardy closed 1 month ago

mardy commented 1 month ago

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).