private void CheckError(GlInterface gl) { int err; while ((err = gl.GetError()) != GL_NO_ERROR) { Console.WriteLine(err); } }
public static void CheckError(this GlInterface gl, [CallerMemberName] string caller = "") { GlErrors err; while ((err = (GlErrors)gl.GetError()) != GL_NO_ERROR) { Console.WriteLine($"{caller}: {err}"); } }
private bool CheckFramebufferStatus(GlInterface gl) { var status = gl.CheckFramebufferStatus(GL_FRAMEBUFFER); if (status != GL_FRAMEBUFFER_COMPLETE) { int code; while ((code = gl.GetError()) != 0) { Logger.TryGet(LogEventLevel.Error, "OpenGL")?.Log("OpenGlControlBase", "Unable to initialize OpenGL FBO: {code}", code); } return(false); } return(true); }