2013-10-10 23:58:54 +00:00
<?xml version="1.0" encoding="UTF-8"?>
< !DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
"http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
<refentry id= "glGetBufferParameteriv" >
2013-11-03 11:43:50 +00:00
<refentryinfo >
<copyright >
<year > 2005</year>
<holder > Sams Publishing</holder>
</copyright>
<copyright >
<year > 2010-2013</year>
<holder > Khronos Group</holder>
</copyright>
</refentryinfo>
2013-10-10 23:58:54 +00:00
<refmeta >
<refentrytitle > glGetBufferParameteriv</refentrytitle>
<manvolnum > 3G</manvolnum>
</refmeta>
<refnamediv >
<refname > glGetBufferParameteriv</refname>
<refpurpose > return parameters of a buffer object</refpurpose>
</refnamediv>
<refsynopsisdiv > <title > C Specification</title>
<funcsynopsis >
<funcprototype >
<funcdef > void <function > glGetBufferParameteriv</function> </funcdef>
<paramdef > GLenum <parameter > target</parameter> </paramdef>
<paramdef > GLenum <parameter > value</parameter> </paramdef>
<paramdef > GLint * <parameter > data</parameter> </paramdef>
</funcprototype>
</funcsynopsis>
2013-10-23 18:17:08 +00:00
<funcsynopsis >
<funcprototype >
<funcdef > void <function > glGetBufferParameteri64v</function> </funcdef>
<paramdef > GLenum <parameter > target</parameter> </paramdef>
<paramdef > GLenum <parameter > value</parameter> </paramdef>
<paramdef > GLint64 * <parameter > data</parameter> </paramdef>
</funcprototype>
</funcsynopsis>
2013-10-10 23:58:54 +00:00
</refsynopsisdiv>
<refsect1 id= "parameters" > <title > Parameters</title>
<variablelist >
<varlistentry >
<term > <parameter > target</parameter> </term>
<listitem >
<para >
Specifies the target buffer object.
2013-10-23 18:17:08 +00:00
The symbolic constant must be
<constant > GL_ARRAY_BUFFER</constant> ,
<constant > GL_ATOMIC_COUNTER_BUFFER</constant> ,
2013-10-10 23:58:54 +00:00
<constant > GL_COPY_READ_BUFFER</constant> ,
<constant > GL_COPY_WRITE_BUFFER</constant> ,
2013-10-23 18:17:08 +00:00
<constant > GL_DRAW_INDIRECT_BUFFER</constant> ,
<constant > GL_DISPATCH_INDIRECT_BUFFER</constant> ,
2013-10-10 23:58:54 +00:00
<constant > GL_ELEMENT_ARRAY_BUFFER</constant> ,
<constant > GL_PIXEL_PACK_BUFFER</constant> ,
<constant > GL_PIXEL_UNPACK_BUFFER</constant> ,
2013-10-23 18:17:08 +00:00
<constant > GL_QUERY_BUFFER</constant> ,
<constant > GL_SHADER_STORAGE_BUFFER</constant> ,
2013-10-10 23:58:54 +00:00
<constant > GL_TEXTURE_BUFFER</constant> ,
<constant > GL_TRANSFORM_FEEDBACK_BUFFER</constant> , or
<constant > GL_UNIFORM_BUFFER</constant> .
</para>
</listitem>
</varlistentry>
<varlistentry >
<term > <parameter > value</parameter> </term>
<listitem >
<para >
Specifies the symbolic name of a buffer object parameter.
2013-11-03 11:43:50 +00:00
Accepted values are <constant > GL_BUFFER_ACCESS</constant> , <constant > GL_BUFFER_MAPPED</constant> ,
2013-10-10 23:58:54 +00:00
<constant > GL_BUFFER_SIZE</constant> , or <constant > GL_BUFFER_USAGE</constant> .
</para>
</listitem>
</varlistentry>
<varlistentry >
<term > <parameter > data</parameter> </term>
<listitem >
<para >
Returns the requested parameter.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id= "description" > <title > Description</title>
<para >
<function > glGetBufferParameteriv</function> returns in <parameter > data</parameter> a selected parameter of the buffer object
specified by <parameter > target</parameter> .
</para>
<para >
<parameter > value</parameter> names a specific buffer object parameter, as follows:
</para>
<variablelist >
<varlistentry >
<term > <constant > GL_BUFFER_ACCESS</constant> </term>
<listitem >
<para >
2013-11-03 11:43:50 +00:00
<parameter > params</parameter> returns the access policy set while mapping the buffer object.
2013-10-10 23:58:54 +00:00
The initial value is <constant > GL_READ_WRITE</constant> .
</para>
</listitem>
</varlistentry>
<varlistentry >
<term > <constant > GL_BUFFER_MAPPED</constant> </term>
<listitem >
<para >
2013-11-03 11:43:50 +00:00
<parameter > params</parameter> returns a flag indicating whether the buffer object is currently
2013-10-10 23:58:54 +00:00
mapped. The initial value is <constant > GL_FALSE</constant> .
</para>
</listitem>
</varlistentry>
<varlistentry >
<term > <constant > GL_BUFFER_SIZE</constant> </term>
<listitem >
<para >
2013-11-03 11:43:50 +00:00
<parameter > params</parameter> returns the size of the buffer object, measured in bytes.
2013-10-10 23:58:54 +00:00
The initial value is 0.
</para>
</listitem>
</varlistentry>
<varlistentry >
<term > <constant > GL_BUFFER_USAGE</constant> </term>
<listitem >
<para >
<parameter > params</parameter> returns the buffer object's usage pattern. The initial value is
<constant > GL_STATIC_DRAW</constant> .
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id= "notes" > <title > Notes</title>
<para >
If an error is generated,
no change is made to the contents of <parameter > data</parameter> .
</para>
2013-10-23 18:17:08 +00:00
<para >
The <constant > GL_ATOMIC_COUNTER_BUFER</constant> target is available only if the GL version is 4.2 or greater.
</para>
<para >
The <constant > GL_DISPATCH_INDIRECT_BUFFER</constant> and <constant > GL_SHADER_STORAGE_BUFFER</constant> targets are available only if the GL version is 4.3 or greater.
</para>
<para >
The <constant > GL_QUERY_BUFFER</constant> target is available only if the GL version is 4.4 or greater.
</para>
2013-10-10 23:58:54 +00:00
</refsect1>
<refsect1 id= "errors" > <title > Errors</title>
<para >
<constant > GL_INVALID_ENUM</constant> is generated if <parameter > target</parameter> or <parameter > value</parameter> is not an
accepted value.
</para>
<para >
<constant > GL_INVALID_OPERATION</constant> is generated if the reserved buffer object name 0 is bound to <parameter > target</parameter> .
</para>
</refsect1>
<refsect1 id= "seealso" > <title > See Also</title>
<para >
<citerefentry > <refentrytitle > glBindBuffer</refentrytitle> </citerefentry> ,
<citerefentry > <refentrytitle > glBufferData</refentrytitle> </citerefentry> ,
<citerefentry > <refentrytitle > glMapBuffer</refentrytitle> </citerefentry> ,
<citerefentry > <refentrytitle > glUnmapBuffer</refentrytitle> </citerefentry>
</para>
</refsect1>
<refsect1 id= "Copyright" > <title > Copyright</title>
<para >
2013-11-03 11:43:50 +00:00
Copyright <trademark class= "copyright" > </trademark> 2005 Addison-Wesley.
Copyright <trademark class= "copyright" > </trademark> 2010-2013 Khronos Group.
This material may be distributed subject to the terms and conditions set forth in
2013-10-10 23:58:54 +00:00
the Open Publication License, v 1.0, 8 June 1999.
<ulink url= "http://opencontent.org/openpub/" > http://opencontent.org/openpub/</ulink> .
</para>
</refsect1>
</refentry>