Commit | Line | Data |
---|---|---|
7faf1d71 AW |
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 | </refsynopsisdiv> | |
29 | <refsect1 id="parameters"><title>Parameters</title> | |
30 | <variablelist> | |
31 | <varlistentry> | |
32 | <term><parameter>target</parameter></term> | |
33 | <listitem> | |
34 | <para> | |
35 | Specifies the target buffer object. | |
36 | The symbolic constant must be <constant>GL_ARRAY_BUFFER</constant>, | |
37 | <constant>GL_ELEMENT_ARRAY_BUFFER</constant>, | |
38 | <constant>GL_PIXEL_PACK_BUFFER</constant>, or | |
39 | <constant>GL_PIXEL_UNPACK_BUFFER</constant>. | |
40 | </para> | |
41 | </listitem> | |
42 | </varlistentry> | |
43 | <varlistentry> | |
44 | <term><parameter>value</parameter></term> | |
45 | <listitem> | |
46 | <para> | |
47 | Specifies the symbolic name of a buffer object parameter. | |
48 | Accepted values are <constant>GL_BUFFER_ACCESS</constant>, <constant>GL_BUFFER_MAPPED</constant>, | |
49 | <constant>GL_BUFFER_SIZE</constant>, or <constant>GL_BUFFER_USAGE</constant>. | |
50 | </para> | |
51 | </listitem> | |
52 | </varlistentry> | |
53 | <varlistentry> | |
54 | <term><parameter>data</parameter></term> | |
55 | <listitem> | |
56 | <para> | |
57 | Returns the requested parameter. | |
58 | </para> | |
59 | </listitem> | |
60 | </varlistentry> | |
61 | </variablelist> | |
62 | </refsect1> | |
63 | <refsect1 id="description"><title>Description</title> | |
64 | <para> | |
65 | <function>glGetBufferParameteriv</function> returns in <parameter>data</parameter> a selected parameter of the buffer object | |
66 | specified by <parameter>target</parameter>. | |
67 | </para> | |
68 | <para> | |
69 | <parameter>value</parameter> names a specific buffer object parameter, as follows: | |
70 | </para> | |
71 | <variablelist> | |
72 | <varlistentry> | |
73 | <term><constant>GL_BUFFER_ACCESS</constant></term> | |
74 | <listitem> | |
75 | <para> | |
76 | <parameter>params</parameter> returns the access policy set while mapping the buffer object. | |
77 | The initial value is <constant>GL_READ_WRITE</constant>. | |
78 | </para> | |
79 | </listitem> | |
80 | </varlistentry> | |
81 | <varlistentry> | |
82 | <term><constant>GL_BUFFER_MAPPED</constant></term> | |
83 | <listitem> | |
84 | <para> | |
85 | <parameter>params</parameter> returns a flag indicating whether the buffer object is currently | |
86 | mapped. The initial value is <constant>GL_FALSE</constant>. | |
87 | </para> | |
88 | </listitem> | |
89 | </varlistentry> | |
90 | <varlistentry> | |
91 | <term><constant>GL_BUFFER_SIZE</constant></term> | |
92 | <listitem> | |
93 | <para> | |
94 | <parameter>params</parameter> returns the size of the buffer object, measured in bytes. | |
95 | The initial value is 0. | |
96 | </para> | |
97 | </listitem> | |
98 | </varlistentry> | |
99 | <varlistentry> | |
100 | <term><constant>GL_BUFFER_USAGE</constant></term> | |
101 | <listitem> | |
102 | <para> | |
103 | <parameter>params</parameter> returns the buffer object's usage pattern. The initial value is | |
104 | <constant>GL_STATIC_DRAW</constant>. | |
105 | </para> | |
106 | </listitem> | |
107 | </varlistentry> | |
108 | </variablelist> | |
109 | </refsect1> | |
110 | <refsect1 id="notes"><title>Notes</title> | |
111 | <para> | |
112 | If an error is generated, | |
113 | no change is made to the contents of <parameter>data</parameter>. | |
114 | </para> | |
115 | <para> | |
116 | <function>glGetBufferParameteriv</function> is available only if the GL version is 1.5 or greater. | |
117 | </para> | |
118 | <para> | |
119 | Targets <constant>GL_PIXEL_PACK_BUFFER</constant> and <constant>GL_PIXEL_UNPACK_BUFFER</constant> are available | |
120 | only if the GL version is 2.1 or greater. | |
121 | </para> | |
122 | </refsect1> | |
123 | <refsect1 id="errors"><title>Errors</title> | |
124 | <para> | |
125 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> or <parameter>value</parameter> is not an | |
126 | accepted value. | |
127 | </para> | |
128 | <para> | |
129 | <constant>GL_INVALID_OPERATION</constant> is generated if the reserved buffer object name 0 is bound to <parameter>target</parameter>. | |
130 | </para> | |
131 | <para> | |
132 | <constant>GL_INVALID_OPERATION</constant> is generated if <function>glGetBufferParameteriv</function> | |
133 | is executed between the execution of <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> | |
134 | and the corresponding execution of <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>. | |
135 | </para> | |
136 | </refsect1> | |
137 | <refsect1 id="seealso"><title>See Also</title> | |
138 | <para> | |
139 | <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>, | |
140 | <citerefentry><refentrytitle>glBufferData</refentrytitle></citerefentry>, | |
141 | <citerefentry><refentrytitle>glMapBuffer</refentrytitle></citerefentry>, | |
142 | <citerefentry><refentrytitle>glUnmapBuffer</refentrytitle></citerefentry> | |
143 | </para> | |
144 | </refsect1> | |
145 | <refsect1 id="Copyright"><title>Copyright</title> | |
146 | <para> | |
147 | Copyright <trademark class="copyright"></trademark> 2005 Addison-Wesley. | |
148 | This material may be distributed subject to the terms and conditions set forth in | |
149 | the Open Publication License, v 1.0, 8 June 1999. | |
150 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>. | |
151 | </para> | |
152 | </refsect1> | |
153 | </refentry> |