Hello, I just updated to the latest develop branch which seems to add support for more opengl profiles, but the 4.3 profile which is supposed to improve the debugging makes it impossible to work, as soon as the app launches, I get a bunch of those warnings
OpenGL DBG message: Buffer detailed info: Buffer object 1 (bound to GL_ELEMENT_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
JUCE Assertion failure in juce_OpenGLContext.cpp:630
A breakpoint instruction (__debugbreak() statement or a similar call) was executed in
When continuing running, as soon as something change in the software, I get again those errors. So I can’t even click or do anything without being constantly paused by Visual Studio.
Is there an option to either remove GL debugging (didn’t find anything in the projucer), or not breaking on warning but only on errors at least ?
From what I recall, the JUCE devs are working on some OpenGL stuff… hopefully this’ll be fixed in the midst of whatever changes they have in the works.
As temporary fix use something like this on juce_OpenGLContext.cpp:630
glDebugMessageCallback ([] (GLenum, GLenum type, GLuint, GLenum severity, GLsizei, const GLchar* message, const void*)
{
// This may reiterate issues that are also flagged by JUCE_CHECK_OPENGL_ERROR.
// The advantage of this callback is that it will catch *all* errors, even if we
// forget to check manually.
DBG ("OpenGL DBG message: " << message);
// Only severe errors
if(type == GL_DEBUG_TYPE_ERROR && severity == GL_DEBUG_SEVERITY_HIGH)
{
jassertfalse;
}
}, nullptr);
Ideally the debug messenger impl should print all info (source, type, severity and error id).
Perhaps even make creation a user responsibility.
e.g. I use a custom messenger with more settings like this:
std::unique_ptr<gl::DebugMessenger> debugMessenger; // member of MainComponent
void MainComponent::initialise() // GL renderer callback
{
debugMessenger = gl::DebugMessenger::create();
}
I’m also hitting that assert, hopefully someone from JUCE is fixing this soon. Meanwhile the temporary fix @parawave provided makes it work for now - thanks
now a new message is collapsing my output window since it is repeated constantly
OpenGL DBG message: Buffer detailed info: Buffer object 3 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
From what I have seen, it is an unimportant message, it does not even have a level, it is a notification included from version 4.3, GL_DEBUG_SEVERITY_NOTIFICATION, seems like it can be ignored
By the way, is there a bug in the function callback. “type” must be the second parameter
glDebugMessageCallback ([] (GLenum type, GLenum, GLuint, GLenum severity, GLsizei, const GLchar* message, const void*)
{
// This may reiterate issues that are also flagged by JUCE_CHECK_OPENGL_ERROR.
// The advantage of this callback is that it will catch *all* errors, even if we
// forget to check manually.
DBG ("OpenGL DBG message: " << message);
jassertquiet (type != GL_DEBUG_TYPE_ERROR && severity != GL_DEBUG_SEVERITY_HIGH);
}, nullptr);
typedef void (APIENTRY *DEBUGPROC)(
GLenum source,
GLenum type,
GLuint id,
GLenum severity,
GLsizei length,
const GLchar *message,
const void *userParam);