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