Difference between revisions of "GLAPI/glInvalidateSubFramebuffer"
m (Bot: Adding better formatting.) |
m (Bot: Adding better formatting.) |
||
(One intermediate revision by one other user not shown) | |||
Line 30: | Line 30: | ||
'''glInvalidateSubFramebuffer''' invalidates the content of a region of a specified set of attachments of a framebuffer. The framebuffer whose content to invalidate is indicated by setting {{param|target}} to the target to which it is bound. {{param|target}} may be {{enum|GL_FRAMEBUFFER}}, {{enum|GL_READ_FRAMEBUFFER}} or {{enum|GL_DRAW_FRAMEBUFFER}}. {{enum|GL_FRAMEBUFFER}} is treated as if it were {{enum|GL_DRAW_FRAMEBUFFER}}. | '''glInvalidateSubFramebuffer''' invalidates the content of a region of a specified set of attachments of a framebuffer. The framebuffer whose content to invalidate is indicated by setting {{param|target}} to the target to which it is bound. {{param|target}} may be {{enum|GL_FRAMEBUFFER}}, {{enum|GL_READ_FRAMEBUFFER}} or {{enum|GL_DRAW_FRAMEBUFFER}}. {{enum|GL_FRAMEBUFFER}} is treated as if it were {{enum|GL_DRAW_FRAMEBUFFER}}. | ||
− | A region within a subset of the framebuffer's attachments may be invalidated. This set of attachments are specified in an array whose address is given by {{param|attachments}} and which contains {{param|numAttachments}} elements. The elements of {{param|attachments}} must be {{enum|GL_DEPTH_ATTACHMENT}}, {{enum|GL_STENCIL_ATTACHMENT}}{{enum|GL_DEPTH_STENCIL_ATTACHMENT}}, or {{enum|GL_COLOR_ATTACHMENT''i''}}, where ''i'' is between zero and the value of {{enum|GL_MAX_FRAMEBUFFER_ATTACHMENTS}} minus one. Furthermore, if the default framebuffer is bound to {{param|target}}, then {{param|attachments}} may contain {{enum|GL_FRONT_LEFT}}, {{enum|GL_FRONT_RIGHT}}, {{enum|GL_BACK_LEFT}}, {{enum|GL_BACK_RIGHT}}, {{enum|GL_AUX''i''}}, {{enum|GL_ACCUM}}, {{enum|GL_COLOR}}, {{enum|GL_DEPTH}}, or {{enum|GL_STENCIL}}, identifying that specific buffer. {{enum|GL_COLOR}}, is treated as {{enum|GL_BACK_LEFT}} for a double-buffered context and {{enum|GL_FRONT_LEFT}} for a single-buffered context. | + | A region within a subset of the framebuffer's attachments may be invalidated. This set of attachments are specified in an array whose address is given by {{param|attachments}} and which contains {{param|numAttachments}} elements. The elements of {{param|attachments}} must be {{enum|GL_DEPTH_ATTACHMENT}}, {{enum|GL_STENCIL_ATTACHMENT}}, {{enum|GL_DEPTH_STENCIL_ATTACHMENT}}, or {{enum|GL_COLOR_ATTACHMENT''i''}}, where ''i'' is between zero and the value of {{enum|GL_MAX_FRAMEBUFFER_ATTACHMENTS}} minus one. Furthermore, if the default framebuffer is bound to {{param|target}}, then {{param|attachments}} may contain {{enum|GL_FRONT_LEFT}}, {{enum|GL_FRONT_RIGHT}}, {{enum|GL_BACK_LEFT}}, {{enum|GL_BACK_RIGHT}}, {{enum|GL_AUX''i''}}, {{enum|GL_ACCUM}}, {{enum|GL_COLOR}}, {{enum|GL_DEPTH}}, or {{enum|GL_STENCIL}}, identifying that specific buffer. {{enum|GL_COLOR}}, is treated as {{enum|GL_BACK_LEFT}} for a double-buffered context and {{enum|GL_FRONT_LEFT}} for a single-buffered context. |
The region of the framebuffer attachments to be invalidated is specified by {{param|x}}, {{param|y}}, {{param|width}} and {{param|height}} where {{param|x}} and {{param|y}} give the offset from the origin (with lower-left corner at (0, 0)) and {{param|width}} and {{param|height}} give the size. Any pixels lying outside of the window allocated to the current GL context, or outside of the attachments of the currently bound framebuffer object, are ignored. After '''glInvalidateFramebuffer''' is executed, the contents of the specified region of the specified attachments become undefined. | The region of the framebuffer attachments to be invalidated is specified by {{param|x}}, {{param|y}}, {{param|width}} and {{param|height}} where {{param|x}} and {{param|y}} give the offset from the origin (with lower-left corner at (0, 0)) and {{param|width}} and {{param|height}} give the size. Any pixels lying outside of the window allocated to the current GL context, or outside of the attachments of the currently bound framebuffer object, are ignored. After '''glInvalidateFramebuffer''' is executed, the contents of the specified region of the specified attachments become undefined. | ||
Line 56: | Line 56: | ||
[[Category:Core API Reference|InvalidateSubFramebuffer]] | [[Category:Core API Reference|InvalidateSubFramebuffer]] | ||
[[Category:Core API Ref Framebuffer Objects|InvalidateSubFramebuffer]] | [[Category:Core API Ref Framebuffer Objects|InvalidateSubFramebuffer]] | ||
+ | [[Category:Framebuffer Object API State Functions|InvalidateSubFramebuffer]] |
Latest revision as of 10:02, 15 August 2013
Core in version | 4.6 | |
---|---|---|
Core since version | 4.3 | |
Core ARB extension | ARB_invalidate_subdata |
glInvalidateSubFramebuffer: invalidate the content of a region of some or all of a framebuffer object's attachments
Function Definition
void glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum * attachments, GLint x, GLint y, GLint width, GLint height);
- target
- The target to which the framebuffer is attached. target must be GL_FRAMEBUFFER, GL_DRAW_FRAMEBUFFER, or GL_READ_FRAMEBUFFER.
- numAttachments
- The number of entries in the attachments array.
- attachments
- The address of an array identifying the attachments to be invalidated.
- x
- The X offset of the region to be invalidated.
- y
- The Y offset of the region to be invalidated.
- width
- The width of the region to be invalidated.
- height
- The height of the region to be invalidated.
Description
glInvalidateSubFramebuffer invalidates the content of a region of a specified set of attachments of a framebuffer. The framebuffer whose content to invalidate is indicated by setting target to the target to which it is bound. target may be GL_FRAMEBUFFER, GL_READ_FRAMEBUFFER or GL_DRAW_FRAMEBUFFER. GL_FRAMEBUFFER is treated as if it were GL_DRAW_FRAMEBUFFER.
A region within a subset of the framebuffer's attachments may be invalidated. This set of attachments are specified in an array whose address is given by attachments and which contains numAttachments elements. The elements of attachments must be GL_DEPTH_ATTACHMENT, GL_STENCIL_ATTACHMENT, GL_DEPTH_STENCIL_ATTACHMENT, or GL_COLOR_ATTACHMENTi, where i is between zero and the value of GL_MAX_FRAMEBUFFER_ATTACHMENTS minus one. Furthermore, if the default framebuffer is bound to target, then attachments may contain GL_FRONT_LEFT, GL_FRONT_RIGHT, GL_BACK_LEFT, GL_BACK_RIGHT, GL_AUXi, GL_ACCUM, GL_COLOR, GL_DEPTH, or GL_STENCIL, identifying that specific buffer. GL_COLOR, is treated as GL_BACK_LEFT for a double-buffered context and GL_FRONT_LEFT for a single-buffered context.
The region of the framebuffer attachments to be invalidated is specified by x, y, width and height where x and y give the offset from the origin (with lower-left corner at (0, 0)) and width and height give the size. Any pixels lying outside of the window allocated to the current GL context, or outside of the attachments of the currently bound framebuffer object, are ignored. After glInvalidateFramebuffer is executed, the contents of the specified region of the specified attachments become undefined.
Errors
GL_INVALID_ENUM is generated if target is not one of the accepted framebuffer target tokens.
GL_INVALID_ENUM is generated if any element of attachments is not one of the accepted framebuffer attachment tokens.
GL_INVALID_OPERATION is generated if element of attachments is GL_COLOR_ATTACHMENTi where i is greater than or equal to the value of GL_MAX_COLOR_ATTACHMENTS.
Associated Gets
glGet with argument GL_MAX_COLOR_ATTACHMENTS
See Also
glBindBuffer, glInvalidateFramebuffer.
Copyright
Copyright © 2012 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.