1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE book PUBLIC
"-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
4 <refentry id=
"glObjectLabel">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>glObjectLabel
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glObjectLabel
</refname>
17 <refpurpose>label a named object identified within a namespace
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>glObjectLabel
</function></funcdef>
23 <paramdef>GLenum
<parameter>identifier
</parameter></paramdef>
24 <paramdef>GLuint
<parameter>name
</parameter></paramdef>
25 <paramdef>GLsizei
<parameter>length
</parameter></paramdef>
26 <paramdef>const char *
<parameter>label
</parameter></paramdef>
30 <refsect1 id=
"parameters"><title>Parameters
</title>
33 <term><parameter>identifier
</parameter></term>
36 The namespace from which the name of the object is allocated.
41 <term><parameter>name
</parameter></term>
44 The name of the object to label.
49 <term><parameter>length
</parameter></term>
52 The length of the label to be used for the object.
57 <term><parameter>label
</parameter></term>
60 The address of a string containing the label to assign to the object.
66 <refsect1 id=
"description"><title>Description
</title>
68 <function>glObjectLabel
</function> labels the object identified by
69 <parameter>name
</parameter> within the namespace given by
<parameter>identifier
</parameter>.
70 <parameter>identifier
</parameter> must be one of
<constant>GL_BUFFER
</constant>,
<constant>GL_SHADER
</constant>,
71 <constant>GL_PROGRAM
</constant>,
<constant>GL_VERTEX_ARRAY
</constant>,
<constant>GL_QUERY
</constant>,
72 <constant>GL_PROGRAM_PIPELINE
</constant>,
<constant>GL_TRANSFORM_FEEDBACK
</constant>,
<constant>GL_SAMPLER
</constant>,
73 <constant>GL_TEXTURE
</constant>,
<constant>GL_RENDERBUFFER
</constant>,
<constant>GL_FRAMEBUFFER
</constant>,
74 to indicate the namespace containing the names of buffers, shaders, programs, vertex array objects, query objects,
75 program pipelines, transform feedback objects, samplers, textures, renderbuffers and frame
76 buffers, respectively.
79 <parameter>label
</parameter> is the address of a string that will be used to label an object.
80 <parameter>length
</parameter> contains the number of characters in
<parameter>label
</parameter>.
81 If
<parameter>length
</parameter> is negative, it is implied that
82 <parameter>label
</parameter> contains a null-terminated string. If
<parameter>label
</parameter>
83 is NULL, any debug label is effectively removed from the object.
86 <refsect1 id=
"errors"><title>Errors
</title>
88 <constant>GL_INVALID_ENUM
</constant> is generated if
<parameter>identifier
</parameter>
89 is not one of the accepted object types.
92 <constant>GL_INVALID_OPERATION
</constant> is generated if
<parameter>name
</parameter>
93 is not the name of an existing object of the type specified by
<parameter>identifier
</parameter>.
96 <constant>GL_INVALID_VALUE
</constant> is generated if the number of characters in
97 <parameter>label
</parameter>, excluding the null terminator when
<parameter>length
</parameter>
98 is negative, is greater than the value of
<constant>GL_MAX_LABEL_LENGTH
</constant>.
101 <refsect1 id=
"associatedgets"><title>Associated Gets
</title>
103 <citerefentry><refentrytitle>glGet
</refentrytitle></citerefentry> with argument
<constant>GL_MAX_LABEL_LENGTH
</constant>.
106 <refsect1 id=
"seealso"><title>See Also
</title>
108 <citerefentry><refentrytitle>glPushDebugGroup
</refentrytitle></citerefentry>,
109 <citerefentry><refentrytitle>glPopDebugGroup
</refentrytitle></citerefentry>,
110 <citerefentry><refentrytitle>glObjectPtrLabel
</refentrytitle></citerefentry>.
113 <refsect1 id=
"Copyright"><title>Copyright
</title>
115 Copyright
<trademark class=
"copyright"></trademark> 2012 Khronos Group.
116 This material may be distributed subject to the terms and conditions set forth in
117 the Open Publication License, v
1.0,
8 June
1999.
118 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.