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=
"glGetObjectLabel">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>glGetObjectLabel
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glGetObjectLabel
</refname>
17 <refpurpose>retrieve the label of a named object identified within a namespace
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>glGetObjectLabel
</function></funcdef>
23 <paramdef>GLenum
<parameter>identifier
</parameter></paramdef>
24 <paramdef>GLuint
<parameter>name
</parameter></paramdef>
25 <paramdef>GLsizei
<parameter>bifSize
</parameter></paramdef>
26 <paramdef>GLsizei *
<parameter>length
</parameter></paramdef>
27 <paramdef>char *
<parameter>label
</parameter></paramdef>
31 <refsect1 id=
"parameters"><title>Parameters
</title>
34 <term><parameter>identifier
</parameter></term>
37 The namespace from which the name of the object is allocated.
42 <term><parameter>name
</parameter></term>
45 The name of the object whose label to retrieve.
50 <term><parameter>bufSize
</parameter></term>
53 The length of the buffer whose address is in
<parameter>label
</parameter>.
58 <term><parameter>length
</parameter></term>
61 The address of a variable to receive the length of the object label.
66 <term><parameter>label
</parameter></term>
69 The address of a string that will receive the object label.
75 <refsect1 id=
"description"><title>Description
</title>
77 <function>glGetObjectLabel
</function> retrieves the label of the object identified by
78 <parameter>name
</parameter> within the namespace given by
<parameter>identifier
</parameter>.
79 <parameter>identifier
</parameter> must be one of
<constant>GL_BUFFER
</constant>,
<constant>GL_SHADER
</constant>,
80 <constant>GL_PROGRAM
</constant>,
<constant>GL_VERTEX_ARRAY
</constant>,
<constant>GL_QUERY
</constant>,
81 <constant>GL_PROGRAM_PIPELINE
</constant>,
<constant>GL_TRANSFORM_FEEDBACK
</constant>,
<constant>GL_SAMPLER
</constant>,
82 <constant>GL_TEXTURE
</constant>,
<constant>GL_RENDERBUFFER
</constant>,
<constant>GL_FRAMEBUFFER
</constant>,
83 to indicate the namespace containing the names of buffers, shaders, programs, vertex array objects, query objects,
84 program pipelines, transform feedback objects, samplers, textures, renderbuffers and frame
85 buffers, respectively.
88 <parameter>label
</parameter> is the address of a string that will be used to store the object label.
89 <parameter>bufSize
</parameter> specifies the number of characters in the array identified by
<parameter>label
</parameter>.
90 <parameter>length
</parameter> contains the address of a variable which will receive the the number of characters in the object label.
91 If
<parameter>length
</parameter> is NULL, then it is ignored and no data is written. Likewise, if
<parameter>label
</parameter>
92 is NULL, or if
<parameter>bufSize
</parameter> is zero then no data is written to
<parameter>label
</parameter>.
95 <refsect1 id=
"errors"><title>Errors
</title>
97 <constant>GL_INVALID_ENUM
</constant> is generated if
<parameter>identifier
</parameter>
98 is not one of the accepted object types.
101 <constant>GL_INVALID_OPERATION
</constant> is generated if
<parameter>name
</parameter>
102 is not the name of an existing object of the type specified by
<parameter>identifier
</parameter>.
105 <constant>GL_INVALID_VALUE
</constant> is generated if
<parameter>bufSize
</parameter> is
109 If not NULL,
<parameter>length
</parameter> and
<parameter>label
</parameter> should be addresses
110 to which the client has write access, otherwise undefined behavior, including process termination
114 <refsect1 id=
"associatedgets"><title>Associated Gets
</title>
116 <citerefentry><refentrytitle>glGet
</refentrytitle></citerefentry> with argument
<constant>GL_MAX_LABEL_LENGTH
</constant>.
119 <refsect1 id=
"seealso"><title>See Also
</title>
121 <citerefentry><refentrytitle>glPushDebugGroup
</refentrytitle></citerefentry>,
122 <citerefentry><refentrytitle>glPopDebugGroup
</refentrytitle></citerefentry>,
123 <citerefentry><refentrytitle>glObjectLabel
</refentrytitle></citerefentry>,
124 <citerefentry><refentrytitle>glGetObjectPtrLabel
</refentrytitle></citerefentry>.
127 <refsect1 id=
"Copyright"><title>Copyright
</title>
129 Copyright
<trademark class=
"copyright"></trademark> 2012 Khronos Group.
130 This material may be distributed subject to the terms and conditions set forth in
131 the Open Publication License, v
1.0,
8 June
1999.
132 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.