15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci APPLE_framebuffer_multisample 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_APPLE_framebuffer_multisample 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContributors 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Contributors to EXT_framebuffer_multisample and EXT_framebuffer_blit 125bd8deadSopenharmony_ci desktop OpenGL extensions from which this extension borrows heavily. 135bd8deadSopenharmony_ci 145bd8deadSopenharmony_ciContacts 155bd8deadSopenharmony_ci 165bd8deadSopenharmony_ci Benj Lipchak, Apple (lipchak 'at' apple.com) 175bd8deadSopenharmony_ci 185bd8deadSopenharmony_ciStatus 195bd8deadSopenharmony_ci 205bd8deadSopenharmony_ci Complete 215bd8deadSopenharmony_ci 225bd8deadSopenharmony_ciVersion 235bd8deadSopenharmony_ci 245bd8deadSopenharmony_ci Last Modified Date: February 24, 2011 255bd8deadSopenharmony_ci Revision: #4 265bd8deadSopenharmony_ci 275bd8deadSopenharmony_ciNumber 285bd8deadSopenharmony_ci 295bd8deadSopenharmony_ci OpenGL ES Extension #78 305bd8deadSopenharmony_ci 315bd8deadSopenharmony_ciDependencies 325bd8deadSopenharmony_ci 335bd8deadSopenharmony_ci Requires GL_OES_framebuffer_object or OpenGL ES 2.0. 345bd8deadSopenharmony_ci 355bd8deadSopenharmony_ci Written based on the wording of the OpenGL ES 2.0 specification. 365bd8deadSopenharmony_ci 375bd8deadSopenharmony_ci OpenGL ES 1.1 affects the definition of this extension. 385bd8deadSopenharmony_ci 395bd8deadSopenharmony_ci EXT_discard_framebuffer affects the definition of this extension. 405bd8deadSopenharmony_ci 415bd8deadSopenharmony_ciOverview 425bd8deadSopenharmony_ci 435bd8deadSopenharmony_ci This extension extends the framebuffer object framework to 445bd8deadSopenharmony_ci enable multisample rendering. 455bd8deadSopenharmony_ci 465bd8deadSopenharmony_ci The new operation RenderbufferStorageMultisampleAPPLE() allocates 475bd8deadSopenharmony_ci storage for a renderbuffer object that can be used as a multisample 485bd8deadSopenharmony_ci buffer. A multisample render buffer image differs from a 495bd8deadSopenharmony_ci single-sample render buffer image in that a multisample image has a 505bd8deadSopenharmony_ci number of SAMPLES that is greater than zero. No method is provided 515bd8deadSopenharmony_ci for creating multisample texture images. 525bd8deadSopenharmony_ci 535bd8deadSopenharmony_ci All of the framebuffer-attachable images attached to a framebuffer 545bd8deadSopenharmony_ci object must have the same number of SAMPLES or else the framebuffer 555bd8deadSopenharmony_ci object is not "framebuffer complete". If a framebuffer object with 565bd8deadSopenharmony_ci multisample attachments is "framebuffer complete", then the 575bd8deadSopenharmony_ci framebuffer object behaves as if SAMPLE_BUFFERS is one. 585bd8deadSopenharmony_ci 595bd8deadSopenharmony_ci The resolve operation is affected by calling 605bd8deadSopenharmony_ci ResolveMultisampleFramebufferAPPLE where the source is a multisample 615bd8deadSopenharmony_ci application-created framebuffer object and the destination is a 625bd8deadSopenharmony_ci single-sample framebuffer object. Separate read and draw framebuffer 635bd8deadSopenharmony_ci object binding points are established to facilitate the resolve. 645bd8deadSopenharmony_ci 655bd8deadSopenharmony_ci Scissoring may be used in conjunction with 665bd8deadSopenharmony_ci ResolveMultisampleFramebufferAPPLE to resolve only a portion of the 675bd8deadSopenharmony_ci framebuffer. 685bd8deadSopenharmony_ci 695bd8deadSopenharmony_ciIP Status 705bd8deadSopenharmony_ci 715bd8deadSopenharmony_ci No known IP claims. 725bd8deadSopenharmony_ci 735bd8deadSopenharmony_ciNew Procedures and Functions 745bd8deadSopenharmony_ci 755bd8deadSopenharmony_ci void RenderbufferStorageMultisampleAPPLE( 765bd8deadSopenharmony_ci enum target, sizei samples, 775bd8deadSopenharmony_ci enum internalformat, 785bd8deadSopenharmony_ci sizei width, sizei height); 795bd8deadSopenharmony_ci 805bd8deadSopenharmony_ci void ResolveMultisampleFramebufferAPPLE(void); 815bd8deadSopenharmony_ci 825bd8deadSopenharmony_ciNew Tokens 835bd8deadSopenharmony_ci 845bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetRenderbufferParameteriv: 855bd8deadSopenharmony_ci 865bd8deadSopenharmony_ci RENDERBUFFER_SAMPLES_APPLE 0x8CAB 875bd8deadSopenharmony_ci 885bd8deadSopenharmony_ci Returned by CheckFramebufferStatus: 895bd8deadSopenharmony_ci 905bd8deadSopenharmony_ci FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56 915bd8deadSopenharmony_ci 925bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, and 935bd8deadSopenharmony_ci GetFloatv: 945bd8deadSopenharmony_ci 955bd8deadSopenharmony_ci MAX_SAMPLES_APPLE 0x8D57 965bd8deadSopenharmony_ci 975bd8deadSopenharmony_ci Accepted by the <target> parameter of BindFramebuffer, 985bd8deadSopenharmony_ci CheckFramebufferStatus, FramebufferTexture2D, FramebufferRenderbuffer, and 995bd8deadSopenharmony_ci GetFramebufferAttachmentParameteriv: 1005bd8deadSopenharmony_ci 1015bd8deadSopenharmony_ci READ_FRAMEBUFFER_APPLE 0x8CA8 1025bd8deadSopenharmony_ci DRAW_FRAMEBUFFER_APPLE 0x8CA9 1035bd8deadSopenharmony_ci 1045bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, and 1055bd8deadSopenharmony_ci GetFloatv: 1065bd8deadSopenharmony_ci 1075bd8deadSopenharmony_ci DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6 // FRAMEBUFFER_BINDING 1085bd8deadSopenharmony_ci READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA 1095bd8deadSopenharmony_ci 1105bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL ES 2.0 Specification (OpenGL ES Operation) 1115bd8deadSopenharmony_ci 1125bd8deadSopenharmony_ci None 1135bd8deadSopenharmony_ci 1145bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization) 1155bd8deadSopenharmony_ci 1165bd8deadSopenharmony_ci None 1175bd8deadSopenharmony_ci 1185bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL ES 2.0 Specification (Per-Fragment 1195bd8deadSopenharmony_ciOperations and the Framebuffer) 1205bd8deadSopenharmony_ci 1215bd8deadSopenharmony_ci Change the first word of Chapter 4 from "The" to "A". 1225bd8deadSopenharmony_ci 1235bd8deadSopenharmony_ci Append to the introduction of Chapter 4: 1245bd8deadSopenharmony_ci 1255bd8deadSopenharmony_ci "Conceptually, the GL has two active framebuffers; the draw 1265bd8deadSopenharmony_ci framebuffer is the destination for rendering operations, and the 1275bd8deadSopenharmony_ci read framebuffer is the source for readback operations. The same 1285bd8deadSopenharmony_ci framebuffer may be used for both drawing and reading. Section 1295bd8deadSopenharmony_ci 4.4.1 describes the mechanism for controlling framebuffer usage." 1305bd8deadSopenharmony_ci 1315bd8deadSopenharmony_ci Modify the last paragraph of section 4.1.1 as follows: 1325bd8deadSopenharmony_ci 1335bd8deadSopenharmony_ci "While an application-created framebuffer object is bound to 1345bd8deadSopenharmony_ci DRAW_FRAMEBUFFER_APPLE, the pixel ownership test always passes." 1355bd8deadSopenharmony_ci 1365bd8deadSopenharmony_ci Add to 4.3.2 (Reading Pixels), right before the subsection titled 1375bd8deadSopenharmony_ci "Obtaining Pixels from the Framebuffer": 1385bd8deadSopenharmony_ci 1395bd8deadSopenharmony_ci "ReadPixels generates INVALID_FRAMEBUFFER_OPERATION if the object bound to 1405bd8deadSopenharmony_ci READ_FRAMEBUFFER_APPLE is not framebuffer complete (see section 4.4.5). 1415bd8deadSopenharmony_ci 1425bd8deadSopenharmony_ci ReadPixels generates INVALID_OPERATION if the object bound to 1435bd8deadSopenharmony_ci READ_FRAMEBUFFER_APPLE is framebuffer complete and the value of 1445bd8deadSopenharmony_ci SAMPLE_BUFFERS for the read framebuffer is greater than zero." 1455bd8deadSopenharmony_ci 1465bd8deadSopenharmony_ci Replace the first paragraph of the subsection titled "Obtaining Pixels 1475bd8deadSopenharmony_ci from the Framebuffer" with the following: 1485bd8deadSopenharmony_ci 1495bd8deadSopenharmony_ci "The buffer from which values are obtained is the color buffer used for 1505bd8deadSopenharmony_ci reading. If READ_FRAMEBUFFER_BINDING_APPLE is non-zero, pixel values are 1515bd8deadSopenharmony_ci read from the buffer attached as the COLOR_ATTACHMENT0 attachment to the 1525bd8deadSopenharmony_ci currently bound read framebuffer object." 1535bd8deadSopenharmony_ci 1545bd8deadSopenharmony_ci Modify the beginning of section 4.4.1 as follows: 1555bd8deadSopenharmony_ci 1565bd8deadSopenharmony_ci "The operations described in chapter 4 affect the images attached to the 1575bd8deadSopenharmony_ci framebuffer objects bound to targets READ_FRAMEBUFFER_APPLE and 1585bd8deadSopenharmony_ci DRAW_FRAMEBUFFER_APPLE. By default, the framebuffer bound to these 1595bd8deadSopenharmony_ci targets is zero, specifying the default implementation-dependent 1605bd8deadSopenharmony_ci framebuffer provided by the windowing system. When the framebuffers bound 1615bd8deadSopenharmony_ci to these targets is not zero, but instead names an application-created 1625bd8deadSopenharmony_ci framebuffer object, then the operations described in chapter 4 affect the 1635bd8deadSopenharmony_ci application-created framebuffer object rather than the default framebuffer. 1645bd8deadSopenharmony_ci 1655bd8deadSopenharmony_ci The namespace for framebuffer objects is the unsigned integers, with zero 1665bd8deadSopenharmony_ci reserved by OpenGL ES to refer to the default framebuffer. A framebuffer 1675bd8deadSopenharmony_ci object is created by binding an unused name to DRAW_FRAMEBUFFER_APPLE or 1685bd8deadSopenharmony_ci READ_FRAMEBUFFER_APPLE. The binding is effected by calling 1695bd8deadSopenharmony_ci 1705bd8deadSopenharmony_ci void BindFramebuffer(enum target, uint framebuffer); 1715bd8deadSopenharmony_ci 1725bd8deadSopenharmony_ci with <target> set to the desired framebuffer target and 1735bd8deadSopenharmony_ci <framebuffer> set to the unused name. The resulting framebuffer 1745bd8deadSopenharmony_ci object is a new state vector. There is one color attachment points, plus 1755bd8deadSopenharmony_ci one each for the depth and stencil attachment points. 1765bd8deadSopenharmony_ci 1775bd8deadSopenharmony_ci BindFramebuffer may also be used to bind an existing framebuffer object to 1785bd8deadSopenharmony_ci <target>. If the bind is successful no change is made to the state of the 1795bd8deadSopenharmony_ci bound framebuffer object, and any previous binding to <target> is broken. 1805bd8deadSopenharmony_ci The current DRAW_FRAMEBUFFER_APPLE and READ_FRAMEBUFFER_APPLE bindings can 1815bd8deadSopenharmony_ci be queried using GetIntegerv(DRAW_FRAMEBUFFER_BINDING_APPLE) and 1825bd8deadSopenharmony_ci GetIntegerv(READ_FRAMEBUFFER_BINDING_APPLE), respectively. 1835bd8deadSopenharmony_ci 1845bd8deadSopenharmony_ci If a framebuffer object is bound to DRAW_FRAMEBUFFER_APPLE or 1855bd8deadSopenharmony_ci READ_FRAMEBUFFER_APPLE, it becomes the destination of fragment operations 1865bd8deadSopenharmony_ci or the source of pixel reads, respectively, until it is deleted or another 1875bd8deadSopenharmony_ci framebuffer is bound to the corresponding bind point. Calling 1885bd8deadSopenharmony_ci BindFramebuffer with <target> set to FRAMEBUFFER binds the 1895bd8deadSopenharmony_ci framebuffer to both DRAW_FRAMEBUFFER_APPLE and READ_FRAMEBUFFER_APPLE. 1905bd8deadSopenharmony_ci 1915bd8deadSopenharmony_ci While a framebuffer object is bound, OpenGL ES operations on the target 1925bd8deadSopenharmony_ci to which it is bound affect the images attached to the bound 1935bd8deadSopenharmony_ci framebuffer object, and queries of the target to which it is bound 1945bd8deadSopenharmony_ci return state from the bound object. In particular, queries of the values 1955bd8deadSopenharmony_ci specified in table 6.20 (Implementation Dependent Pixel Depths) are 1965bd8deadSopenharmony_ci derived from the framebuffer object bound to DRAW_FRAMEBUFFER_APPLE. 1975bd8deadSopenharmony_ci 1985bd8deadSopenharmony_ci In the initial state, the reserved name zero is bound to the targets 1995bd8deadSopenharmony_ci DRAW_FRAMEBUFFER_APPLE and READ_FRAMEBUFFER_APPLE. There is no application 2005bd8deadSopenharmony_ci created framebuffer object corresponding to the name zero. Instead, the 2015bd8deadSopenharmony_ci name zero refers to the window-system-provided framebuffer. All Queries 2025bd8deadSopenharmony_ci and operations on the framebuffer while the name zero is bound to target 2035bd8deadSopenharmony_ci DRAW_FRAMEBUFFER_APPLE or READ_FRAMEBUFFER_APPLE operate on this default 2045bd8deadSopenharmony_ci framebuffer..." 2055bd8deadSopenharmony_ci 2065bd8deadSopenharmony_ci Change the description of DeleteFramebuffers as follows: 2075bd8deadSopenharmony_ci 2085bd8deadSopenharmony_ci "<framebuffers> contains <n> names of framebuffer objects to be 2095bd8deadSopenharmony_ci deleted. After a framebuffer object is deleted, it has no 2105bd8deadSopenharmony_ci attachments, and its name is again unused. If a framebuffer that 2115bd8deadSopenharmony_ci is currently bound to one or more of the targets 2125bd8deadSopenharmony_ci DRAW_FRAMEBUFFER_APPLE or READ_FRAMEBUFFER_APPLE is deleted, it is as 2135bd8deadSopenharmony_ci though BindFramebuffer had been executed with the corresponding 2145bd8deadSopenharmony_ci <target> and <framebuffer> of zero. Unused names in <framebuffers> 2155bd8deadSopenharmony_ci are silently ignored, as is the value zero." 2165bd8deadSopenharmony_ci 2175bd8deadSopenharmony_ci Add to section 4.4.3, just above the definition of RenderbufferStorage: 2185bd8deadSopenharmony_ci 2195bd8deadSopenharmony_ci "The command 2205bd8deadSopenharmony_ci 2215bd8deadSopenharmony_ci void RenderbufferStorageMultisampleAPPLE( 2225bd8deadSopenharmony_ci enum target, sizei samples, 2235bd8deadSopenharmony_ci enum internalformat, 2245bd8deadSopenharmony_ci sizei width, sizei height); 2255bd8deadSopenharmony_ci 2265bd8deadSopenharmony_ci establishes the data storage, format, dimensions, and number of 2275bd8deadSopenharmony_ci samples of a renderbuffer object's image. <target> must be 2285bd8deadSopenharmony_ci RENDERBUFFER. <internalformat> must be one of the color-renderable, 2295bd8deadSopenharmony_ci depth-renderable, or stencil-renderable formats described in table 4.5. 2305bd8deadSopenharmony_ci <width> and <height> are the dimensions in pixels of the renderbuffer. If 2315bd8deadSopenharmony_ci either <width> or <height> is greater than the value of 2325bd8deadSopenharmony_ci MAX_RENDERBUFFER_SIZE, or if <samples> is greater than MAX_SAMPLES_APPLE, 2335bd8deadSopenharmony_ci then the error INVALID_VALUE is generated. If OpenGL ES is unable to 2345bd8deadSopenharmony_ci create a data store of the requested size, the error OUT_OF_MEMORY is 2355bd8deadSopenharmony_ci generated. RenderbufferStorageMultisampleAPPLE deletes any existing 2365bd8deadSopenharmony_ci data store for the renderbuffer and the contents of the data store after 2375bd8deadSopenharmony_ci calling RenderbufferStorageMultisampleAPPLE are undefined. 2385bd8deadSopenharmony_ci 2395bd8deadSopenharmony_ci If <samples> is zero, then RENDERBUFFER_SAMPLES_APPLE is set to zero. 2405bd8deadSopenharmony_ci Otherwise <samples> represents a request for a desired minimum 2415bd8deadSopenharmony_ci number of samples. Since different implementations may support 2425bd8deadSopenharmony_ci different sample counts for multisampled rendering, the actual 2435bd8deadSopenharmony_ci number of samples allocated for the renderbuffer image is 2445bd8deadSopenharmony_ci implementation dependent. However, the resulting value for 2455bd8deadSopenharmony_ci RENDERBUFFER_SAMPLES_APPLE is guaranteed to be greater than or equal 2465bd8deadSopenharmony_ci to <samples> and no more than the next larger sample count supported 2475bd8deadSopenharmony_ci by the implementation. 2485bd8deadSopenharmony_ci 2495bd8deadSopenharmony_ci An OpenGL ES implementation may vary its allocation of internal component 2505bd8deadSopenharmony_ci resolution based on any RenderbufferStorageMultisampleAPPLE parameter 2515bd8deadSopenharmony_ci (except target), but the allocation and chosen internal format must not be 2525bd8deadSopenharmony_ci a function of any other state and cannot be changed once they are 2535bd8deadSopenharmony_ci established. The actual resolution in bits of each component of the 2545bd8deadSopenharmony_ci allocated image can be queried with GetRenderbufferParameteriv." 2555bd8deadSopenharmony_ci 2565bd8deadSopenharmony_ci Modify the definiton of RenderbufferStorage in section 4.4.3 as follows: 2575bd8deadSopenharmony_ci 2585bd8deadSopenharmony_ci "The command 2595bd8deadSopenharmony_ci 2605bd8deadSopenharmony_ci void RenderbufferStorage( 2615bd8deadSopenharmony_ci enum target, enum internalformat, 2625bd8deadSopenharmony_ci sizei width, sizei height); 2635bd8deadSopenharmony_ci 2645bd8deadSopenharmony_ci is equivalent to calling RenderbufferStorageMultisampleAPPLE with 2655bd8deadSopenharmony_ci <samples> equal to zero." 2665bd8deadSopenharmony_ci 2675bd8deadSopenharmony_ci In section 4.4.3, modify the first two sentences of the 2685bd8deadSopenharmony_ci description of FramebufferRenderbuffer as follows: 2695bd8deadSopenharmony_ci 2705bd8deadSopenharmony_ci "<target> must be DRAW_FRAMEBUFFER_APPLE, READ_FRAMEBUFFER_APPLE, or 2715bd8deadSopenharmony_ci FRAMEBUFFER. If <target> is FRAMEBUFFER, it behaves as 2725bd8deadSopenharmony_ci though DRAW_FRAMEBUFFER_APPLE were specified. INVALID_OPERATION is 2735bd8deadSopenharmony_ci generated if the current value of the corresponding binding is zero 2745bd8deadSopenharmony_ci when FramebufferRenderbuffer is called." 2755bd8deadSopenharmony_ci 2765bd8deadSopenharmony_ci In section 4.4.3, modify the first two sentences of the 2775bd8deadSopenharmony_ci description of FramebufferTexture2D as follows: 2785bd8deadSopenharmony_ci 2795bd8deadSopenharmony_ci "The <target> must be DRAW_FRAMEBUFFER_APPLE, READ_FRAMEBUFFER_APPLE, or 2805bd8deadSopenharmony_ci FRAMEBUFFER. If <target> is FRAMEBUFFER, it behaves as though 2815bd8deadSopenharmony_ci DRAW_FRAMEBUFFER_APPLE were specified. INVALID_OPERATION is generated if 2825bd8deadSopenharmony_ci the current value of the corresponding binding is zero when 2835bd8deadSopenharmony_ci FramebufferTexture2D is called." 2845bd8deadSopenharmony_ci 2855bd8deadSopenharmony_ci In section 4.4.5, add an entry to the Framebuffer Completeness bullet list: 2865bd8deadSopenharmony_ci 2875bd8deadSopenharmony_ci "* All attached images have the same number of samples. 2885bd8deadSopenharmony_ci 2895bd8deadSopenharmony_ci FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE" 2905bd8deadSopenharmony_ci 2915bd8deadSopenharmony_ci In section 4.4.5, modify the first sentence of the description 2925bd8deadSopenharmony_ci of CheckFramebufferStatus as follows: 2935bd8deadSopenharmony_ci 2945bd8deadSopenharmony_ci "If <target> is not DRAW_FRAMEBUFFER_APPLE, READ_FRAMEBUFFER_APPLE, or 2955bd8deadSopenharmony_ci FRAMEBUFFER, INVALID_ENUM is generated. If <target> is FRAMEBUFFER, it 2965bd8deadSopenharmony_ci behaves as though DRAW_FRAMEBUFFER_APPLE were specified." 2975bd8deadSopenharmony_ci 2985bd8deadSopenharmony_ci Modify the first sentence of the last paragraph of section 4.4.5 as 2995bd8deadSopenharmony_ci follows: 3005bd8deadSopenharmony_ci 3015bd8deadSopenharmony_ci "If the currently bound draw or read framebuffer is not framebuffer 3025bd8deadSopenharmony_ci complete, then it is an error to attempt to use the framebuffer for 3035bd8deadSopenharmony_ci writing or reading, respectively." 3045bd8deadSopenharmony_ci 3055bd8deadSopenharmony_ci In section 4.4.6, replace references to FRAMEBUFFER_BINDING with 3065bd8deadSopenharmony_ci DRAW_FRAMEBUFFER_BINDING_APPLE. 3075bd8deadSopenharmony_ci 3085bd8deadSopenharmony_ci Add new section titled "Multisample Resolves" to section 4.4: 3095bd8deadSopenharmony_ci 3105bd8deadSopenharmony_ci "The command 3115bd8deadSopenharmony_ci 3125bd8deadSopenharmony_ci void ResolveMultisampleFramebufferAPPLE(void); 3135bd8deadSopenharmony_ci 3145bd8deadSopenharmony_ci converts the samples corresponding to each pixel location in the 3155bd8deadSopenharmony_ci read framebuffer's color attachment to a single sample before writing 3165bd8deadSopenharmony_ci them to the draw framebuffer's color attachment. 3175bd8deadSopenharmony_ci 3185bd8deadSopenharmony_ci The pixel copy bypasses the fragment pipeline. The only fragment 3195bd8deadSopenharmony_ci operations which affect the resolve are the pixel ownership test, 3205bd8deadSopenharmony_ci the scissor test, and dithering. 3215bd8deadSopenharmony_ci 3225bd8deadSopenharmony_ci INVALID_OPERATION is generated if SAMPLE_BUFFERS for the read framebuffer 3235bd8deadSopenharmony_ci is zero, or if SAMPLE_BUFFERS for the draw framebuffer is greater than 3245bd8deadSopenharmony_ci zero, or if the read framebuffer or draw framebuffer does not have a color 3255bd8deadSopenharmony_ci attachment, or if the dimensions of the read and draw framebuffers 3265bd8deadSopenharmony_ci are not identical, or if the components in the format of the draw 3275bd8deadSopenharmony_ci framebuffer's color attachment are not present in the format of the read 3285bd8deadSopenharmony_ci framebuffer's color attachment. 3295bd8deadSopenharmony_ci 3305bd8deadSopenharmony_ci INVALID_FRAMEBUFFER_OPERATION is generated if the objects bound to 3315bd8deadSopenharmony_ci DRAW_FRAMEBUFFER_APPLE and READ_FRAMEBUFFER_APPLE are not framebuffer 3325bd8deadSopenharmony_ci complete (see section 4.4.5)." 3335bd8deadSopenharmony_ci 3345bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL ES 2.0 Specification (Special Functions) 3355bd8deadSopenharmony_ci 3365bd8deadSopenharmony_ci None 3375bd8deadSopenharmony_ci 3385bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL ES 2.0 Specification (State and State 3395bd8deadSopenharmony_ciRequests) 3405bd8deadSopenharmony_ci 3415bd8deadSopenharmony_ci In section 6.1.3, modify the first sentence of the description of 3425bd8deadSopenharmony_ci GetFramebufferAttachmentParameteriv as follows: 3435bd8deadSopenharmony_ci 3445bd8deadSopenharmony_ci "<target> must be DRAW_FRAMEBUFFER_APPLE, READ_FRAMEBUFFER_APPLE or 3455bd8deadSopenharmony_ci FRAMEBUFFER. If <target> is FRAMEBUFFER, it behaves as though 3465bd8deadSopenharmony_ci DRAW_FRAMEBUFFER_APPLE were specified." 3475bd8deadSopenharmony_ci 3485bd8deadSopenharmony_ci In section 6.1.3, modify the third paragraph of the description of 3495bd8deadSopenharmony_ci GetRenderbufferParameteriv as follows: 3505bd8deadSopenharmony_ci 3515bd8deadSopenharmony_ci "Upon successful return from GetRenderbufferParameteriv, if 3525bd8deadSopenharmony_ci <pname> is RENDERBUFFER_WIDTH, RENDERBUFFER_HEIGHT, 3535bd8deadSopenharmony_ci RENDERBUFFER_INTERNAL_FORMAT, or RENDERBUFFER_SAMPLES_APPLE, then <params> 3545bd8deadSopenharmony_ci will contain the width in pixels, height in pixels, internal format, or 3555bd8deadSopenharmony_ci number of samples, respectively, of the image of the renderbuffer 3565bd8deadSopenharmony_ci currently bound to <target>." 3575bd8deadSopenharmony_ci 3585bd8deadSopenharmony_ci Move SAMPLES and SAMPLE_BUFFERS state to table 6.20. 3595bd8deadSopenharmony_ci 3605bd8deadSopenharmony_ciDependencies on OpenGL ES 1.1 3615bd8deadSopenharmony_ci 3625bd8deadSopenharmony_ci On an OpenGL ES 1.1 implementation, OES_framebuffer_object is required. 3635bd8deadSopenharmony_ci Include GetFixedv where GetBooleanv, GetIntegerv and GetFloatv appear. 3645bd8deadSopenharmony_ci Add OES suffixes to entrypoints and tokens introduced by 3655bd8deadSopenharmony_ci OES_framebuffer_object. 3665bd8deadSopenharmony_ci 3675bd8deadSopenharmony_ciDependencies on EXT_discard_framebuffer 3685bd8deadSopenharmony_ci 3695bd8deadSopenharmony_ci In the presence of EXT_discard_framebuffer, DiscardFramebufferEXT is 3705bd8deadSopenharmony_ci modified to allow READ_FRAMEBUFFER_APPLE and DRAW_FRAMEBUFFER_APPLE 3715bd8deadSopenharmony_ci as acceptable targets. If <target> is FRAMEBUFFER, DiscardFramebufferEXT 3725bd8deadSopenharmony_ci behaves as though DRAW_FRAMEBUFFER_APPLE were specified. 3735bd8deadSopenharmony_ci 3745bd8deadSopenharmony_ciErrors 3755bd8deadSopenharmony_ci 3765bd8deadSopenharmony_ci INVALID_FRAMEBUFFER_OPERATION is generated if DrawArrays, DrawElements, or 3775bd8deadSopenharmony_ci ResolveMultisampleFramebufferAPPLE is called while the draw framebuffer is 3785bd8deadSopenharmony_ci not framebuffer complete. 3795bd8deadSopenharmony_ci 3805bd8deadSopenharmony_ci INVALID_FRAMEBUFFER_OPERATION is generated if ReadPixels, 3815bd8deadSopenharmony_ci CopyTex{Sub}Image*, or ResolveMultisampleFramebufferAPPLE is called while 3825bd8deadSopenharmony_ci the read framebuffer is not framebuffer complete. 3835bd8deadSopenharmony_ci 3845bd8deadSopenharmony_ci INVALID_OPERATION is generated if ReadPixels, or CopyTex{Sub}Image* is 3855bd8deadSopenharmony_ci called while READ_FRAMEBUFFER_BINDING_APPLE is non-zero, the read 3865bd8deadSopenharmony_ci framebuffer is framebuffer complete, and the value of SAMPLE_BUFFERS for 3875bd8deadSopenharmony_ci the read framebuffer is greater than zero. 3885bd8deadSopenharmony_ci 3895bd8deadSopenharmony_ci INVALID_OPERATION is generated by ResolveMultisampleFramebufferAPPLE if 3905bd8deadSopenharmony_ci SAMPLE_BUFFERS for the read framebuffer is zero, or if SAMPLE_BUFFERS for 3915bd8deadSopenharmony_ci the draw framebuffer is greater than zero, or if the read framebuffer or 3925bd8deadSopenharmony_ci draw framebuffer does not have a color attachment, or if the dimensions of 3935bd8deadSopenharmony_ci the read and draw framebuffers are not identical, or if the components in 3945bd8deadSopenharmony_ci the format of the draw framebuffer's color attachment are not present in 3955bd8deadSopenharmony_ci the format of the read framebuffer's color attachment. 3965bd8deadSopenharmony_ci 3975bd8deadSopenharmony_ci OUT_OF_MEMORY is generated when RenderbufferStorageMultisampleAPPLE cannot 3985bd8deadSopenharmony_ci create storage of the specified size. 3995bd8deadSopenharmony_ci 4005bd8deadSopenharmony_ci INVALID_VALUE is generated if RenderbufferStorageMultisampleAPPLE is 4015bd8deadSopenharmony_ci called with a value of <samples> that is greater than MAX_SAMPLES_APPLE 4025bd8deadSopenharmony_ci or with a value of <width> or <height> that is greater than 4035bd8deadSopenharmony_ci MAX_RENDERBUFFER_SIZE. 4045bd8deadSopenharmony_ci 4055bd8deadSopenharmony_ciNew State 4065bd8deadSopenharmony_ci 4075bd8deadSopenharmony_ci Add to table 6.19 (Implementation Dependent Values (cont.)): 4085bd8deadSopenharmony_ci 4095bd8deadSopenharmony_ci Get Value Type Get Command Minimum Value Description Section 4105bd8deadSopenharmony_ci --------- ---- ----------- ------------- ------------------- ------- 4115bd8deadSopenharmony_ci MAX_SAMPLES_APPLE Z+ GetIntegerv 1 Maximum number of 4.4.3 4125bd8deadSopenharmony_ci samples supported 4135bd8deadSopenharmony_ci for multisampling 4145bd8deadSopenharmony_ci 4155bd8deadSopenharmony_ci Add to table 6.22 (Renderbuffer State): 4165bd8deadSopenharmony_ci 4175bd8deadSopenharmony_ci Get Value Type Get Command Initial Value Description Section 4185bd8deadSopenharmony_ci -------------------------- ---- -------------------------- ------------- -------------------- ------- 4195bd8deadSopenharmony_ci RENDERBUFFER_SAMPLES_APPLE Z+ GetRenderbufferParameteriv 0 Renderbuffer samples 4.4.3 4205bd8deadSopenharmony_ci 4215bd8deadSopenharmony_ci 4225bd8deadSopenharmony_ci Remove reference to FRAMEBUFFER_BINDING from Table 6.23 (Framebuffer State) 4235bd8deadSopenharmony_ci and replace with the following: 4245bd8deadSopenharmony_ci 4255bd8deadSopenharmony_ci Get Value Type Get Command Initial Value Description Section 4265bd8deadSopenharmony_ci ------------------------------ ---- ----------- ------------- ------------------------- ------- 4275bd8deadSopenharmony_ci DRAW_FRAMEBUFFER_BINDING_APPLE Z+ GetIntegerv 0 Framebuffer object bound 4.4.1 4285bd8deadSopenharmony_ci to DRAW_FRAMEBUFFER_APPLE 4295bd8deadSopenharmony_ci READ_FRAMEBUFFER_BINDING_APPLE Z+ GetIntegerv 0 Framebuffer object 4.4.1 4305bd8deadSopenharmony_ci to READ_FRAMEBUFFER_APPLE 4315bd8deadSopenharmony_ci 4325bd8deadSopenharmony_ci 4335bd8deadSopenharmony_ci 4345bd8deadSopenharmony_ciRevision History 4355bd8deadSopenharmony_ci 4365bd8deadSopenharmony_ci #4, February 24, 2011: Benj Lipchak 4375bd8deadSopenharmony_ci - assign extension number 4385bd8deadSopenharmony_ci - clarify that dithering is still performed during resolve 4395bd8deadSopenharmony_ci - clarify that only format conversions that drop components are allowed 4405bd8deadSopenharmony_ci during resolve 4415bd8deadSopenharmony_ci #3, January 5, 2010: Benj Lipchak 4425bd8deadSopenharmony_ci - remove the error when read and draw color formats are not identical 4435bd8deadSopenharmony_ci - add an error when missing a color attachment to the read or draw FBO 4445bd8deadSopenharmony_ci #2, October 29, 2009: Benj Lipchak 4455bd8deadSopenharmony_ci - add interaction with EXT_discard_framebuffer 4465bd8deadSopenharmony_ci - mention that scissoring can be used for partial resolves 4475bd8deadSopenharmony_ci #1, October 28, 2009: Benj Lipchak 4485bd8deadSopenharmony_ci - first revision 449