OpenGLComponent and Shared Contexts


I’ve hit a case where I can’t set a shared context properly. Currently, the property comes in as an OpenGLComponent* - it then goes to an internal component. In fact, the internal component just keeps a pointer to the other’s internal object, and then all that’s accessed is the context. Why not, in that case, just use a void pointer? It doesn’t seem any less safe, and it’s cross-platform friendly and it allows non-juce contexts to be handled.

If you’re about to ask why we would need a non-juce context, consider that a context could be purely for sharing, or could be created elsewhere.

I can’t do this by inheriting, AFAIK, because of the internal class. I will just convert all to void* now, but is there a better way?



Ah. Except for you using AGL and me using CGL. Balls.