[Feature Request] Disable OpenGL debug messages
Qendolin opened this issue ยท 3 comments
There a many configurations with resource packs, shaders, mods and hardware where one or more debug messages are logged every frame.
That's why I suggest an option to disable debug logging. An optimal solution would be some kind of error aggregation UI / Toast / Chat Message.
Technical note:
The debug callback is registered in net.minecraft.client.gl.GlDebug
.
I did a bit of digging around and I found out that vanilla has an option to disable it via options.txt > glDebugVerbosity
, but it requires a game restart since it needs to reinitialize the renderer.
I've come down to 3 possible solutions
- Don't allow production users to even have a toggle for this, the downside is log spam and waste of disk writes.
- Do I simply aggregate a new UI toggle for the existing vanilla option, but it will require a game restart.
- Implement an optimal solution like mentioned in the request, but possibly have users disabling it unintentionally and opening unwanted issues on the issue tracker(Example)
and have resource pack/shader/mod developers rain hell down on me.
I haven't looked at where glDebugVerbosity
is used in the code but you can just overwrite the OpenGL error callback by calling glDebugMessageCallback
again, no restart required. As for solution 3 I guess adding a warning message on startup would not be enough.
Resolved with ff94e2f. I choose to use the existing vanilla option.