| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext/invalidateFramebuffer | [Back] [Original] |
Get to know MDN better
This feature is well established and works across many devices and browser versions. Its been available across browsers since September 2021.
Note: This feature is available in Web Workers.
The WebGL2RenderingContext.invalidateFramebuffer() method
of the WebGL 2 API invalidates the contents
of attachments in a framebuffer.
invalidateFramebuffer(target, attachments)
targetA GLenum specifying the binding point (target). Possible values:
gl.FRAMEBUFFERCollection buffer data storage of color, alpha, depth and stencil buffers used to render an image.
gl.DRAW_FRAMEBUFFEREquivalent to gl.FRAMEBUFFER.
gl.READ_FRAMEBUFFERUsed as a source for reading operations.
attachmentsAn Array of GLenum specifying the attachment points to
invalidate. Possible values:
gl.COLOR_ATTACHMENT{0-15}Invalidates one of the framebuffer's color buffers.
gl.DEPTH_ATTACHMENTInvalidates the framebuffer's depth buffer.
gl.STENCIL_ATTACHMENTInvalidates the framebuffer's stencil buffer.
gl.DEPTH_STENCIL_ATTACHMENTInvalidates both the framebuffer's depth and stencil buffer.
None (undefined).
gl.invalidateFramebuffer(gl.READ_FRAMEBUFFER, [
gl.COLOR_ATTACHMENT0,
gl.COLOR_ATTACHMENT1,
]);
| Specification |
|---|
| WebGL 2.0 Specification # 4.7.4 |
This page was last modified on Jun 23, 2025 by MDN contributors.
WebGL2RenderingContextbeginQuery()beginTransformFeedback()bindBufferBase()bindBufferRange()bindSampler()bindTransformFeedback()bindVertexArray()blitFramebuffer()bufferData()bufferSubData()clearBuffer[fiuv]()clientWaitSync()compressedTexImage3D()compressedTexSubImage3D()copyBufferSubData()copyTexSubImage3D()createQuery()createSampler()createTransformFeedback()createVertexArray()deleteQuery()deleteSampler()deleteSync()deleteTransformFeedback()deleteVertexArray()drawArraysInstanced()drawBuffers()drawElementsInstanced()drawRangeElements()endQuery()endTransformFeedback()fenceSync()framebufferTextureLayer()getActiveUniformBlockName()getActiveUniformBlockParameter()getActiveUniforms()getBufferSubData()getFragDataLocation()getIndexedParameter()getInternalformatParameter()getQuery()getQueryParameter()getSamplerParameter()getSyncParameter()getTransformFeedbackVarying()getUniformBlockIndex()getUniformIndices()invalidateFramebuffer()invalidateSubFramebuffer()isQuery()isSampler()isSync()isTransformFeedback()isVertexArray()pauseTransformFeedback()readBuffer()renderbufferStorageMultisample()resumeTransformFeedback()samplerParameter[if]()texImage3D()texStorage2D()texStorage3D()texSubImage3D()transformFeedbackVaryings()uniform[1234][uif][v]()uniformBlockBinding()uniformMatrix[234]x[234]fv()vertexAttribDivisor()vertexAttribI4[u]i[v]()vertexAttribIPointer()waitSync()ANGLE_instanced_arraysEXT_blend_minmaxEXT_color_buffer_half_floatEXT_disjoint_timer_queryEXT_frag_depthEXT_sRGBEXT_shader_texture_lodEXT_texture_filter_anisotropicOES_draw_buffers_indexedOES_element_index_uintOES_standard_derivativesOES_texture_floatOES_texture_float_linearOES_texture_half_floatOES_texture_half_float_linearOES_vertex_array_objectWEBGL_color_buffer_floatWEBGL_compressed_texture_etc1WEBGL_compressed_texture_pvrtcWEBGL_compressed_texture_s3tcWEBGL_compressed_texture_s3tc_srgbWEBGL_debug_renderer_infoWEBGL_debug_shadersWEBGL_depth_textureWEBGL_draw_buffersWEBGL_lose_contextWebGLActiveInfoWebGLBufferWebGLContextEventWebGLFramebufferWebGLObjectWebGLProgramWebGLQueryWebGLRenderbufferWebGLRenderingContextWebGLSamplerWebGLShaderWebGLShaderPrecisionFormatWebGLSyncWebGLTextureWebGLTransformFeedbackWebGLUniformLocationWebGLVertexArrayObjectYour blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |