I’m using an OpenGLGraphicsContext inside renderOpenGL-callback for async-redrawing of certain controls easily with the juce Graphics class, which works just great!
The old juce demo used exactly the same technique.
void MyComponent::renderOpenGL()
{
std::unique_ptr<LowLevelGraphicsContext> glRenderer (createOpenGLGraphicsContext,*externalOpenGLContext, width, height));
Currently you can only set width, height of the context, but if you only paint a certain part of the GUI, the painting is aligned to the bottom left of the plugin GUI, because inside the context it uses glViewport (0, 0, … )
It would be great if you can specify also the X, Y coordinate of the Context, or just an option to disable the glViewPort-call.
Any suggestions?