private readonly Gl.DebugProc _pcCallbackInstance = PCCallbackHandler; // The callback delegate must be stored to avoid GC internal static void Init() { if (_instance == null) { _instance = new OpenGLDebugCallback(); } }
/// <summary> /// Indicates if OpenGL render methods will report errors. Activate only when needed, /// as this has a negative impact on performance. default false /// </summary> public static void EnableErrorChecking() { if (_enableErrorChecking == false) { _enableErrorChecking = true; OpenGLDebugCallback.Init(); } }