| 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="glGetBufferParameteriv"> |
| 5 | <refmeta> |
| 6 | <refmetainfo> |
| 7 | <copyright> |
| 8 | <year>2005</year> |
| 9 | <holder>Sams Publishing</holder> |
| 10 | </copyright> |
| 11 | </refmetainfo> |
| 12 | <refentrytitle>glGetBufferParameteriv</refentrytitle> |
| 13 | <manvolnum>3G</manvolnum> |
| 14 | </refmeta> |
| 15 | <refnamediv> |
| 16 | <refname>glGetBufferParameteriv</refname> |
| 17 | <refpurpose>return parameters of a buffer object</refpurpose> |
| 18 | </refnamediv> |
| 19 | <refsynopsisdiv><title>C Specification</title> |
| 20 | <funcsynopsis> |
| 21 | <funcprototype> |
| 22 | <funcdef>void <function>glGetBufferParameteriv</function></funcdef> |
| 23 | <paramdef>GLenum <parameter>target</parameter></paramdef> |
| 24 | <paramdef>GLenum <parameter>value</parameter></paramdef> |
| 25 | <paramdef>GLint * <parameter>data</parameter></paramdef> |
| 26 | </funcprototype> |
| 27 | </funcsynopsis> |
| 28 | <funcsynopsis> |
| 29 | <funcprototype> |
| 30 | <funcdef>void <function>glGetBufferParameteri64v</function></funcdef> |
| 31 | <paramdef>GLenum <parameter>target</parameter></paramdef> |
| 32 | <paramdef>GLenum <parameter>value</parameter></paramdef> |
| 33 | <paramdef>GLint64 * <parameter>data</parameter></paramdef> |
| 34 | </funcprototype> |
| 35 | </funcsynopsis> |
| 36 | </refsynopsisdiv> |
| 37 | <refsect1 id="parameters"><title>Parameters</title> |
| 38 | <variablelist> |
| 39 | <varlistentry> |
| 40 | <term><parameter>target</parameter></term> |
| 41 | <listitem> |
| 42 | <para> |
| 43 | Specifies the target buffer object. |
| 44 | The symbolic constant must be |
| 45 | <constant>GL_ARRAY_BUFFER</constant>, |
| 46 | <constant>GL_ATOMIC_COUNTER_BUFFER</constant>, |
| 47 | <constant>GL_COPY_READ_BUFFER</constant>, |
| 48 | <constant>GL_COPY_WRITE_BUFFER</constant>, |
| 49 | <constant>GL_DRAW_INDIRECT_BUFFER</constant>, |
| 50 | <constant>GL_DISPATCH_INDIRECT_BUFFER</constant>, |
| 51 | <constant>GL_ELEMENT_ARRAY_BUFFER</constant>, |
| 52 | <constant>GL_PIXEL_PACK_BUFFER</constant>, |
| 53 | <constant>GL_PIXEL_UNPACK_BUFFER</constant>, |
| 54 | <constant>GL_SHADER_STORAGE_BUFFER</constant>, |
| 55 | <constant>GL_TEXTURE_BUFFER</constant>, |
| 56 | <constant>GL_TRANSFORM_FEEDBACK_BUFFER</constant>, or |
| 57 | <constant>GL_UNIFORM_BUFFER</constant>. |
| 58 | </para> |
| 59 | </listitem> |
| 60 | </varlistentry> |
| 61 | <varlistentry> |
| 62 | <term><parameter>value</parameter></term> |
| 63 | <listitem> |
| 64 | <para> |
| 65 | Specifies the symbolic name of a buffer object parameter. |
| 66 | Accepted values are <constant>GL_BUFFER_ACCESS</constant>, <constant>GL_BUFFER_MAPPED</constant>, |
| 67 | <constant>GL_BUFFER_SIZE</constant>, or <constant>GL_BUFFER_USAGE</constant>. |
| 68 | </para> |
| 69 | </listitem> |
| 70 | </varlistentry> |
| 71 | <varlistentry> |
| 72 | <term><parameter>data</parameter></term> |
| 73 | <listitem> |
| 74 | <para> |
| 75 | Returns the requested parameter. |
| 76 | </para> |
| 77 | </listitem> |
| 78 | </varlistentry> |
| 79 | </variablelist> |
| 80 | </refsect1> |
| 81 | <refsect1 id="description"><title>Description</title> |
| 82 | <para> |
| 83 | <function>glGetBufferParameteriv</function> returns in <parameter>data</parameter> a selected parameter of the buffer object |
| 84 | specified by <parameter>target</parameter>. |
| 85 | </para> |
| 86 | <para> |
| 87 | <parameter>value</parameter> names a specific buffer object parameter, as follows: |
| 88 | </para> |
| 89 | <variablelist> |
| 90 | <varlistentry> |
| 91 | <term><constant>GL_BUFFER_ACCESS</constant></term> |
| 92 | <listitem> |
| 93 | <para> |
| 94 | <parameter>params</parameter> returns the access policy set while mapping the buffer object. |
| 95 | The initial value is <constant>GL_READ_WRITE</constant>. |
| 96 | </para> |
| 97 | </listitem> |
| 98 | </varlistentry> |
| 99 | <varlistentry> |
| 100 | <term><constant>GL_BUFFER_MAPPED</constant></term> |
| 101 | <listitem> |
| 102 | <para> |
| 103 | <parameter>params</parameter> returns a flag indicating whether the buffer object is currently |
| 104 | mapped. The initial value is <constant>GL_FALSE</constant>. |
| 105 | </para> |
| 106 | </listitem> |
| 107 | </varlistentry> |
| 108 | <varlistentry> |
| 109 | <term><constant>GL_BUFFER_SIZE</constant></term> |
| 110 | <listitem> |
| 111 | <para> |
| 112 | <parameter>params</parameter> returns the size of the buffer object, measured in bytes. |
| 113 | The initial value is 0. |
| 114 | </para> |
| 115 | </listitem> |
| 116 | </varlistentry> |
| 117 | <varlistentry> |
| 118 | <term><constant>GL_BUFFER_USAGE</constant></term> |
| 119 | <listitem> |
| 120 | <para> |
| 121 | <parameter>params</parameter> returns the buffer object's usage pattern. The initial value is |
| 122 | <constant>GL_STATIC_DRAW</constant>. |
| 123 | </para> |
| 124 | </listitem> |
| 125 | </varlistentry> |
| 126 | </variablelist> |
| 127 | </refsect1> |
| 128 | <refsect1 id="notes"><title>Notes</title> |
| 129 | <para> |
| 130 | If an error is generated, |
| 131 | no change is made to the contents of <parameter>data</parameter>. |
| 132 | </para> |
| 133 | <para> |
| 134 | The <constant>GL_ATOMIC_COUNTER_BUFER</constant> target is available only if the GL version is 4.2 or greater. |
| 135 | </para> |
| 136 | <para> |
| 137 | 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. |
| 138 | </para> |
| 139 | </refsect1> |
| 140 | <refsect1 id="errors"><title>Errors</title> |
| 141 | <para> |
| 142 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> or <parameter>value</parameter> is not an |
| 143 | accepted value. |
| 144 | </para> |
| 145 | <para> |
| 146 | <constant>GL_INVALID_OPERATION</constant> is generated if the reserved buffer object name 0 is bound to <parameter>target</parameter>. |
| 147 | </para> |
| 148 | </refsect1> |
| 149 | <refsect1 id="seealso"><title>See Also</title> |
| 150 | <para> |
| 151 | <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>, |
| 152 | <citerefentry><refentrytitle>glBufferData</refentrytitle></citerefentry>, |
| 153 | <citerefentry><refentrytitle>glMapBuffer</refentrytitle></citerefentry>, |
| 154 | <citerefentry><refentrytitle>glUnmapBuffer</refentrytitle></citerefentry> |
| 155 | </para> |
| 156 | </refsect1> |
| 157 | <refsect1 id="Copyright"><title>Copyright</title> |
| 158 | <para> |
| 159 | Copyright <trademark class="copyright"></trademark> 2005 Addison-Wesley. |
| 160 | This material may be distributed subject to the terms and conditions set forth in |
| 161 | the Open Publication License, v 1.0, 8 June 1999. |
| 162 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>. |
| 163 | </para> |
| 164 | </refsect1> |
| 165 | </refentry> |