/// <summary> /// Retrives the label from a labeled object. /// </summary> /// <param name="idNamespace">Namespace where name belongs.</param> /// <param name="name">ID or name of object.</param> /// <param name="label">PreAllocated StringBuilder with enough capacity to store retrived label.</param> /// <returns>number of characters written to StringBuilder label.</returns> public static int GetObjectLabel(DebugNamespace idNamespace, uint name, StringBuilder label) { var LabelLength = 0; Delegates.glGetObjectLabel(idNamespace, name, label.Capacity, out LabelLength, label); return(LabelLength); }
/// <summary> /// Retrives the label from a labeled object. /// </summary> /// <param name="idNamespace">Namespace where name belongs.</param> /// <param name="name">ID or name of object.</param> /// <param name="DefaultStringBuilderCapacity">The capacity of created stringbuilder used to retrive label.</param> /// <returns>Label</returns> public static string GetObjectLabel(DebugNamespace idNamespace, uint name, int DefaultStringBuilderCapacity = 64) { var LabelLength = 0; var sb = new StringBuilder(DefaultStringBuilderCapacity + 4); Delegates.glGetObjectLabel(idNamespace, name, sb.Capacity - 2, out LabelLength, sb); return(sb.ToString()); }
/// <summary> /// Retrives the label from a labeled object. /// </summary> /// <param name="idNamespace">Namespace where name belongs.</param> /// <param name="name">ID or name of object.</param> /// <param name="DefaultStringBuilderCapacity">The capacity of created stringbuilder used to retrive label.</param> /// <returns>Label</returns> public static string GetObjectLabel(DebugNamespace idNamespace, uint name, int DefaultStringBuilderCapacity = 64) { var LabelLength = 0; var sb = new StringBuilder(DefaultStringBuilderCapacity + 4); Delegates.glGetObjectLabel(idNamespace, name, sb.Capacity - 2, out LabelLength, sb); return sb.ToString(); }
/// <summary> /// Retrives the label from a labeled object. /// </summary> /// <param name="idNamespace">Namespace where name belongs.</param> /// <param name="name">ID or name of object.</param> /// <param name="label">PreAllocated StringBuilder with enough capacity to store retrived label.</param> /// <returns>number of characters written to StringBuilder label.</returns> public static int GetObjectLabel(DebugNamespace idNamespace, uint name, StringBuilder label) { var LabelLength = 0; Delegates.glGetObjectLabel(idNamespace, name, label.Capacity, out LabelLength, label); return LabelLength; }
/// <summary> /// Sets the label for an object specified by name. /// </summary> /// <param name="idNamespace">Namespace where name belongs.</param> /// <param name="name">ID or name of object.</param> /// <param name="Label">Label to attach to object.</param> public static void ObjectLabel(DebugNamespace idNamespace, uint name, string Label) { Delegates.glObjectLabel(idNamespace, name, Label.Length, Label); }