could be working on my windows 95 game project
could be working on my windows 95 game project
DebugMessageCallback is giving me into an actual dotNet string? Tried Encoding.UTF8.GetString((byte*) Unsafe.AsPointer(ref message), length); but it is choking with encoding errors

DebugMessageCallbackEncoding.UTF8.GetString((byte*) Unsafe.AsPointer(ref message), length); public static unsafe void EnableDebugOutput(this GL gl) {
gl.Enable(GLEnum.DebugOutput);
gl.DebugMessageCallback((source, type, id, severity, length, message, param) => {
var errorString = SilkMarshal.PtrToString(message);
Console.WriteLine($"Message from OpenGL ({type}) with severity {severity}:");
Console.WriteLine(errorString);
}, null);
}