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=
"glInvalidateFramebuffer">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>glInvalidateFramebuffer
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glInvalidateFramebuffer
</refname>
17 <refpurpose>invalidate the content some or all of a framebuffer object's attachments
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>glInvalidateFramebuffer
</function></funcdef>
23 <paramdef>GLenum
<parameter>target
</parameter></paramdef>
24 <paramdef>GLsizei
<parameter>numAttachments
</parameter></paramdef>
25 <paramdef>const GLenum *
<parameter>attachments
</parameter></paramdef>
29 <refsect1 id=
"parameters"><title>Parameters
</title>
32 <term><parameter>target
</parameter></term>
35 The target to which the framebuffer is attached.
<parameter>target
</parameter> must be
36 <constant>GL_FRAMEBUFFER
</constant>,
<constant>GL_DRAW_FRAMEBUFFER
</constant>, or
<constant>GL_READ_FRAMEBUFFER
</constant>.
41 <term><parameter>numAttachments
</parameter></term>
44 The number of entries in the
<parameter>attachments
</parameter> array.
49 <term><parameter>attachments
</parameter></term>
52 The address of an array identifying the attachments to be invalidated.
58 <refsect1 id=
"description"><title>Description
</title>
60 <function>glInvalidateFramebuffer
</function> invalidates the content
61 of a specified set of attachments of a framebuffer. The framebuffer
62 whose content to invalidate is indicated by setting
<parameter>target
</parameter>
63 to the target to which it is bound.
<parameter>target
</parameter> may be
64 <constant>GL_FRAMEBUFFER
</constant>,
<constant>GL_READ_FRAMEBUFFER
</constant> or
65 <constant>GL_DRAW_FRAMEBUFFER
</constant>.
<constant>GL_FRAMEBUFFER
</constant>
66 is treated as if it were
<constant>GL_DRAW_FRAMEBUFFER
</constant>.
69 The set of attachments whose content to invalidate are specified in an array whose address is given
70 by
<parameter>attachments
</parameter> and which contains
<parameter>numAttachments
</parameter>
71 elements. The elements of
<parameter>attachments
</parameter> must be
72 <constant>GL_DEPTH_ATTACHMENT
</constant>,
<constant>GL_STENCIL_ATTACHMENT
</constant>
73 <constant>GL_DEPTH_STENCIL_ATTACHMENT
</constant>, or
<constant>GL_COLOR_ATTACHMENT
<emphasis>i
</emphasis></constant>,
74 where
<emphasis>i
</emphasis> is between zero and the value of
<constant>GL_MAX_FRAMEBUFFER_ATTACHMENTS
</constant> minus one.
75 Furthermore, if the default framebuffer is bound to
<parameter>target
</parameter>, then
76 <parameter>attachments
</parameter> may contain
<constant>GL_FRONT_LEFT
</constant>,
77 <constant>GL_FRONT_RIGHT
</constant>,
<constant>GL_BACK_LEFT
</constant>,
<constant>GL_BACK_RIGHT
</constant>,
78 <constant>GL_AUX
<emphasis>i
</emphasis></constant>,
<constant>GL_ACCUM
</constant>,
79 <constant>GL_COLOR
</constant>,
<constant>GL_DEPTH
</constant>, or
<constant>GL_STENCIL
</constant>, identifying that specific buffer.
80 <constant>GL_COLOR
</constant>, is treated as
<constant>GL_BACK_LEFT
</constant> for a double-buffered context and
81 <constant>GL_FRONT_LEFT
</constant> for a single-buffered context.
82 After
<function>glInvalidateFramebuffer
</function> is executed, the contents
83 of the specified attachments become undefined.
86 <refsect1 id=
"errors"><title>Errors
</title>
88 <constant>GL_INVALID_ENUM
</constant> is generated if
<parameter>target
</parameter> is not one of the
89 accepted framebuffer target tokens.
92 <constant>GL_INVALID_ENUM
</constant> is generated if any element of
<parameter>attachments
</parameter> is
93 not one of the accepted framebuffer attachment tokens.
96 <constant>GL_INVALID_OPERATION
</constant> is generated if element of
<parameter>attachments
</parameter> is
97 <constant>GL_COLOR_ATTACHMENT
<emphasis>i
</emphasis></constant> where
<emphasis>i
</emphasis> is greater than or equal
98 to the value of
<constant>GL_MAX_COLOR_ATTACHMENTS
</constant>.
101 <refsect1 id=
"associatedgets"><title>Associated Gets
</title>
103 <citerefentry><refentrytitle>glGet
</refentrytitle></citerefentry> with argument
<constant>GL_MAX_COLOR_ATTACHMENTS
</constant>
106 <refsect1 id=
"seealso"><title>See Also
</title>
108 <citerefentry><refentrytitle>glInvalidateTexSubImage
</refentrytitle></citerefentry>,
109 <citerefentry><refentrytitle>glInvalidateTexImage
</refentrytitle></citerefentry>,
110 <citerefentry><refentrytitle>glInvalidateBufferSubData
</refentrytitle></citerefentry>,
111 <citerefentry><refentrytitle>glInvalidateBufferData
</refentrytitle></citerefentry>,
112 <citerefentry><refentrytitle>glInvalidateSubFramebuffer
</refentrytitle></citerefentry>.
115 <refsect1 id=
"Copyright"><title>Copyright
</title>
117 Copyright
<trademark class=
"copyright"></trademark> 2012 Khronos Group.
118 This material may be distributed subject to the terms and conditions set forth in
119 the Open Publication License, v
1.0,
8 June
1999.
120 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.