overte-org / overte

Overte open source virtual worlds platform.
https://overte.org/
Other
127 stars 47 forks source link

Send OpenGL errors to log on debug builds #998

Closed daleglass closed 2 weeks ago

daleglass commented 3 weeks ago

On debug builds, GLAD logs errors to stderr:

ERROR 1280 in glGetIntegerv

This is extremely tricky to debug, since it's very unclear where this comes from.

This change sets an alternate callback which sends the same message to our log instead:

[06/04 23:52:30] [WARNING] [hifi.gpu.gl45] OpenGL error 1280 in glGetIntegerv

This is much easier to put a breakpoint on to figure out what's going wrong.