Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1452 | chris | 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="glGetBufferSubData"> |
||
| 5 | <refmeta> |
||
| 6 | <refmetainfo> |
||
| 7 | <copyright> |
||
| 8 | <year>2005</year> |
||
| 9 | <holder>Sams Publishing</holder> |
||
| 10 | </copyright> |
||
| 11 | </refmetainfo> |
||
| 12 | <refentrytitle>glGetBufferSubData</refentrytitle> |
||
| 13 | <manvolnum>3G</manvolnum> |
||
| 14 | </refmeta> |
||
| 15 | <refnamediv> |
||
| 16 | <refname>glGetBufferSubData</refname> |
||
| 17 | <refpurpose>returns a subset of a buffer object's data store</refpurpose> |
||
| 18 | </refnamediv> |
||
| 19 | <refsynopsisdiv><title>C Specification</title> |
||
| 20 | <funcsynopsis> |
||
| 21 | <funcprototype> |
||
| 22 | <funcdef>void <function>glGetBufferSubData</function></funcdef> |
||
| 23 | <paramdef>GLenum <parameter>target</parameter></paramdef> |
||
| 24 | <paramdef>GLintptr <parameter>offset</parameter></paramdef> |
||
| 25 | <paramdef>GLsizeiptr <parameter>size</parameter></paramdef> |
||
| 26 | <paramdef>GLvoid * <parameter>data</parameter></paramdef> |
||
| 27 | </funcprototype> |
||
| 28 | </funcsynopsis> |
||
| 29 | </refsynopsisdiv> |
||
| 30 | <!-- eqn: ignoring delim $$ --> |
||
| 31 | <refsect1 id="parameters"><title>Parameters</title> |
||
| 32 | <variablelist> |
||
| 33 | <varlistentry> |
||
| 34 | <term><parameter>target</parameter></term> |
||
| 35 | <listitem> |
||
| 36 | <para> |
||
| 37 | Specifies the target buffer object. |
||
| 38 | The symbolic constant must be <constant>GL_ARRAY_BUFFER</constant>, |
||
| 39 | <constant>GL_ELEMENT_ARRAY_BUFFER</constant>, |
||
| 40 | <constant>GL_PIXEL_PACK_BUFFER</constant>, or |
||
| 41 | <constant>GL_PIXEL_UNPACK_BUFFER</constant>. |
||
| 42 | </para> |
||
| 43 | </listitem> |
||
| 44 | </varlistentry> |
||
| 45 | <varlistentry> |
||
| 46 | <term><parameter>offset</parameter></term> |
||
| 47 | <listitem> |
||
| 48 | <para> |
||
| 49 | Specifies the offset into the buffer object's data store from which data will be returned, |
||
| 50 | measured in bytes. |
||
| 51 | </para> |
||
| 52 | </listitem> |
||
| 53 | </varlistentry> |
||
| 54 | <varlistentry> |
||
| 55 | <term><parameter>size</parameter></term> |
||
| 56 | <listitem> |
||
| 57 | <para> |
||
| 58 | Specifies the size in bytes of the data store region being returned. |
||
| 59 | </para> |
||
| 60 | </listitem> |
||
| 61 | </varlistentry> |
||
| 62 | <varlistentry> |
||
| 63 | <term><parameter>data</parameter></term> |
||
| 64 | <listitem> |
||
| 65 | <para> |
||
| 66 | Specifies a pointer to the location where buffer object data is returned. |
||
| 67 | </para> |
||
| 68 | </listitem> |
||
| 69 | </varlistentry> |
||
| 70 | </variablelist> |
||
| 71 | </refsect1> |
||
| 72 | <refsect1 id="description"><title>Description</title> |
||
| 73 | <para> |
||
| 74 | <function>glGetBufferSubData</function> returns some or all of the data from the buffer object currently |
||
| 75 | bound to <parameter>target</parameter>. Data starting at byte offset <parameter>offset</parameter> and |
||
| 76 | extending for <parameter>size</parameter> bytes is copied from the data store to the memory pointed to by |
||
| 77 | <parameter>data</parameter>. An error is thrown if the buffer object is currently mapped, or if |
||
| 78 | <parameter>offset</parameter> and <parameter>size</parameter> together define a range beyond the bounds |
||
| 79 | of the buffer object's data store. |
||
| 80 | </para> |
||
| 81 | </refsect1> |
||
| 82 | <refsect1 id="notes"><title>Notes</title> |
||
| 83 | <para> |
||
| 84 | If an error is generated, |
||
| 85 | no change is made to the contents of <parameter>data</parameter>. |
||
| 86 | </para> |
||
| 87 | <para> |
||
| 88 | <function>glGetBufferSubData</function> is available only if the GL version is 1.5 or greater. |
||
| 89 | </para> |
||
| 90 | <para> |
||
| 91 | Targets <constant>GL_PIXEL_PACK_BUFFER</constant> and <constant>GL_PIXEL_UNPACK_BUFFER</constant> are available |
||
| 92 | only if the GL version is 2.1 or greater. |
||
| 93 | </para> |
||
| 94 | </refsect1> |
||
| 95 | <refsect1 id="errors"><title>Errors</title> |
||
| 96 | <para> |
||
| 97 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not |
||
| 98 | <constant>GL_ARRAY_BUFFER</constant>, <constant>GL_ELEMENT_ARRAY_BUFFER</constant>, |
||
| 99 | <constant>GL_PIXEL_PACK_BUFFER</constant>, or <constant>GL_PIXEL_UNPACK_BUFFER</constant>. |
||
| 100 | </para> |
||
| 101 | <para> |
||
| 102 | <constant>GL_INVALID_VALUE</constant> is generated if <parameter>offset</parameter> or |
||
| 103 | <parameter>size</parameter> is negative, or if together they define a region of memory |
||
| 104 | that extends beyond the buffer object's allocated data store. |
||
| 105 | </para> |
||
| 106 | <para> |
||
| 107 | <constant>GL_INVALID_OPERATION</constant> is generated if the reserved buffer object name 0 is bound to <parameter>target</parameter>. |
||
| 108 | </para> |
||
| 109 | <para> |
||
| 110 | <constant>GL_INVALID_OPERATION</constant> is generated if the buffer object being queried is mapped. |
||
| 111 | </para> |
||
| 112 | <para> |
||
| 113 | <constant>GL_INVALID_OPERATION</constant> is generated if <function>glGetBufferSubData</function> |
||
| 114 | is executed between the execution of |
||
| 115 | <citerefentry><refentrytitle>glBegin</refentrytitle></citerefentry> and the corresponding execution of |
||
| 116 | <citerefentry><refentrytitle>glEnd</refentrytitle></citerefentry>. |
||
| 117 | </para> |
||
| 118 | </refsect1> |
||
| 119 | <refsect1 id="seealso"><title>See Also</title> |
||
| 120 | <para> |
||
| 121 | <citerefentry><refentrytitle>glBindBuffer</refentrytitle></citerefentry>, |
||
| 122 | <citerefentry><refentrytitle>glBufferData</refentrytitle></citerefentry>, |
||
| 123 | <citerefentry><refentrytitle>glBufferSubData</refentrytitle></citerefentry>, |
||
| 124 | <citerefentry><refentrytitle>glMapBuffer</refentrytitle></citerefentry>, |
||
| 125 | <citerefentry><refentrytitle>glUnmapBuffer</refentrytitle></citerefentry> |
||
| 126 | </para> |
||
| 127 | </refsect1> |
||
| 128 | <refsect1 id="Copyright"><title>Copyright</title> |
||
| 129 | <para> |
||
| 130 | Copyright <trademark class="copyright"></trademark> 2005 Addison-Wesley. |
||
| 131 | This material may be distributed subject to the terms and conditions set forth in |
||
| 132 | the Open Publication License, v 1.0, 8 June 1999. |
||
| 133 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>. |
||
| 134 | </para> |
||
| 135 | </refsect1> |
||
| 136 | </refentry> |