15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci NV_framebuffer_blit 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_NV_framebuffer_blit 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContributors 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Contributors to EXT_framebuffer_blit, ARB_framebuffer_object 125bd8deadSopenharmony_ci and ANGLE_framebuffer_blit 135bd8deadSopenharmony_ci Greg Roth, NVIDIA 145bd8deadSopenharmony_ci Xi Chen, NVIDIA 155bd8deadSopenharmony_ci 165bd8deadSopenharmony_ciContact 175bd8deadSopenharmony_ci 185bd8deadSopenharmony_ci Mathias Heyer, NVIDIA Corporation (mheyer 'at' nvidia.com) 195bd8deadSopenharmony_ci 205bd8deadSopenharmony_ciStatus 215bd8deadSopenharmony_ci 225bd8deadSopenharmony_ci Complete 235bd8deadSopenharmony_ci 245bd8deadSopenharmony_ciVersion 255bd8deadSopenharmony_ci 265bd8deadSopenharmony_ci Last Modified Date: 03 Mar 2015 275bd8deadSopenharmony_ci Author Revision: 06 285bd8deadSopenharmony_ci 295bd8deadSopenharmony_ciNumber 305bd8deadSopenharmony_ci 315bd8deadSopenharmony_ci OpenGL ES Extension #142 325bd8deadSopenharmony_ci 335bd8deadSopenharmony_ciDependencies 345bd8deadSopenharmony_ci 355bd8deadSopenharmony_ci OpenGL ES 2.0 is required. 365bd8deadSopenharmony_ci 375bd8deadSopenharmony_ci The extension is written against the OpenGL ES 2.0.25 specification. 385bd8deadSopenharmony_ci 395bd8deadSopenharmony_ci EXT_sRGB affects the definition of this extension. 405bd8deadSopenharmony_ci 415bd8deadSopenharmony_ci EXT_color_buffer_half_float affects the definition of this extension 425bd8deadSopenharmony_ci 435bd8deadSopenharmony_ci EXT_discard_framebuffer affects the definition of this extension 445bd8deadSopenharmony_ci 455bd8deadSopenharmony_ci NV_fbo_color_attachments affects the definition of this extension 465bd8deadSopenharmony_ci 475bd8deadSopenharmony_ci NV_framebuffer_multisample affects the definition of this extension 485bd8deadSopenharmony_ci 495bd8deadSopenharmony_ci NV_read_buffer affects the definition of this extension 505bd8deadSopenharmony_ci 515bd8deadSopenharmony_ci NV_draw_buffers affects the definition of this extension 525bd8deadSopenharmony_ci 535bd8deadSopenharmony_ci This extension interacts with OpenGL ES 3.0 and later versions. 545bd8deadSopenharmony_ci 555bd8deadSopenharmony_ciOverview 565bd8deadSopenharmony_ci 575bd8deadSopenharmony_ci This extension modifies OpenGL ES 2.0 by splitting the 585bd8deadSopenharmony_ci framebuffer object binding point into separate DRAW and READ 595bd8deadSopenharmony_ci bindings. This allows copying directly from one framebuffer to 605bd8deadSopenharmony_ci another. In addition, a new high performance blit function is 615bd8deadSopenharmony_ci added to facilitate these blits and perform some data conversion 625bd8deadSopenharmony_ci where allowed. 635bd8deadSopenharmony_ci 645bd8deadSopenharmony_ciNew Procedures and Functions 655bd8deadSopenharmony_ci 665bd8deadSopenharmony_ci void BlitFramebufferNV(int srcX0, int srcY0, int srcX1, int srcY1, 675bd8deadSopenharmony_ci int dstX0, int dstY0, int dstX1, int dstY1, 685bd8deadSopenharmony_ci bitfield mask, enum filter); 695bd8deadSopenharmony_ci 705bd8deadSopenharmony_ciNew Tokens 715bd8deadSopenharmony_ci 725bd8deadSopenharmony_ci Accepted by the <target> parameter of BindFramebuffer, 735bd8deadSopenharmony_ci CheckFramebufferStatus, FramebufferTexture2D, 745bd8deadSopenharmony_ci FramebufferRenderbuffer, and GetFramebufferAttachmentParameteriv: 755bd8deadSopenharmony_ci 765bd8deadSopenharmony_ci READ_FRAMEBUFFER_NV 0x8CA8 775bd8deadSopenharmony_ci DRAW_FRAMEBUFFER_NV 0x8CA9 785bd8deadSopenharmony_ci 795bd8deadSopenharmony_ci Accepted by the <pname> parameters of GetIntegerv and GetFloatv: 805bd8deadSopenharmony_ci 815bd8deadSopenharmony_ci DRAW_FRAMEBUFFER_BINDING_NV 0x8CA6 // alias FRAMEBUFFER_BINDING 825bd8deadSopenharmony_ci READ_FRAMEBUFFER_BINDING_NV 0x8CAA 835bd8deadSopenharmony_ci 845bd8deadSopenharmony_ci 855bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL ES 2.0.25 Specification 865bd8deadSopenharmony_ci(Rasterization) 875bd8deadSopenharmony_ci 885bd8deadSopenharmony_ci Change the last paragraph of section 3.7.2 to: 895bd8deadSopenharmony_ci 905bd8deadSopenharmony_ci "Calling CopyTexImage2D or CopyTexSubImage2D will result in an 915bd8deadSopenharmony_ci INVALID_FRAMEBUFFER_OPERATION error if the object bound to 925bd8deadSopenharmony_ci READ_FRAMEBUFFER_BINDING_NV is not framebuffer complete 935bd8deadSopenharmony_ci (see section 4.4.5)." 945bd8deadSopenharmony_ci 955bd8deadSopenharmony_ci 965bd8deadSopenharmony_ci Additions to Chapter 4 of the OpenGL ES 2.0.25 Specification 975bd8deadSopenharmony_ci (Per-Fragment Operations and the Frame Buffer) 985bd8deadSopenharmony_ci 995bd8deadSopenharmony_ci Change the first word of Chapter 4 from "The" to "A". 1005bd8deadSopenharmony_ci 1015bd8deadSopenharmony_ci Replace the last paragraph of the Introduction of Chapter 4: 1025bd8deadSopenharmony_ci 1035bd8deadSopenharmony_ci "The GL has two active framebuffers; the draw framebuffer is the 1045bd8deadSopenharmony_ci destination for rendering operations, and the read framebuffer is 1055bd8deadSopenharmony_ci the source for readback operations. The same framebuffer may be used 1065bd8deadSopenharmony_ci for both drawing and reading. Section 4.4.1 describes the mechanism 1075bd8deadSopenharmony_ci for controlling framebuffer usage. 1085bd8deadSopenharmony_ci 1095bd8deadSopenharmony_ci The default framebuffer is initially used as the draw and read 1105bd8deadSopenharmony_ci framebuffer and the initial state of all provided bitplanes is 1115bd8deadSopenharmony_ci undefined. The format and encoding of buffers in the draw and read 1125bd8deadSopenharmony_ci framebuffers can be queried as described in section 6.1.7." 1135bd8deadSopenharmony_ci 1145bd8deadSopenharmony_ci Modify the first sentence of the last paragraph of section 4.1.1: 1155bd8deadSopenharmony_ci 1165bd8deadSopenharmony_ci "While an application-created framebuffer object is bound to 1175bd8deadSopenharmony_ci DRAW_FRAMEBUFFER_NV, the pixel ownership test always passes." 1185bd8deadSopenharmony_ci 1195bd8deadSopenharmony_ci 1205bd8deadSopenharmony_ci In section 4.3.1 (Reading Pixels), replace the following sentence: 1215bd8deadSopenharmony_ci 1225bd8deadSopenharmony_ci "The implementation-chosen format may vary depending on the format 1235bd8deadSopenharmony_ci of the currently bound rendering surface." 1245bd8deadSopenharmony_ci 1255bd8deadSopenharmony_ci with: 1265bd8deadSopenharmony_ci 1275bd8deadSopenharmony_ci "The implementation chosen format may vary depending on the format 1285bd8deadSopenharmony_ci of the selected READ_BUFFER_NV of the currently bound read 1295bd8deadSopenharmony_ci framebuffer (READ_FRAMEBUFFER_BINDING_NV)." 1305bd8deadSopenharmony_ci 1315bd8deadSopenharmony_ci Add to section 4.3.1 (Reading Pixels) right before the subsection 1325bd8deadSopenharmony_ci "Obtaining Pixels from the Framebuffer": 1335bd8deadSopenharmony_ci 1345bd8deadSopenharmony_ci "Calling ReadPixels generates INVALID_FRAMEBUFFER_OPERATION if 1355bd8deadSopenharmony_ci the object bound to READ_FRAMEBUFFER_BINDING_NV is not "framebuffer 1365bd8deadSopenharmony_ci complete" (section 4.4.5)." 1375bd8deadSopenharmony_ci 1385bd8deadSopenharmony_ci 1395bd8deadSopenharmony_ci In section 4.3.1, after the definition of ReadBufferNV, replace 1405bd8deadSopenharmony_ci 1415bd8deadSopenharmony_ci "FRAMEBUFFER_BINDING" with "READ_FRAMEBUFFER_BINDING_NV", 1425bd8deadSopenharmony_ci so that ReadBufferNV always refers to the current read framebuffer. 1435bd8deadSopenharmony_ci 1445bd8deadSopenharmony_ci 1455bd8deadSopenharmony_ci Add section 4.3.3 Copying Pixels: 1465bd8deadSopenharmony_ci 1475bd8deadSopenharmony_ci "BlitFramebufferNV transfers a rectangle of pixel values from one 1485bd8deadSopenharmony_ci region of the read framebuffer to another in the draw framebuffer. 1495bd8deadSopenharmony_ci 1505bd8deadSopenharmony_ci BlitFramebufferNV(int srcX0, int srcY0, int srcX1, int srcY1, 1515bd8deadSopenharmony_ci int dstX0, int dstY0, int dstX1, int dstY1, 1525bd8deadSopenharmony_ci bitfield mask, enum filter); 1535bd8deadSopenharmony_ci 1545bd8deadSopenharmony_ci <mask> is the bitwise OR of a number of values indicating which 1555bd8deadSopenharmony_ci buffers are to be copied. The values are COLOR_BUFFER_BIT, 1565bd8deadSopenharmony_ci DEPTH_BUFFER_BIT, and STENCIL_BUFFER_BIT, which are described in 1575bd8deadSopenharmony_ci section 4.2.3. The pixels corresponding to these buffers are 1585bd8deadSopenharmony_ci copied from the source rectangle, bound by the locations (srcX0, 1595bd8deadSopenharmony_ci srcY0) and (srcX1, srcY1), to the destination rectangle, bound by 1605bd8deadSopenharmony_ci the locations (dstX0, dstY0) and (dstX1, dstY1). The lower bounds 1615bd8deadSopenharmony_ci of the rectangle are inclusive, while the upper bounds are 1625bd8deadSopenharmony_ci exclusive. 1635bd8deadSopenharmony_ci 1645bd8deadSopenharmony_ci When the color buffer is transferred, values are taken from the read 1655bd8deadSopenharmony_ci buffer of the read framebuffer and written to each of the draw 1665bd8deadSopenharmony_ci buffers of the draw framebuffer. 1675bd8deadSopenharmony_ci 1685bd8deadSopenharmony_ci The actual region taken from the read framebuffer is limited to the 1695bd8deadSopenharmony_ci intersection of the source buffers being transferred, which may 1705bd8deadSopenharmony_ci include the color buffer selected by the read buffer, the depth 1715bd8deadSopenharmony_ci buffer, and/or the stencil buffer depending on <mask>. The actual 1725bd8deadSopenharmony_ci region written to the draw framebuffer is limited to the 1735bd8deadSopenharmony_ci intersection of the destination buffers being written, which may 1745bd8deadSopenharmony_ci include multiple draw buffers, the depth buffer, and/or the stencil 1755bd8deadSopenharmony_ci buffer depending on <mask>. Whether or not the source or destination 1765bd8deadSopenharmony_ci regions are altered due to these limits, the scaling and offset 1775bd8deadSopenharmony_ci applied to pixels being transferred is performed as though no such 1785bd8deadSopenharmony_ci limits were present. 1795bd8deadSopenharmony_ci 1805bd8deadSopenharmony_ci If the source and destination rectangle dimensions do not match, 1815bd8deadSopenharmony_ci the source image is stretched to fit the destination rectangle. 1825bd8deadSopenharmony_ci <filter> must be LINEAR or NEAREST and specifies the method of 1835bd8deadSopenharmony_ci interpolation to be applied if the image is stretched. LINEAR 1845bd8deadSopenharmony_ci filtering is allowed only for the color buffer; if <mask> includes 1855bd8deadSopenharmony_ci DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT, and filter is not NEAREST, 1865bd8deadSopenharmony_ci no copy is performed and an INVALID_OPERATION error is generated. 1875bd8deadSopenharmony_ci If the source and destination dimensions are identical, no filtering 1885bd8deadSopenharmony_ci is applied. If either the source or destination rectangle specifies 1895bd8deadSopenharmony_ci a negative dimension, the image is reversed in the corresponding 1905bd8deadSopenharmony_ci direction. If both the source and destination rectangles specify a 1915bd8deadSopenharmony_ci negative dimension for the same direction, no reversal is performed. 1925bd8deadSopenharmony_ci If a linear filter is selected and the rules of LINEAR sampling 1935bd8deadSopenharmony_ci (see section 3.7.7) would require sampling outside the bounds of a 1945bd8deadSopenharmony_ci source buffer, it is as though CLAMP_TO_EDGE texture sampling were 1955bd8deadSopenharmony_ci being performed. If a linear filter is selected and sampling would 1965bd8deadSopenharmony_ci be required outside the bounds of the specified source region, but 1975bd8deadSopenharmony_ci within the bounds of a source buffer, the implementation may choose 1985bd8deadSopenharmony_ci to clamp while sampling or not. 1995bd8deadSopenharmony_ci 2005bd8deadSopenharmony_ci If the source and destination buffers are identical, and the source 2015bd8deadSopenharmony_ci and destination rectangles overlap, the result of the blit operation 2025bd8deadSopenharmony_ci is undefined. 2035bd8deadSopenharmony_ci 2045bd8deadSopenharmony_ci When values are taken from the read buffer, if the value of 2055bd8deadSopenharmony_ci FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING for the framebuffer attachment 2065bd8deadSopenharmony_ci corresponding to the read buffer is sRGB (see section 6.1.13), the 2075bd8deadSopenharmony_ci red, green, and blue components are converted from the non-linear 2085bd8deadSopenharmony_ci sRGB color space as described in section 3.7.14. 2095bd8deadSopenharmony_ci 2105bd8deadSopenharmony_ci When values are written to the draw buffers, blit operations bypass the 2115bd8deadSopenharmony_ci fragment pipeline. The only fragment operations which affect a blit are the 2125bd8deadSopenharmony_ci pixel ownership test, the scissor test, and sRGB conversion 2135bd8deadSopenharmony_ci (see section 3.7.14). Additionally color, depth, and stencil masks 2145bd8deadSopenharmony_ci (see section 4.2.2) are ignored. 2155bd8deadSopenharmony_ci 2165bd8deadSopenharmony_ci If a buffer is specified in <mask> and does not exist in both the 2175bd8deadSopenharmony_ci read and draw framebuffers, the corresponding bit is silently 2185bd8deadSopenharmony_ci ignored. 2195bd8deadSopenharmony_ci 2205bd8deadSopenharmony_ci If the color formats of the read and draw framebuffers do not 2215bd8deadSopenharmony_ci match, and <mask> includes COLOR_BUFFER_BIT, the pixel groups are 2225bd8deadSopenharmony_ci converted to match the destination format as in CopyTexImage. 2235bd8deadSopenharmony_ci 2245bd8deadSopenharmony_ci However, colors are clamped only if all draw color buffers have fixedpoint 2255bd8deadSopenharmony_ci components. Format conversion is not supported for all data types, and an 2265bd8deadSopenharmony_ci INVALID_OPERATION error is generated under any of the following conditions: 2275bd8deadSopenharmony_ci 2285bd8deadSopenharmony_ci * The read buffer contains fixed-point or floating-point values and 2295bd8deadSopenharmony_ci any draw buffer contains neither fixed-point nor floating-point values. 2305bd8deadSopenharmony_ci 2315bd8deadSopenharmony_ci Calling BlitFramebufferNV will result in an 2325bd8deadSopenharmony_ci INVALID_FRAMEBUFFER_OPERATION_EXT error if the objects bound to 2335bd8deadSopenharmony_ci DRAW_FRAMEBUFFER_BINDING_NV and READ_FRAMEBUFFER_BINDING_NV are 2345bd8deadSopenharmony_ci not "framebuffer complete" (section 4.4.4.2)." 2355bd8deadSopenharmony_ci 2365bd8deadSopenharmony_ci Calling BlitFramebufferNV will result in an INVALID_OPERATION 2375bd8deadSopenharmony_ci error if <mask> includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT 2385bd8deadSopenharmony_ci and the source and destination depth and stencil buffer formats do 2395bd8deadSopenharmony_ci not match. 2405bd8deadSopenharmony_ci 2415bd8deadSopenharmony_ci If SAMPLE_BUFFERS for the read framebuffer is greater than zero and 2425bd8deadSopenharmony_ci SAMPLE_BUFFERS for the draw framebuffer is zero, the samples 2435bd8deadSopenharmony_ci corresponding to each pixel location in the source are converted to 2445bd8deadSopenharmony_ci a single sample before being written to the destination. 2455bd8deadSopenharmony_ci 2465bd8deadSopenharmony_ci If SAMPLE_BUFFERS for the read framebuffer is zero and 2475bd8deadSopenharmony_ci SAMPLE_BUFFERS for the draw framebuffer is greater than zero, the 2485bd8deadSopenharmony_ci value of the source sample is replicated in each of the destination 2495bd8deadSopenharmony_ci samples. 2505bd8deadSopenharmony_ci 2515bd8deadSopenharmony_ci If SAMPLE_BUFFERS for both the read and draw framebuffers are 2525bd8deadSopenharmony_ci greater than zero, and the values of SAMPLES for the read and draw 2535bd8deadSopenharmony_ci framebuffers are identical, the samples are copied without 2545bd8deadSopenharmony_ci modification from the read framebuffer to the draw framebuffer. 2555bd8deadSopenharmony_ci Otherwise, no copy is performed and an INVALID_OPERATION error is 2565bd8deadSopenharmony_ci generated. Note that the samples in the draw buffer are not 2575bd8deadSopenharmony_ci guaranteed to be at the same sample location as the read buffer, 2585bd8deadSopenharmony_ci so rendering using this newly created buffer can potentially 2595bd8deadSopenharmony_ci have geometry cracks or incorrect antialiasing. This may occur 2605bd8deadSopenharmony_ci if the sizes of the framebuffers do not match, if the 2615bd8deadSopenharmony_ci formats differ, or if the source and destination rectangles are 2625bd8deadSopenharmony_ci not defined with the same (X0,Y0) and (X1,Y1) bounds. 2635bd8deadSopenharmony_ci 2645bd8deadSopenharmony_ci If SAMPLE_BUFFERS for either the read framebuffer or 2655bd8deadSopenharmony_ci draw framebuffer is greater than zero, no copy is performed and an 2665bd8deadSopenharmony_ci INVALID_OPERATION error is generated if the dimensions of the source 2675bd8deadSopenharmony_ci and destination rectangles provided to BlitFramebuffer are not 2685bd8deadSopenharmony_ci identical, or if the formats of the read and draw framebuffers are 2695bd8deadSopenharmony_ci not identical. 2705bd8deadSopenharmony_ci 2715bd8deadSopenharmony_ci 2725bd8deadSopenharmony_ci Modify the beginning of section 4.4.1 (Binding and Managing 2735bd8deadSopenharmony_ci Framebuffer Objects): 2745bd8deadSopenharmony_ci 2755bd8deadSopenharmony_ci The default framebuffer for rendering and readback operations is 2765bd8deadSopenharmony_ci provided by the windowing system. In addition, named framebuffer 2775bd8deadSopenharmony_ci objects can be created and operated upon. The namespace for 2785bd8deadSopenharmony_ci framebuffer objects is the unsigned integers, with zero reserved 2795bd8deadSopenharmony_ci by the GL for the default framebuffer. 2805bd8deadSopenharmony_ci 2815bd8deadSopenharmony_ci A framebuffer object is created by binding an unused name to 2825bd8deadSopenharmony_ci DRAW_FRAMEBUFFER_NV or READ_FRAMEBUFFER_NV. The binding is 2835bd8deadSopenharmony_ci effected by calling 2845bd8deadSopenharmony_ci 2855bd8deadSopenharmony_ci void BindFramebuffer( enum target, uint framebuffer ); 2865bd8deadSopenharmony_ci 2875bd8deadSopenharmony_ci with <target> set to the desired framebuffer target and 2885bd8deadSopenharmony_ci <framebuffer> set to the unused name. The resulting framebuffer 2895bd8deadSopenharmony_ci object is a new state vector. There are MAX_COLOR_ATTACHMENTS_NV 2905bd8deadSopenharmony_ci color attachment points, plus one each for the depth and stencil 2915bd8deadSopenharmony_ci attachment points. 2925bd8deadSopenharmony_ci 2935bd8deadSopenharmony_ci BindFramebuffer may also be used to bind an existing framebuffer 2945bd8deadSopenharmony_ci object to DRAW_FRAMEBUFFER_NV and/or READ_FRAMEBUFFER_NV. If the 2955bd8deadSopenharmony_ci bind is successful no change is made to the state of the bound 2965bd8deadSopenharmony_ci framebuffer object and any previous binding to <target> is broken. 2975bd8deadSopenharmony_ci 2985bd8deadSopenharmony_ci If a framebuffer object is bound to DRAW_FRAMEBUFFER_NV or READ_- 2995bd8deadSopenharmony_ci FRAMEBUFFER_NV, it becomes the target for rendering or readback 3005bd8deadSopenharmony_ci operations, respectively, until it is deleted or another framebuffer 3015bd8deadSopenharmony_ci is bound to the corresponding bind point. Calling BindFramebuffer 3025bd8deadSopenharmony_ci with <target> set to FRAMEBUFFER binds <framebuffer> to both read 3035bd8deadSopenharmony_ci and draw targets. 3045bd8deadSopenharmony_ci 3055bd8deadSopenharmony_ci While a framebuffer object is bound, OpenGL ES operations on the 3065bd8deadSopenharmony_ci target to which it is bound affect the images attached to the bound 3075bd8deadSopenharmony_ci framebuffer object, and queries of the target to which it is bound 3085bd8deadSopenharmony_ci return state from the bound object. Queries of the values specified 3095bd8deadSopenharmony_ci in table 6.21 (Implementation Dependent Pixel Depths) are derived 3105bd8deadSopenharmony_ci from the framebuffer object bound to DRAW_FRAMEBUFFER_NV with the 3115bd8deadSopenharmony_ci exception of IMPLEMENTATION_COLOR_READ_TYPE and IMPLEMENTATION_- 3125bd8deadSopenharmony_ci COLOR_READ_FORMAT, which are derived from the framebuffer object 3135bd8deadSopenharmony_ci bound to READ_FRAMEBUFFER_NV. 3145bd8deadSopenharmony_ci 3155bd8deadSopenharmony_ci The initial state of DRAW_FRAMEBUFFER_NV and READ_FRAMEBUFFER_NV 3165bd8deadSopenharmony_ci refers to the default framebuffer. In order that access to the 3175bd8deadSopenharmony_ci default framebuffer is not lost, it is treated as a framebuffer 3185bd8deadSopenharmony_ci object with the name of zero. The default framebuffer is therefore 3195bd8deadSopenharmony_ci rendered to and read from while zero is bound to the corresponding 3205bd8deadSopenharmony_ci targets. On some implementations, the properties of the default 3215bd8deadSopenharmony_ci window system provided framebuffer can change over time (e.g., in 3225bd8deadSopenharmony_ci response to window system events such as attaching the context to a 3235bd8deadSopenharmony_ci new window system drawable.) 3245bd8deadSopenharmony_ci 3255bd8deadSopenharmony_ci Change the description of DeleteFramebuffers: 3265bd8deadSopenharmony_ci 3275bd8deadSopenharmony_ci <framebuffers> contains <n> names of framebuffer objects to be 3285bd8deadSopenharmony_ci deleted. After a framebuffer object is deleted, it has no 3295bd8deadSopenharmony_ci attachments, and its name is again unused. If a framebuffer that is 3305bd8deadSopenharmony_ci currently bound to one or more of the targets DRAW_FRAMEBUFFER_NV or 3315bd8deadSopenharmony_ci READ_FRAMEBUFFER_NV is deleted, it is as though BindFramebuffer had 3325bd8deadSopenharmony_ci been executed with the corresponding <target> and <framebuffer> of 3335bd8deadSopenharmony_ci zero. Unused names in framebuffers are silently ignored, as is the 3345bd8deadSopenharmony_ci value zero. 3355bd8deadSopenharmony_ci 3365bd8deadSopenharmony_ci The names bound to the draw and read framebuffer bindings can be 3375bd8deadSopenharmony_ci queried by calling GetIntegerv with the symbolic constants 3385bd8deadSopenharmony_ci DRAW_FRAMEBUFFER_BINDING and READ_FRAMEBUFFER_BINDING, respectively. 3395bd8deadSopenharmony_ci FRAMEBUFFER_BINDING is equivalent to DRAW_FRAMEBUFFER_BINDING 3405bd8deadSopenharmony_ci 3415bd8deadSopenharmony_ci In section 4.4.3, modify the first two sentences of the 3425bd8deadSopenharmony_ci description of FramebufferRenderbuffer as follows: 3435bd8deadSopenharmony_ci 3445bd8deadSopenharmony_ci "The <target> must be DRAW_FRAMEBUFFER_NV, READ_FRAMEBUFFER_NV, or 3455bd8deadSopenharmony_ci FRAMEBUFFER. If <target> is FRAMEBUFFER, it behaves as 3465bd8deadSopenharmony_ci though DRAW_FRAMEBUFFER_NV was specified. INVALID_OPERATION is 3475bd8deadSopenharmony_ci generated if the value of the corresponding binding is zero." 3485bd8deadSopenharmony_ci 3495bd8deadSopenharmony_ci In section 4.4.3, modify the first two sentences of the 3505bd8deadSopenharmony_ci description of FramebufferTexture2D as follows: 3515bd8deadSopenharmony_ci 3525bd8deadSopenharmony_ci "The <target> must be DRAW_FRAMEBUFFER_NV, READ_FRAMEBUFFER_NV, 3535bd8deadSopenharmony_ci or FRAMEBUFFER_NV. If <target> is FRAMEBUFFER, it behaves as 3545bd8deadSopenharmony_ci though DRAW_FRAMEBUFFER_NV was specified. INVALID_OPERATION is 3555bd8deadSopenharmony_ci generated if the value of the corresponding binding is zero." 3565bd8deadSopenharmony_ci 3575bd8deadSopenharmony_ci In section 4.4.5, modify the first two paragraphs describing 3585bd8deadSopenharmony_ci CheckFramebufferStatus as follows: 3595bd8deadSopenharmony_ci 3605bd8deadSopenharmony_ci "If <target> is not DRAW_FRAMEBUFFER_NV, READ_FRAMEBUFFER_NV or 3615bd8deadSopenharmony_ci FRAMEBUFFER, INVALID_ENUM is generated. FRAMEBUFFER is equivalent to 3625bd8deadSopenharmony_ci DRAW_FRAMEBUFFER_NV." 3635bd8deadSopenharmony_ci 3645bd8deadSopenharmony_ci The values of SAMPLE_BUFFERS and SAMPLES are derived from the 3655bd8deadSopenharmony_ci attachments of the currently bound framebuffer object. If the 3665bd8deadSopenharmony_ci current DRAW_FRAMEBUFFER_BINDING is not framebuffer complete, then 3675bd8deadSopenharmony_ci both SAMPLE_BUFFERS and SAMPLES are undefined. Otherwise, SAMPLES is 3685bd8deadSopenharmony_ci equal to the value of RENDERBUFFER_SAMPLES for the attached images 3695bd8deadSopenharmony_ci (which all must have the same value for RENDERBUFFER_SAMPLES). 3705bd8deadSopenharmony_ci Further, SAMPLE_BUFFERS is one if SAMPLES is non-zero. Otherwise, 3715bd8deadSopenharmony_ci SAMPLE_BUFFERS is zero." 3725bd8deadSopenharmony_ci 3735bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL ES 2.0.25 Specification (State and 3745bd8deadSopenharmony_ciState Requests) 3755bd8deadSopenharmony_ci 3765bd8deadSopenharmony_ci In section 6.1.3, modify the first sentence of the description of 3775bd8deadSopenharmony_ci GetFramebufferAttachmentParameteriv as follows: 3785bd8deadSopenharmony_ci 3795bd8deadSopenharmony_ci "<target> must be DRAW_FRAMEBUFFER_NV, READ_FRAMEBUFFER_NV or 3805bd8deadSopenharmony_ci FRAMEBUFFER. FRAMEBUFFER is equivalent to DRAW_FRAMEBUFFER_NV." 3815bd8deadSopenharmony_ci 3825bd8deadSopenharmony_ciDependencies on OpenGL ES 3.0 and later 3835bd8deadSopenharmony_ci 3845bd8deadSopenharmony_ci If OpenGL ES 3.0 or later is supported, the described modifications to 3855bd8deadSopenharmony_ci language for BlitFramebufferNV also apply to BlitFramebuffer. 3865bd8deadSopenharmony_ci 3875bd8deadSopenharmony_ci (Add to the end of the section describing BlitFramebuffer) 3885bd8deadSopenharmony_ci 3895bd8deadSopenharmony_ci "If SAMPLE_BUFFERS for both the read and draw framebuffers are 3905bd8deadSopenharmony_ci greater than zero, and the values of SAMPLES for the read and draw 3915bd8deadSopenharmony_ci framebuffers are identical, the samples are copied without 3925bd8deadSopenharmony_ci modification from the read framebuffer to the draw framebuffer. 3935bd8deadSopenharmony_ci Otherwise, no copy is performed and an INVALID_OPERATION error is 3945bd8deadSopenharmony_ci generated. Note that the samples in the draw buffer are not 3955bd8deadSopenharmony_ci guaranteed to be at the same sample location as the read buffer, 3965bd8deadSopenharmony_ci so rendering using this newly created buffer can potentially 3975bd8deadSopenharmony_ci have geometry cracks or incorrect antialiasing. This may occur 3985bd8deadSopenharmony_ci if the sizes of the framebuffers do not match, if the 3995bd8deadSopenharmony_ci formats differ, or if the source and destination rectangles are 4005bd8deadSopenharmony_ci not defined with the same (X0,Y0) and (X1,Y1) bounds. 4015bd8deadSopenharmony_ci 4025bd8deadSopenharmony_ci If SAMPLE_BUFFERS for either the read framebuffer or 4035bd8deadSopenharmony_ci draw framebuffer is greater than zero, no copy is performed and an 4045bd8deadSopenharmony_ci INVALID_OPERATION error is generated if the dimensions of the source 4055bd8deadSopenharmony_ci and destination rectangles provided to BlitFramebuffer are not 4065bd8deadSopenharmony_ci identical, or if the formats of the read and draw framebuffers are 4075bd8deadSopenharmony_ci not identical." 4085bd8deadSopenharmony_ci 4095bd8deadSopenharmony_ci (In the error list for BlitFramebuffer, modify the item "An 4105bd8deadSopenharmony_ci INVALID_OPERATION error is generated if the draw framebuffer is 4115bd8deadSopenharmony_ci multisampled.") 4125bd8deadSopenharmony_ci 4135bd8deadSopenharmony_ci * An INVALID_OPERATION error is generated if both the read and 4145bd8deadSopenharmony_ci draw buffers are multisampled, and SAMPLE_BUFFERS for the read and 4155bd8deadSopenharmony_ci draw buffers are not identical. 4165bd8deadSopenharmony_ci 4175bd8deadSopenharmony_ci (In the error list for BlitFramebuffer, modify the item "An 4185bd8deadSopenharmony_ci INVALID_OPERATION error is generated if the read framebuffer is 4195bd8deadSopenharmony_ci multisampled, and the source and destination rectangles are not defined 4205bd8deadSopenharmony_ci with the same (X0, Y0) and (X1, Y1) bounds.") 4215bd8deadSopenharmony_ci 4225bd8deadSopenharmony_ci * An INVALID_OPERATION error is generated if either the read or draw 4235bd8deadSopenharmony_ci buffer is multisampled, and the dimensions of the source and 4245bd8deadSopenharmony_ci destination rectangles are not identical, or if the formats of the 4255bd8deadSopenharmony_ci read and draw framebuffers are not identical. 4265bd8deadSopenharmony_ci 4275bd8deadSopenharmony_ciDependencies on EXT_sRGB: 4285bd8deadSopenharmony_ci 4295bd8deadSopenharmony_ci If EXT_sRGB is not supported, remove any language referring to 4305bd8deadSopenharmony_ci sRGB conversion during a BlitFramebufferNV operation. 4315bd8deadSopenharmony_ci 4325bd8deadSopenharmony_ciDependencies on EXT_color_buffer_half_float: 4335bd8deadSopenharmony_ci 4345bd8deadSopenharmony_ci If EXT_color_buffer_half_float is not supported, remove any language 4355bd8deadSopenharmony_ci referring to floating point conversion during a BlitFramebufferNV operation. 4365bd8deadSopenharmony_ci 4375bd8deadSopenharmony_ciDependencies on EXT_discard_framebuffer: 4385bd8deadSopenharmony_ci 4395bd8deadSopenharmony_ci If EXT_discard_framebuffer is supported, in Section 4.5 replace 4405bd8deadSopenharmony_ci the sentence: 4415bd8deadSopenharmony_ci 4425bd8deadSopenharmony_ci "<target> must be FRAMEBUFFER." 4435bd8deadSopenharmony_ci 4445bd8deadSopenharmony_ci with 4455bd8deadSopenharmony_ci 4465bd8deadSopenharmony_ci "<target> must be DRAW_FRAMEBUFFER_NV, READ_FRAMEBUFFER_NV, or 4475bd8deadSopenharmony_ci FRAMEBUFFER. FRAMEBUFFER is equivalent to DRAW_FRAMEBUFFER_NV." 4485bd8deadSopenharmony_ci 4495bd8deadSopenharmony_ci and relax the error to match. 4505bd8deadSopenharmony_ci 4515bd8deadSopenharmony_ciDependencies on NV_fbo_color_attachments: 4525bd8deadSopenharmony_ci 4535bd8deadSopenharmony_ci If NV_fbo_color_attachments is not supported, replace the sentence: 4545bd8deadSopenharmony_ci 4555bd8deadSopenharmony_ci "There are the values of MAX_COLOR_ATTACHMENTS_NV color attachment 4565bd8deadSopenharmony_ci points, plus one set each for the depth and stencil attachment points." 4575bd8deadSopenharmony_ci 4585bd8deadSopenharmony_ci with 4595bd8deadSopenharmony_ci 4605bd8deadSopenharmony_ci "There is one color attachment point, plus one each for the depth 4615bd8deadSopenharmony_ci and stencil attachment points." 4625bd8deadSopenharmony_ci 4635bd8deadSopenharmony_ciDependencies on NV_framebuffer_multisample: 4645bd8deadSopenharmony_ci 4655bd8deadSopenharmony_ci If NV_framebuffer_multisample is not supported, ignore edits to the 4665bd8deadSopenharmony_ci second paragraph describing CheckFramebufferStatus. 4675bd8deadSopenharmony_ci 4685bd8deadSopenharmony_ciDependencies on NV_read_buffer: 4695bd8deadSopenharmony_ci 4705bd8deadSopenharmony_ci If NV_read_buffer is not supported, ignore any language referring to 4715bd8deadSopenharmony_ci ReadBufferNV. In this case the default OpenGL ES 2.0 behavior will 4725bd8deadSopenharmony_ci take place, where GL_COLOR_ATTACHMENT0 will implicitly always be the 4735bd8deadSopenharmony_ci read color buffer for application-created framebuffers and BACK for 4745bd8deadSopenharmony_ci the default framebuffer. 4755bd8deadSopenharmony_ci 4765bd8deadSopenharmony_ciDependencies on NV_draw_buffers: 4775bd8deadSopenharmony_ci 4785bd8deadSopenharmony_ci The absence of the NV_draw_buffers extension implies that there can be 4795bd8deadSopenharmony_ci ever only one destination color buffer. No replication of the one 4805bd8deadSopenharmony_ci read buffer data into possibly multiple destination color buffers can 4815bd8deadSopenharmony_ci happen. 4825bd8deadSopenharmony_ci 4835bd8deadSopenharmony_ciErrors 4845bd8deadSopenharmony_ci 4855bd8deadSopenharmony_ci The error INVALID_FRAMEBUFFER_OPERATION is generated if 4865bd8deadSopenharmony_ci BlitFramebufferNV is called while the draw framebuffer is not framebuffer 4875bd8deadSopenharmony_ci complete. 4885bd8deadSopenharmony_ci 4895bd8deadSopenharmony_ci The error INVALID_FRAMEBUFFER_OPERATION is generated if 4905bd8deadSopenharmony_ci BlitFramebufferNV, ReadPixels, CopyTex{Sub}Image2D, is called while the 4915bd8deadSopenharmony_ci read framebuffer is not framebuffer complete. 4925bd8deadSopenharmony_ci 4935bd8deadSopenharmony_ci The error INVALID_VALUE is generated by BlitFramebufferNV if 4945bd8deadSopenharmony_ci <mask> has any bits set other than those named by 4955bd8deadSopenharmony_ci COLOR_BUFFER_BIT, DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT. 4965bd8deadSopenharmony_ci 4975bd8deadSopenharmony_ci The error INVALID_OPERATION is generated if BlitFramebufferNV is 4985bd8deadSopenharmony_ci called and <mask> includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT 4995bd8deadSopenharmony_ci and <filter> is not NEAREST. 5005bd8deadSopenharmony_ci 5015bd8deadSopenharmony_ci The error INVALID_OPERATION is generated if BlitFramebufferNV is 5025bd8deadSopenharmony_ci called and <mask> includes DEPTH_BUFFER_BIT or STENCIL_BUFFER_BIT 5035bd8deadSopenharmony_ci and the source and destination depth or stencil buffer formats do 5045bd8deadSopenharmony_ci not match. 5055bd8deadSopenharmony_ci 5065bd8deadSopenharmony_ci The error INVALID_ENUM is generated by BlitFramebufferNV if 5075bd8deadSopenharmony_ci <filter> is not LINEAR or NEAREST. 5085bd8deadSopenharmony_ci 5095bd8deadSopenharmony_ci The error INVALID_ENUM is generated if BindFramebuffer, 5105bd8deadSopenharmony_ci CheckFramebufferStatus, FramebufferTexture2D, 5115bd8deadSopenharmony_ci FramebufferRenderbuffer, or 5125bd8deadSopenharmony_ci GetFramebufferAttachmentParameteriv is called and <target> is 5135bd8deadSopenharmony_ci not DRAW_FRAMEBUFFER_NV, READ_FRAMEBUFFER_NV or FRAMEBUFFER. 5145bd8deadSopenharmony_ci 5155bd8deadSopenharmony_ciNew State 5165bd8deadSopenharmony_ci 5175bd8deadSopenharmony_ci (modify table 6.24, "Framebuffer State") 5185bd8deadSopenharmony_ci 5195bd8deadSopenharmony_ci Get Value Type Get Command Initial Value Description Section 5205bd8deadSopenharmony_ci ---------------------------- ---- ----------- -------------- ------------------- ------------ 5215bd8deadSopenharmony_ci DRAW_FRAMEBUFFER_BINDING_NV Z+ GetIntegerv 0 framebuffer object bound 4.4.1 5225bd8deadSopenharmony_ci to DRAW_FRAMEBUFFER_NV 5235bd8deadSopenharmony_ci READ_FRAMEBUFFER_BINDING_NV Z+ GetIntegerv 0 framebuffer object 4.4.1 5245bd8deadSopenharmony_ci to READ_FRAMEBUFFER_NV 5255bd8deadSopenharmony_ci 5265bd8deadSopenharmony_ci Remove reference to FRAMEBUFFER_BINDING. 5275bd8deadSopenharmony_ci 5285bd8deadSopenharmony_ci 5295bd8deadSopenharmony_ci 5305bd8deadSopenharmony_ciIssues 5315bd8deadSopenharmony_ci 5325bd8deadSopenharmony_ci 1) How does the functionality described by this extension differ 5335bd8deadSopenharmony_ci from that provided by EXT_framebuffer_blit? 5345bd8deadSopenharmony_ci - allow depth/stencil blits to be stretched using nearest filtering 5355bd8deadSopenharmony_ci - allow fixed point<-->floating point format conversion 5365bd8deadSopenharmony_ci - sRGB conversion 5375bd8deadSopenharmony_ci 5385bd8deadSopenharmony_ci 2) How does the functionality described by this extension differ 5395bd8deadSopenharmony_ci from that provided by ES 3.0? 5405bd8deadSopenharmony_ci - allow relocating MSAA resolve blits 5415bd8deadSopenharmony_ci - allow MSAA buffers as destination of blits 5425bd8deadSopenharmony_ci - allow overlapping blits with undefined results 5435bd8deadSopenharmony_ci 5445bd8deadSopenharmony_ci 3) How does this extension interact with NV_coverage_sample? 5455bd8deadSopenharmony_ci UNRESOLVED: 5465bd8deadSopenharmony_ci - should we allow blitting coverage information (GL_COVERAGE_BUFFER_BIT)? 5475bd8deadSopenharmony_ci - should we allow VCAA resolve blits? 5485bd8deadSopenharmony_ci - how to differentiate blitting the coverage buffer itself and doing a 5495bd8deadSopenharmony_ci resolve blit? 5505bd8deadSopenharmony_ci a) if read FBO has coverage buffer attachment, but draw FBO has not, 5515bd8deadSopenharmony_ci a VCAA resolve blit is being attempted 5525bd8deadSopenharmony_ci b) if GL_COVERAGE_BUFFER_BIT is part of <mask>, the coverage buffer 5535bd8deadSopenharmony_ci should be copied as-is. 5545bd8deadSopenharmony_ci - some surface blits would make it necessary to rotate the 5555bd8deadSopenharmony_ci coverage information itself. Better not allow copies of the coverage 5565bd8deadSopenharmony_ci buffer at all, restricting the VCAA functionality to resolve blits only? 5575bd8deadSopenharmony_ci 5585bd8deadSopenharmony_ci 5595bd8deadSopenharmony_ciRevision History 5605bd8deadSopenharmony_ci #06 03 Mar 2015 Xi Chen 5615bd8deadSopenharmony_ci Add interaction with OpenGL ES 3.0 and later. 5625bd8deadSopenharmony_ci #05 02 Feb 2015 James Helferty 5635bd8deadSopenharmony_ci Add interaction with DiscardFramebuffer. 5645bd8deadSopenharmony_ci #04 31 Jan 2013 Greg Roth 5655bd8deadSopenharmony_ci Rewrote section 4.4.1 to better jibe with ES2.0 5665bd8deadSopenharmony_ci #03 09 Jan 2013 Greg Roth 5675bd8deadSopenharmony_ci Language clarifications and more formatting corrections. 5685bd8deadSopenharmony_ci #02 19 Apr 2012 Mathias Heyer 5695bd8deadSopenharmony_ci Clarifications and formatting corrections 5705bd8deadSopenharmony_ci #01 18 Apr 2012 Mathias Heyer 5715bd8deadSopenharmony_ci Initial draft. 5725bd8deadSopenharmony_ci 573