Sodium Extra

Sodium Extra

25M Downloads

[Feature Request] Disable OpenGL debug messages

Qendolin opened this issue ยท 3 comments

commented

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.

commented

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

  1. Don't allow production users to even have a toggle for this, the downside is log spam and waste of disk writes.
  2. Do I simply aggregate a new UI toggle for the existing vanilla option, but it will require a game restart.
  3. 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.
commented

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.

commented

Resolved with ff94e2f. I choose to use the existing vanilla option.