Currently only GL2.x+ is supported for hardware context. This is mostly required cause of the fbo extension required for hw contexts to properly work the way they are designed (relegate the core to draw on a framebuffer that will then be rendered by the frontend during the last rendering step to draw buffer).
It would be cool however to have GL1.x support for hardware contexts too. It can be accomplished by adding a brand new HW_CONTEXT in libretro_common (RETRO_HW_CONTEXT_OPENGL1) and making this new context work by directly drawing to draw buffer. This will require ofc the handling of the last rendering step of RetroArch to not mess up GL machine state. (Saving a snapshot of the machine after last rendering step and then restoring it before last rendering step should accomplish the task).
As a follow up to this issue, hw context support (aka hw acceleration) can be relatively easily implemented in low end platforms having a decent/similar enough GL implementation (picaGL for 3DS, sceGu for PSP and vitaGL for PSVITA).
I see how 3DS and PSP gpus are walking toilets.
But doesn't Vita's one fully support ES 2.0, with even some higher extension here and there?
Vita doesn't have GL but only a custom API (sceGxm).
Of course. But is that limiting how much VitaGL can map the underlying hardware?
vitaGL's not capable to implement HW_CONTEXT_OPENGL. It lacks most of the GL2 features (it literally has only hw accelerated mipmaps generation, fbo extension and shaders (precompiled only) support from GL2.X+) and, since i started working on it, it always had been a one man work (i've received literally no contributions and working on such a huge projects solo is not simple). The proposed implementation here is the easiest way to get some cores with hw acceleration on Vita with what we currently have (and would make possible to get hw accelerated cores on 3DS and PSP too).
FYI, I created a bounty for this https://www.bountysource.com/issues/82107167-bring-hw-context-support-to-gl1-driver
I don't doubt that GL2 cannot be done
But I was actually talking about RETRO_HW_CONTEXT_OPENGLES2? Even the older Series5 could do it, I don't see why you should constrain yourself into using a fixed function pipeline where you actually have more than that.
There's not very much difference between GLES2 and GL2 (just some missing functions for what concerning float usage (glTexParameterf replaced with glTexParameteri eg.) and some less supported texture formats. Other than that, having GLES2 fully implemented would mean you pretty much have GL2 fully implemented too and both are out of vitaGL current state.
vitaGL current state.
Ohh, I see that now. Thanks, sorry for the bother.
Whilst not properly hw context implementation for gl1, https://github.com/Rinnegatamante/flycast this core shows how gl1 driver had been modified to allow to bypass hw context in order to still have the same feature of a real hw context by directly writing to screen.
Most helpful comment
vitaGL's not capable to implement HW_CONTEXT_OPENGL. It lacks most of the GL2 features (it literally has only hw accelerated mipmaps generation, fbo extension and shaders (precompiled only) support from GL2.X+) and, since i started working on it, it always had been a one man work (i've received literally no contributions and working on such a huge projects solo is not simple). The proposed implementation here is the easiest way to get some cores with hw acceleration on Vita with what we currently have (and would make possible to get hw accelerated cores on 3DS and PSP too).