Introduce additional safety checks for init debug output in SceneOpenGL
Review Request #126053 - Created Nov. 13, 2015 and submitted
There are slight differences between GL_ARB_debug_output and GL_KHR_debug affecting how it works on GLES. With GL_KHR_debug the context should be created with a debug flag. With the ARB extension there is no such requirement. Empirical data (Mali) shows that it doesn't work if the context is not created with the flag, although the spec seems to allows it. So: * if we have GL_ARB_debug_output we assume it works * if we only have GL_KHR_debug we check whether the context is created with debug support (which we don't do yet, but maybe should?) * on GLES we can only query with version 3.1 (which we don't request yet) * with anything older we just assume it's not enabled (which is correct given that we don't enable the debug flag)
Shouldn't the code be made future proof in case the context is created with the debug flag in the future? ( See last case that you outline ).
Apart from that, I tested it, and it seems to work.