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">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>glRenderbufferStorage
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glRenderbufferStorage
</refname>
17 <refpurpose>establish data storage, format and dimensions of a renderbuffer object's image
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
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>
30 <refsect1 id=
"parameters"><title>Parameters
</title>
33 <term><parameter>target
</parameter></term>
36 Specifies a binding to which the target of the allocation and must be
<constant>GL_RENDERBUFFER
</constant>.
41 <term><parameter>internalformat
</parameter></term>
44 Specifies the internal format to use for the renderbuffer object's image.
49 <term><parameter>width
</parameter></term>
52 Specifies the width of the renderbuffer, in pixels.
57 <term><parameter>height
</parameter></term>
60 Specifies the height of the renderbuffer, in pixels.
66 <refsect1 id=
"description"><title>Description
</title>
68 <function>glRenderbufferStorage
</function> is equivalent to calling
69 <citerefentry><refentrytitle>glRenderbufferStorageMultisample
</refentrytitle></citerefentry> with the
70 <parameter>samples
</parameter> set to zero.
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>.
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.
85 <refsect1 id=
"errors"><title>Errors
</title>
87 <constant>GL_INVALID_ENUM
</constant> is generated if
<parameter>target
</parameter> is not
<constant>GL_RENDERBUFFER
</constant>.
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>.
94 <constant>GL_INVALID_ENUM
</constant> is generated if
<parameter>internalformat
</parameter> is not a color-renderable, depth-renderable,
95 or stencil-renderable format.
98 <constant>GL_OUT_OF_MEMORY
</constant> is generated if the GL is unable to create a data store of the requested size.
101 <refsect1 id=
"seealso"><title>See Also
</title>
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>
110 <refsect1 id=
"Copyright"><title>Copyright
</title>
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>.