OpenGL error in initialization on some drivers

I'm using Juce 4.0.1. Platform is Windows 7 and remote desktop is used.

When I open remote desktop session to Windows 7 computer and I start JuceDemo application it crashes when OpenGL demo tries to open.

I know this is some weird OpenGL driver problem but with old v3 Juce this worked fine.

I'm sure that this unsupported openGL call that crashes application can be catched and isolated.  I would really appreciate if this issue is addressed because remote destop is important for my project.

Could you please update to the tip? There were some fixes for OpenGL related problems recently, and even if it doesn't fix your issue, you'll need to be on the tip to get the fix when it's made!

Hope this helps.

I pulled latest version (4.0.2) from github and my OpenGL issue is still there.


Assert happens on JUCE_CHECK_OPENGL_ERROR, in juce_OpenGLContext.cpp at line 223. Error is 0x500.

Actual problem is at line 469 (shadersAvailable = OpenGLShaderProgram::getLanguageVersion() > 0;).

getLanguageVersion calls glGetString(GL_SHADING_LANGUAGE_VERSION) which is unsupported.

I fixed it with few lines of code like this:

       #if ! JUCE_OPENGL_ES
        JUCE_CHECK_OPENGL_ERROR //andrej
        shadersAvailable = OpenGLShaderProgram::getLanguageVersion() > 0;
        clearGLError(); //andrej

I also had to comment assert on line 337 because those drivers are stupid.



I just updated to latest juce version and this problem is still here.


Solution that I proposed in previous post works and does not cause any problems elsewhere. I examined this in great detail.

Please include this "fix" in your main source.  

OK this is fixed on the latest tip. Thank you for reporting.