newOpenGLContextCreated doesn't start in Juce 8

Hi, I’m getting an odd problem with Juce 8 compared to Juce 7.
I have a context in my PluginEditor with this in constructor:

openGLContext.setOpenGLVersionRequired(OpenGLContext::openGL3_2);
	openGLContext.setRenderer(this);
	openGLContext.attachTo(*this);
	openGLContext.setSwapInterval(1);
	openGLContext.setContinuousRepainting(true);

newOpenGLContextCreated is not being called at all until I manually resize the plug-in.
Calling resized in code doesn’t help either.

Does anyone know what’s going on here in Juce 8?Preformatted text

Here is a simple project that uses OpenGL
Created with Projucer 8.02
I’ve tested it with Windows 10 FL Studio, Ableton live, and Cubase Elements 10

I just created a new project and added the OpenGL module, then set up the simple OpenGL stuff in the code. Is there something I’m missing?..

OpeneGL_Test_DH.zip (23.8 KB)

The function newOpenGLContextCreated() never gets called, does anyone know why?
I think it was called in FL Studio, but not on a saved project!

This issue seems similar to one I reported previously. It originated from commit 555b667 but has been fixed as of commit f5f758c in the develop branch.

I didn’t see your previous problem with it, thanks for tracking down the commit, I’ll try going back. I wonder if it’s an Async issue, and a wait is needed somewhere in the init process? It’s odd that I can compile an old OpenGL project and it runs fine. Just not a new one like the project I posted above.
It’s not calling newOpenGLContextCreated at all.

Just to confirm, I can reproduce this behaviour in a plugin project on Windows 11, but it is fixed on the develop branch by this commit:

1 Like

Brilliant! That worked great.

Thanks for checking it out.

I can use ‘develop’ on a new project.
I guess things have moved around quite a lot for such an old piece of code to fail.