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