| 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="glRenderbufferStorage"> |
| 5 | <refmeta> |
| 6 | <refmetainfo> |
| 7 | <copyright> |
| 8 | <year>2010</year> |
| 9 | <holder>Khronos Group</holder> |
| 10 | </copyright> |
| 11 | </refmetainfo> |
| 12 | <refentrytitle>glRenderbufferStorage</refentrytitle> |
| 13 | <manvolnum>3G</manvolnum> |
| 14 | </refmeta> |
| 15 | <refnamediv> |
| 16 | <refname>glRenderbufferStorage</refname> |
| 17 | <refpurpose>establish data storage, format and dimensions of a renderbuffer object's image</refpurpose> |
| 18 | </refnamediv> |
| 19 | <refsynopsisdiv><title>C Specification</title> |
| 20 | <funcsynopsis> |
| 21 | <funcprototype> |
| 22 | <funcdef>void <function>glRenderbufferStorage</function></funcdef> |
| 23 | <paramdef>GLenum <parameter>target</parameter></paramdef> |
| 24 | <paramdef>GLenum <parameter>internalformat</parameter></paramdef> |
| 25 | <paramdef>GLsizei <parameter>width</parameter></paramdef> |
| 26 | <paramdef>GLsizei <parameter>height</parameter></paramdef> |
| 27 | </funcprototype> |
| 28 | </funcsynopsis> |
| 29 | </refsynopsisdiv> |
| 30 | <refsect1 id="parameters"><title>Parameters</title> |
| 31 | <variablelist> |
| 32 | <varlistentry> |
| 33 | <term><parameter>target</parameter></term> |
| 34 | <listitem> |
| 35 | <para> |
| 36 | Specifies a binding to which the target of the allocation and must be <constant>GL_RENDERBUFFER</constant>. |
| 37 | </para> |
| 38 | </listitem> |
| 39 | </varlistentry> |
| 40 | <varlistentry> |
| 41 | <term><parameter>internalformat</parameter></term> |
| 42 | <listitem> |
| 43 | <para> |
| 44 | Specifies the internal format to use for the renderbuffer object's image. |
| 45 | </para> |
| 46 | </listitem> |
| 47 | </varlistentry> |
| 48 | <varlistentry> |
| 49 | <term><parameter>width</parameter></term> |
| 50 | <listitem> |
| 51 | <para> |
| 52 | Specifies the width of the renderbuffer, in pixels. |
| 53 | </para> |
| 54 | </listitem> |
| 55 | </varlistentry> |
| 56 | <varlistentry> |
| 57 | <term><parameter>height</parameter></term> |
| 58 | <listitem> |
| 59 | <para> |
| 60 | Specifies the height of the renderbuffer, in pixels. |
| 61 | </para> |
| 62 | </listitem> |
| 63 | </varlistentry> |
| 64 | </variablelist> |
| 65 | </refsect1> |
| 66 | <refsect1 id="description"><title>Description</title> |
| 67 | <para> |
| 68 | <function>glRenderbufferStorage</function> is equivalent to calling |
| 69 | <citerefentry><refentrytitle>glRenderbufferStorageMultisample</refentrytitle></citerefentry> with the |
| 70 | <parameter>samples</parameter> set to zero. |
| 71 | </para> |
| 72 | <para> |
| 73 | The target of the operation, specified by <parameter>target</parameter> must be <constant>GL_RENDERBUFFER</constant>. |
| 74 | <parameter>internalformat</parameter> specifies the internal format to be used for the renderbuffer object's storage and |
| 75 | must be a color-renderable, depth-renderable, or stencil-renderable format. |
| 76 | <parameter>width</parameter> and <parameter>height</parameter> are the dimensions, in pixels, of the renderbuffer. |
| 77 | Both <parameter>width</parameter> and <parameter>height</parameter> must be less than or equal to the value of |
| 78 | <constant>GL_MAX_RENDERBUFFER_SIZE</constant>. |
| 79 | </para> |
| 80 | <para> |
| 81 | Upon success, <function>glRenderbufferStorage</function> deletes any existing data store for the renderbuffer |
| 82 | image and the contents of the data store after calling <function>glRenderbufferStorage</function> are undefined. |
| 83 | </para> |
| 84 | </refsect1> |
| 85 | <refsect1 id="errors"><title>Errors</title> |
| 86 | <para> |
| 87 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not <constant>GL_RENDERBUFFER</constant>. |
| 88 | </para> |
| 89 | <para> |
| 90 | <constant>GL_INVALID_VALUE</constant> is generated if either of <parameter>width</parameter> or <parameter>height</parameter> is negative, |
| 91 | or greater than the value of <constant>GL_MAX_RENDERBUFFER_SIZE</constant>. |
| 92 | </para> |
| 93 | <para> |
| 94 | <constant>GL_INVALID_ENUM</constant> is generated if <parameter>internalformat</parameter> is not a color-renderable, depth-renderable, |
| 95 | or stencil-renderable format. |
| 96 | </para> |
| 97 | <para> |
| 98 | <constant>GL_OUT_OF_MEMORY</constant> is generated if the GL is unable to create a data store of the requested size. |
| 99 | </para> |
| 100 | </refsect1> |
| 101 | <refsect1 id="seealso"><title>See Also</title> |
| 102 | <para> |
| 103 | <citerefentry><refentrytitle>glGenRenderbuffers</refentrytitle></citerefentry>, |
| 104 | <citerefentry><refentrytitle>glBindRenderbuffer</refentrytitle></citerefentry>, |
| 105 | <citerefentry><refentrytitle>glRenderbufferStorageMultisample</refentrytitle></citerefentry>, |
| 106 | <citerefentry><refentrytitle>glFramebufferRenderbuffer</refentrytitle></citerefentry>, |
| 107 | <citerefentry><refentrytitle>glDeleteRenderbuffers</refentrytitle></citerefentry> |
| 108 | </para> |
| 109 | </refsect1> |
| 110 | <refsect1 id="Copyright"><title>Copyright</title> |
| 111 | <para> |
| 112 | Copyright <trademark class="copyright"></trademark> 2010 Khronos Group. |
| 113 | This material may be distributed subject to the terms and conditions set forth in |
| 114 | the Open Publication License, v 1.0, 8 June 1999. |
| 115 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>. |
| 116 | </para> |
| 117 | </refsect1> |
| 118 | </refentry> |