We just released a new JUCE app to our customers for beta testing and we are getting a few “the app is completely black” messages back. I have replicated this myself with an old video card and it is clearly not supporting OpenGL properly. When I debug the code and I can see jassert hit in drawComponentBuffer:
jassert (context.extensions.glActiveTexture != nullptr);
with a note in the code about old drivers. This is not the nice behavour we would like since applications crashing or just painting a black window instead of either reverting to non-OpenGL or giving some sort of error message would be more useful and not generate tech support calls or hate mail.
I have modified the OpenGL code to add a quick check for the missing function in initialiseOnThread() right after context.extensions.initialise().
if (context.extensions.glActiveTexture == nullptr)
context.bInitError = true;
Then I can check for the bInitError and detach() the OpenGL context in my app if I see the problem.
This seems like quite a messy solution so I’m looking for a better way to know if OpenGL is going to work on the target computer. I would prefer either the setRenderer() or attachTo() to return an error so the app would know right away that OpenGL isn’t going to work. Optionally there could be another function that could be called at the same time as setRenderer() / attachTo() to see if there is an error - and not wait until the first paint occurs to detect the problem.
Any other ideas?