How to disable only one specific ID with glDebugMessageControl?

Viewed 67

I want to disable one (and only one!) message id, and accept all other messages regardless of source, type or severity.

GLuint id = 131185;
glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 1, &id, GL_FALSE);

However, this appears to change nothing?

Ofcourse, I can discard the message in the callback function, but I'd rather not have the call happen at all. What is the logic I'm not seeing here?

1 Answers

If you want to filter by ids (count is non-zero), then you must either provide both a source and type, or you must be trying to filter all messages with those IDs of a specific severity. All three parameters cannot be GL_DONT_CARE if you want to filter IDs.

This is important, as user-defined messages are permitted to use any ID, including ones used by other message types/sources Also, there can be other sources that fire off the same ID.

The irony of course is that your function call as written should have generated an error ;)

Related