I agree it's not ideal. I understand about the gl state save and restore (and the perf cost.) I'm using a library to do it (which allows for a large amount of gl state save (perf hit), but also has a method to specify state to save, to trim back for min required and for better perf.) I am not done yet, because somewhat as expected, some Spine renderer state or context or gl call is not allowing the C3 render to show up (and I don't expect help from Scirra with that.)
github.com/stackgl/gl-state
My thought is to render Spine to a texture buffer (in C3 context) created through the C3 SDK CreateDynamicTexture(), instead of direct to C3 FB. I will not be using the UpdateTexture() call, instead, I'll be rendering to the texture directly. I will be doing this all through a C3 object's Draw(renderer) call, so I can render to the texture, then call SetTexture() and then Quad4() to keep things synchronized. This way I can hopefully continue to use the full power and integration of C3 (effects on Quad, size, position, rotation actions, behaviors - which is the goal.)
This actually worked really well with the ElementQuad addon I created, which did render to other canvas and then UpdateTexture() - it was just the issue of slow UpdateTexture() on mobile which made it not a good solution for mobile (and perhaps some desktop GPUs which use heavily tiled render (Intel perhaps?) I could add effects and behaviors to ElementQuad, it is a nice combination of C3 and another renderer (for non-mobile.)
Using IWebGLRenderer would be great also, as you said - I think it would be a big code rewrite, but I'm going to dig through the Spine-TS code a little more and see if I can find an abstraction layer which matches (I also need to match up C3 texture management and Spine-TS texture management/atlas - which I think CreateDynamicTexture may help with, since it seems like that does not become involved with the general C3 spritesheeting algorithm.)
It feels like we are close to getting something good working, so I'm going to keep working on it (Igor made a nice plugin version, much better than my original template, so it could be used devs easily.)
Thanks for the comments and discussion.