/// <summary> /// To easily support custom application timestamps, applications can inject their own messages to the debug message stream /// </summary> /// <param name="severity">indicates its severity level as defined by the application.</param> /// <param name="id">ID is defined by the application.</param> /// <param name="message">message</param> /// <param name="category">must be DEBUG_CATEGORY_APPLICATION_AMD</param> public static void DebugMessageInsertAMD(DebugSeverity severity, uint id, string message, DebugCategoryAMD category = DebugCategoryAMD.APPLICATION_AMD) { Delegates.glDebugMessageInsertAMD(category, severity, id, message.Length, message); }
/// <summary> /// Applications can control which messages are generated /// </summary> /// <param name="category">Zero means all categories.</param> /// <param name="severity">Zero means all severities.</param> /// <param name="ids">if category or serverity is zero, ids is ignored.</param> /// <param name="enabled">Enables or disables the debug messages matched</param> /// <remarks> /// All messages of severity level DEBUG_SEVERITY_MEDIUM_AMD and DEBUG_SEVERITY_HIGH_AMD in all categories are initially enabled, and all messages at DEBUG_SEVERITY_LOW_AMD are initially disabled. /// </remarks> public static void DebugMessageEnableAMD(DebugCategoryAMD category, DebugSeverity severity, uint[] ids, bool enabled) { Delegates.glDebugMessageEnableAMD(category, severity, ids.Length, ref ids[0], enabled); }
public static uint GetDebugMessageLogAMD(DebugCategoryAMD[] categories, DebugSeverity[] severities, uint[] ids, int[] lengths, StringBuilder message, uint count = 1) { count = (uint)Math.Min(categories.Length, Math.Min(severities.Length, Math.Min(ids.Length, Math.Min(lengths.Length, (int)count)))); return Delegates.glGetDebugMessageLogAMD(count, message.Capacity, ref categories[0], ref severities[0], ref ids[0], ref lengths[0], message); //if (count < 1) //{ // count = (uint)GL.GetIntegerv(GetParameters.DebugLoggedMessages); //} //count = (uint)Math.Min(categories.Length, Math.Min(severities.Length, Math.Min(ids.Length, Math.Min(lengths.Length, (int)count)))); //if (count > 0) //{ // var sb //} }