15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci ARB_framebuffer_no_attachments 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_ARB_framebuffer_no_attachments 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContact 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Pat Brown, NVIDIA (pbrown 'at' nvidia.com) 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciContributors 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci Members of the Khronos OpenGL ARB TSG 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ciNotice 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ci Copyright (c) 2012-2013 The Khronos Group Inc. Copyright terms at 205bd8deadSopenharmony_ci http://www.khronos.org/registry/speccopyright.html 215bd8deadSopenharmony_ci 225bd8deadSopenharmony_ciSpecification Update Policy 235bd8deadSopenharmony_ci 245bd8deadSopenharmony_ci Khronos-approved extension specifications are updated in response to 255bd8deadSopenharmony_ci issues and bugs prioritized by the Khronos OpenGL Working Group. For 265bd8deadSopenharmony_ci extensions which have been promoted to a core Specification, fixes will 275bd8deadSopenharmony_ci first appear in the latest version of that core Specification, and will 285bd8deadSopenharmony_ci eventually be backported to the extension document. This policy is 295bd8deadSopenharmony_ci described in more detail at 305bd8deadSopenharmony_ci https://www.khronos.org/registry/OpenGL/docs/update_policy.php 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ciStatus 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ci Complete. 355bd8deadSopenharmony_ci Approved by the ARB on 2012/06/12. 365bd8deadSopenharmony_ci 375bd8deadSopenharmony_ciVersion 385bd8deadSopenharmony_ci 395bd8deadSopenharmony_ci Last Modified Date: May 7, 2015 405bd8deadSopenharmony_ci Revision: 5 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ciNumber 435bd8deadSopenharmony_ci 445bd8deadSopenharmony_ci ARB Extension #130 455bd8deadSopenharmony_ci 465bd8deadSopenharmony_ciDependencies 475bd8deadSopenharmony_ci 485bd8deadSopenharmony_ci OpenGL 3.0 or ARB_framebuffer_object is required. 495bd8deadSopenharmony_ci 505bd8deadSopenharmony_ci This extension is written against the OpenGL 4.2 (Compatibility Profile) 515bd8deadSopenharmony_ci Specification (January 19, 2012). 525bd8deadSopenharmony_ci 535bd8deadSopenharmony_ci This extension interacts with OpenGL 3.0 and EXT_texture_array. 545bd8deadSopenharmony_ci 555bd8deadSopenharmony_ci This extension interacts with EXT_direct_state_access. 565bd8deadSopenharmony_ci 575bd8deadSopenharmony_ciOverview 585bd8deadSopenharmony_ci 595bd8deadSopenharmony_ci Framebuffer objects as introduced by ARB_framebuffer_object and OpenGL 3.0 605bd8deadSopenharmony_ci provide a generalized mechanism for rendering to off-screen surfaces. 615bd8deadSopenharmony_ci Each framebuffer object may have depth, stencil and zero or more color 625bd8deadSopenharmony_ci attachments that can be written to by the GL. The size of the framebuffer 635bd8deadSopenharmony_ci (width, height, layer count, sample count) is derived from the attachments 645bd8deadSopenharmony_ci of that framebuffer. In unextended OpenGL 4.2, it is not legal to render 655bd8deadSopenharmony_ci into a framebuffer object that has no attachments. Such a framebuffer 665bd8deadSopenharmony_ci would be considered incomplete with the 675bd8deadSopenharmony_ci FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT status. 685bd8deadSopenharmony_ci 695bd8deadSopenharmony_ci With OpenGL 4.2 and ARB_shader_image_load_store, fragment shaders are 705bd8deadSopenharmony_ci capable of doing random access writes to buffer and texture memory via 715bd8deadSopenharmony_ci image loads, stores, and atomics. This ability enables algorithms using 725bd8deadSopenharmony_ci the conventional rasterizer to generate a collection of fragments, where 735bd8deadSopenharmony_ci each fragment shader invocation will write its outputs to buffer or 745bd8deadSopenharmony_ci texture memory using image stores or atomics. Such algorithms may have no 755bd8deadSopenharmony_ci need to write color or depth values to a conventional framebuffer. 765bd8deadSopenharmony_ci However, a framebuffer with no attachments will be considered incomplete 775bd8deadSopenharmony_ci and no rasterization or fragment shader exectuion will occur. To avoid 785bd8deadSopenharmony_ci such errors, an application may be required to create an otherwise 795bd8deadSopenharmony_ci unnecessary "dummy" texture and attach it to the framebuffer (possibly 805bd8deadSopenharmony_ci with color writes masked off). If the algorithm requires the rasterizer 815bd8deadSopenharmony_ci to operate over a large number of pixels, this dummy texture will 825bd8deadSopenharmony_ci needlessly consume a significant amount of memory. 835bd8deadSopenharmony_ci 845bd8deadSopenharmony_ci This extension enables the algorithms described above to work even with a 855bd8deadSopenharmony_ci framebuffer with no attachments. Applications can specify default width, 865bd8deadSopenharmony_ci height, layer count, and sample count parameters for a framebuffer object. 875bd8deadSopenharmony_ci When a framebuffer with no attachments is bound, it will be considered 885bd8deadSopenharmony_ci complete as long as the application has specified non-zero default width 895bd8deadSopenharmony_ci and height parameters. For the purposes of rasterization, the framebuffer 905bd8deadSopenharmony_ci will be considered to have a width, height, layer count, and sample count 915bd8deadSopenharmony_ci derived from its default parameters. Framebuffers with one or more 925bd8deadSopenharmony_ci attachments are not affected by these default parameters; the size of the 935bd8deadSopenharmony_ci framebuffer will still be derived from the sizes of the attachments in 945bd8deadSopenharmony_ci that case. 955bd8deadSopenharmony_ci 965bd8deadSopenharmony_ci Additionally, this extension provides queryable implementation-dependent 975bd8deadSopenharmony_ci maximums for framebuffer width, height, layer count, and sample count, 985bd8deadSopenharmony_ci which may differ from similar limits on textures and renderbuffers. These 995bd8deadSopenharmony_ci maximums will be used to error-check the default framebuffer parameters 1005bd8deadSopenharmony_ci and also permit implementations to expose the ability to rasterize to an 1015bd8deadSopenharmony_ci attachment-less framebuffer larger than the maximum supported texture 1025bd8deadSopenharmony_ci size. 1035bd8deadSopenharmony_ci 1045bd8deadSopenharmony_ciIP Status 1055bd8deadSopenharmony_ci 1065bd8deadSopenharmony_ci No known IP claims. 1075bd8deadSopenharmony_ci 1085bd8deadSopenharmony_ciNew Procedures and Functions 1095bd8deadSopenharmony_ci 1105bd8deadSopenharmony_ci void FramebufferParameteri(enum target, enum pname, int param); 1115bd8deadSopenharmony_ci void GetFramebufferParameteriv(enum target, enum pname, int *params); 1125bd8deadSopenharmony_ci 1135bd8deadSopenharmony_ci (the following two commands are supported only if EXT_direct_state_access 1145bd8deadSopenharmony_ci is supported) 1155bd8deadSopenharmony_ci 1165bd8deadSopenharmony_ci void NamedFramebufferParameteriEXT(uint framebuffer, enum pname, 1175bd8deadSopenharmony_ci int param); 1185bd8deadSopenharmony_ci void GetNamedFramebufferParameterivEXT(uint framebuffer, enum pname, 1195bd8deadSopenharmony_ci int *params); 1205bd8deadSopenharmony_ci 1215bd8deadSopenharmony_ciNew Tokens 1225bd8deadSopenharmony_ci 1235bd8deadSopenharmony_ci Accepted by the <pname> parameter of FramebufferParameteri, 1245bd8deadSopenharmony_ci GetFramebufferParameteriv, NamedFramebufferParameteriEXT, and 1255bd8deadSopenharmony_ci GetNamedFramebufferParameterivEXT: 1265bd8deadSopenharmony_ci 1275bd8deadSopenharmony_ci FRAMEBUFFER_DEFAULT_WIDTH 0x9310 1285bd8deadSopenharmony_ci FRAMEBUFFER_DEFAULT_HEIGHT 0x9311 1295bd8deadSopenharmony_ci FRAMEBUFFER_DEFAULT_LAYERS 0x9312 1305bd8deadSopenharmony_ci FRAMEBUFFER_DEFAULT_SAMPLES 0x9313 1315bd8deadSopenharmony_ci FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314 1325bd8deadSopenharmony_ci 1335bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetIntegerv, GetBooleanv, 1345bd8deadSopenharmony_ci GetInteger64v, GetFloatv, and GetDoublev: 1355bd8deadSopenharmony_ci 1365bd8deadSopenharmony_ci MAX_FRAMEBUFFER_WIDTH 0x9315 1375bd8deadSopenharmony_ci MAX_FRAMEBUFFER_HEIGHT 0x9316 1385bd8deadSopenharmony_ci MAX_FRAMEBUFFER_LAYERS 0x9317 1395bd8deadSopenharmony_ci MAX_FRAMEBUFFER_SAMPLES 0x9318 1405bd8deadSopenharmony_ci 1415bd8deadSopenharmony_ci 1425bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL 4.2 (Compatibility Profile) Specification 1435bd8deadSopenharmony_ci(OpenGL Operation) 1445bd8deadSopenharmony_ci 1455bd8deadSopenharmony_ci None. 1465bd8deadSopenharmony_ci 1475bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL 4.2 (Compatibility Profile) Specification 1485bd8deadSopenharmony_ci(Rasterization) 1495bd8deadSopenharmony_ci 1505bd8deadSopenharmony_ci None. 1515bd8deadSopenharmony_ci 1525bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL 4.2 (Compatibility Profile) Specification 1535bd8deadSopenharmony_ci(Per-Fragment Operations and the Frame Buffer) 1545bd8deadSopenharmony_ci 1555bd8deadSopenharmony_ci Modify Section 4.4.1, Binding and Managing Framebuffer Objects, p. 425 1565bd8deadSopenharmony_ci 1575bd8deadSopenharmony_ci (add to third-to-last bullet, p. 427) 1585bd8deadSopenharmony_ci 1595bd8deadSopenharmony_ci * If the attachment sizes are not identical, ... for each attachment). 1605bd8deadSopenharmony_ci if there are no attachments, rendering will be limited to a rectangle 1615bd8deadSopenharmony_ci having a lower left of (0,0) and an upper right of (width, height), 1625bd8deadSopenharmony_ci where <width> and <height> are the framebuffer object's default width 1635bd8deadSopenharmony_ci and height. 1645bd8deadSopenharmony_ci 1655bd8deadSopenharmony_ci (add to next-to-last bullet, p. 427) 1665bd8deadSopenharmony_ci 1675bd8deadSopenharmony_ci * If the number of layers of each attachment are not identical, ... of any 1685bd8deadSopenharmony_ci attachment. If there are no attachments, the number of layers will be 1695bd8deadSopenharmony_ci taken from the framebuffer object's default layer count. 1705bd8deadSopenharmony_ci 1715bd8deadSopenharmony_ci (insert before the last paragraph of the section , p. 428) 1725bd8deadSopenharmony_ci 1735bd8deadSopenharmony_ci Parameters of a framebuffer object are set using the command 1745bd8deadSopenharmony_ci 1755bd8deadSopenharmony_ci void FramebufferParameteri(enum target, enum pname, int param); 1765bd8deadSopenharmony_ci 1775bd8deadSopenharmony_ci <target> must be DRAW_FRAMEBUFFER, READ_FRAMEBUFFER, or FRAMEBUFFER. 1785bd8deadSopenharmony_ci FRAMEBUFFER is equivalent to DRAW_FRAMEBUFFER. <pname> specifies the 1795bd8deadSopenharmony_ci parameter of the framebuffer object bound to target to set. An 1805bd8deadSopenharmony_ci INVALID_OPERATION error is generated if the default (zero) framebuffer 1815bd8deadSopenharmony_ci object is bound to <target>. 1825bd8deadSopenharmony_ci 1835bd8deadSopenharmony_ci When a framebuffer has one or more attachments, the width, height, layer 1845bd8deadSopenharmony_ci count (section 4.4.7), sample count, and sample location pattern of the 1855bd8deadSopenharmony_ci framebuffer are derived from the properties of the framebuffer 1865bd8deadSopenharmony_ci attachments. When the framebuffer has no attachments, these properties 1875bd8deadSopenharmony_ci are taken from framebuffer parameters. When <pname> is 1885bd8deadSopenharmony_ci FRAMEBUFFER_DEFAULT_WIDTH, FRAMEBUFFER_DEFAULT_HEIGHT, 1895bd8deadSopenharmony_ci FRAMEBUFFER_DEFAULT_LAYERS, FRAMEBUFFER_DEFAULT_SAMPLES, or 1905bd8deadSopenharmony_ci FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS, the value in <param> specifies 1915bd8deadSopenharmony_ci the width, height, layer count, sample count, or sample location pattern, 1925bd8deadSopenharmony_ci repsectively, used when the framebuffer has no attachments. The error 1935bd8deadSopenharmony_ci INVALID_VALUE will be generated if <param> is less than zero or greater 1945bd8deadSopenharmony_ci the implementation-dependent limits MAX_FRAMEBUFFER_WIDTH, 1955bd8deadSopenharmony_ci MAX_FRAMEBUFFER_HEIGHT, MAX_FRAMEBUFFER_LAYERS, MAX_FRAMEBUFFER_SAMPLES if 1965bd8deadSopenharmony_ci <pname> is FRAMEBUFFER_DEFAULT_WIDTH, FRAMEBUFFER_DEFAULT_HEIGHT, 1975bd8deadSopenharmony_ci FRAMEBUFFER_DEFAULT_LAYERS, or FRAMEBUFFER_DEFAULT_SAMPLES, respectively. 1985bd8deadSopenharmony_ci 1995bd8deadSopenharmony_ci When a framebuffer has no attachments, it is considered layered (section 2005bd8deadSopenharmony_ci 4.4.7) if and only if the value of FRAMEBUFFER_DEFAULT_LAYERS is non-zero. 2015bd8deadSopenharmony_ci It is considered to have sample buffers if and only if the value of 2025bd8deadSopenharmony_ci FRAMEBUFFER_DEFAULT_SAMPLES is non-zero. The number of samples in the 2035bd8deadSopenharmony_ci framebuffer is derived from the value of FRAMEBUFFER_DEFAULT_SAMPLES in an 2045bd8deadSopenharmony_ci implementation-dependent manner similar to that described for the command 2055bd8deadSopenharmony_ci RenderbufferStorageMultisample (section 4.4.2). If the framebuffer has 2065bd8deadSopenharmony_ci sample buffers, if the value of FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 2075bd8deadSopenharmony_ci is non-zero, it is considered to have a fixed sample location pattern as 2085bd8deadSopenharmony_ci described for TexImage2DMultisample (section 3.10.6). 2095bd8deadSopenharmony_ci 2105bd8deadSopenharmony_ci The command 2115bd8deadSopenharmony_ci 2125bd8deadSopenharmony_ci void NamedFramebufferParameteriEXT(uint framebuffer, enum pname, 2135bd8deadSopenharmony_ci int param); 2145bd8deadSopenharmony_ci 2155bd8deadSopenharmony_ci operates exactly like FramebufferParameteri, except that it modifies 2165bd8deadSopenharmony_ci parameters of the framebuffer object named by <framebuffer> instead of a 2175bd8deadSopenharmony_ci specified bound framebuffer object. The error INVALID_VALUE is generated 2185bd8deadSopenharmony_ci if <framebuffer> is not a name returned by GenFramebuffers. If a 2195bd8deadSopenharmony_ci framebuffer object named <framebuffer> does not yet exist, it will be 2205bd8deadSopenharmony_ci created. 2215bd8deadSopenharmony_ci 2225bd8deadSopenharmony_ci 2235bd8deadSopenharmony_ci Modify Section 4.4.4, Framebuffer Completeness, p. 439 2245bd8deadSopenharmony_ci 2255bd8deadSopenharmony_ci (modify second bullet in the list of required conditions for attachment 2265bd8deadSopenharmony_ci completeness in "Framebuffer Attachment Completeness", p. 440) 2275bd8deadSopenharmony_ci 2285bd8deadSopenharmony_ci * The width and height of <image> are greater than zero and are less than 2295bd8deadSopenharmony_ci or equal to the implementation-dependent limits MAX_FRAMEBUFFER_WIDTH 2305bd8deadSopenharmony_ci and MAX_FRAMEBUFFER_HEIGHT, respectively. 2315bd8deadSopenharmony_ci 2325bd8deadSopenharmony_ci (delete the third and fourth bullets in the list, replacing with new 2335bd8deadSopenharmony_ci bullets at the end of the list) 2345bd8deadSopenharmony_ci 2355bd8deadSopenharmony_ci (add new bullets to the end of the list, p. 441) 2365bd8deadSopenharmony_ci 2375bd8deadSopenharmony_ci * If <image> is a three-dimensional, one- or two-dimensional array, or 2385bd8deadSopenharmony_ci cube map array texture and the attachment is not layered, the selected 2395bd8deadSopenharmony_ci layer is less than the depth or layer count of the texture. 2405bd8deadSopenharmony_ci 2415bd8deadSopenharmony_ci * If <image> is a three-dimensional, one- or two-dimensional array, or 2425bd8deadSopenharmony_ci cube map array texture and the attachment is layered, the depth or 2435bd8deadSopenharmony_ci layer count of the texture is less than or equal to the 2445bd8deadSopenharmony_ci implementation-dependent limit MAX_FRAMEBUFFER_LAYERS. 2455bd8deadSopenharmony_ci 2465bd8deadSopenharmony_ci * If <image> has multiple samples, its sample count is less than or equal 2475bd8deadSopenharmony_ci to the implementation-dependent limit MAX_FRAMEBUFFER_SAMPLES. 2485bd8deadSopenharmony_ci 2495bd8deadSopenharmony_ci (modify third bullet of "Whole Framebuffer Completeness", p. 441) 2505bd8deadSopenharmony_ci 2515bd8deadSopenharmony_ci * There is at least one image attached to the framebuffer, or the 2525bd8deadSopenharmony_ci framebuffer's FRAMEBUFFER_DEFAULT_WIDTH and FRAMEBUFFER_DEFAULT_HEIGHT 2535bd8deadSopenharmony_ci parameters are both non-zero. 2545bd8deadSopenharmony_ci 2555bd8deadSopenharmony_ci { FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT } 2565bd8deadSopenharmony_ci 2575bd8deadSopenharmony_ci 2585bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL 4.2 (Compatibility Profile) Specification 2595bd8deadSopenharmony_ci(Special Functions) 2605bd8deadSopenharmony_ci 2615bd8deadSopenharmony_ci None. 2625bd8deadSopenharmony_ci 2635bd8deadSopenharmony_ci (NOTE: GetFramebufferParameteriv is not compiled in a display list, but 2645bd8deadSopenharmony_ci no spec language is required due to the blanket language covering all Get* 2655bd8deadSopenharmony_ci commands.) 2665bd8deadSopenharmony_ci 2675bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL 4.2 (Compatibility Profile) Specification 2685bd8deadSopenharmony_ci(State and State Requests) 2695bd8deadSopenharmony_ci 2705bd8deadSopenharmony_ci Modify Section 6.1.19, Framebuffer Object Queries, p. 501 2715bd8deadSopenharmony_ci 2725bd8deadSopenharmony_ci (add to end of the section, p. 504) 2735bd8deadSopenharmony_ci 2745bd8deadSopenharmony_ci The command 2755bd8deadSopenharmony_ci 2765bd8deadSopenharmony_ci void GetFramebufferParameteriv(enum target, enum pname, int *params) 2775bd8deadSopenharmony_ci 2785bd8deadSopenharmony_ci returns the values of the framebuffer parameter <pname> of the framebuffer 2795bd8deadSopenharmony_ci object bound to <target>. 2805bd8deadSopenharmony_ci 2815bd8deadSopenharmony_ci <target> must be DRAW_FRAMEBUFFER, READ_FRAMEBUFFER, or FRAMEBUFFER. 2825bd8deadSopenharmony_ci FRAMEBUFFER is equivalent to DRAW_FRAMEBUFFER. <pname> specifies the 2835bd8deadSopenharmony_ci parameter of the framebuffer object bound to target to return. An 2845bd8deadSopenharmony_ci INVALID_OPERATION error is generated if the default (zero) framebuffer 2855bd8deadSopenharmony_ci object is bound to <target>. 2865bd8deadSopenharmony_ci 2875bd8deadSopenharmony_ci The command 2885bd8deadSopenharmony_ci 2895bd8deadSopenharmony_ci void GetNamedFramebufferParameterivEXT(uint framebuffer, enum pname, 2905bd8deadSopenharmony_ci int *params); 2915bd8deadSopenharmony_ci 2925bd8deadSopenharmony_ci operates exactly like GetFramebufferParameteriv, except that it queries 2935bd8deadSopenharmony_ci parameters of the framebuffer object named by <framebuffer> instead of a 2945bd8deadSopenharmony_ci specified bound framebuffer object. The error INVALID_VALUE is generated 2955bd8deadSopenharmony_ci if <framebuffer> is not a name returned by GenFramebuffers. If a 2965bd8deadSopenharmony_ci framebuffer object named <framebuffer> does not yet exist, it will be 2975bd8deadSopenharmony_ci created. 2985bd8deadSopenharmony_ci 2995bd8deadSopenharmony_ci 3005bd8deadSopenharmony_ciAdditions to Appendix A of the OpenGL 4.2 (Compatibility Profile) Specification 3015bd8deadSopenharmony_ci(Invariance) 3025bd8deadSopenharmony_ci 3035bd8deadSopenharmony_ci None. 3045bd8deadSopenharmony_ci 3055bd8deadSopenharmony_ciAdditions to Appendix D of the OpenGL 4.2 (Compatibility Profile) Specification 3065bd8deadSopenharmony_ci(Shared Objects and Multiple Contexts) 3075bd8deadSopenharmony_ci 3085bd8deadSopenharmony_ci None. 3095bd8deadSopenharmony_ci 3105bd8deadSopenharmony_ciAdditions to the AGL/EGL/GLX/WGL Specifications 3115bd8deadSopenharmony_ci 3125bd8deadSopenharmony_ci None 3135bd8deadSopenharmony_ci 3145bd8deadSopenharmony_ciGLX Protocol 3155bd8deadSopenharmony_ci 3165bd8deadSopenharmony_ci TBD 3175bd8deadSopenharmony_ci 3185bd8deadSopenharmony_ciDependencies on OpenGL 3.0 and EXT_texture_array 3195bd8deadSopenharmony_ci 3205bd8deadSopenharmony_ci If OpenGL 3.0 and EXT_texture_array are not supported, references to the 3215bd8deadSopenharmony_ci framebuffer parameter FRAMEBUFFER_DEFAULT_LAYERS should be removed. 3225bd8deadSopenharmony_ci 3235bd8deadSopenharmony_ciDependencies on EXT_direct_state_access 3245bd8deadSopenharmony_ci 3255bd8deadSopenharmony_ci If EXT_direct_state_access is not supported, the commands 3265bd8deadSopenharmony_ci NamedFramebufferParameteriEXT and GetNamedFramebufferParameterivEXT are 3275bd8deadSopenharmony_ci not supported. 3285bd8deadSopenharmony_ci 3295bd8deadSopenharmony_ciErrors 3305bd8deadSopenharmony_ci 3315bd8deadSopenharmony_ci The error INVALID_ENUM is generated by FramebufferParameteri and 3325bd8deadSopenharmony_ci GetFramebufferParameteriv if <target> is not DRAW_FRAMEBUFFER, 3335bd8deadSopenharmony_ci READ_FRAMEBUFFER, or FRAMEBUFFER. 3345bd8deadSopenharmony_ci 3355bd8deadSopenharmony_ci The error INVALID_OPERATION is generated by FramebufferParameteri and 3365bd8deadSopenharmony_ci GetFramebufferParameteriv if the default (zero) framebuffer is bound to 3375bd8deadSopenharmony_ci target. 3385bd8deadSopenharmony_ci 3395bd8deadSopenharmony_ci The error INVALID_VALUE is generated by FramebufferParameteri and 3405bd8deadSopenharmony_ci NamedFramebufferParameteriEXT if <param> is less than zero or greater the 3415bd8deadSopenharmony_ci implementation-dependent limits MAX_FRAMEBUFFER_WIDTH, 3425bd8deadSopenharmony_ci MAX_FRAMEBUFFER_HEIGHT, MAX_FRAMEBUFFER_LAYERS, MAX_FRAMEBUFFER_SAMPLES if 3435bd8deadSopenharmony_ci <pname> is FRAMEBUFFER_DEFAULT_WIDTH, FRAMEBUFFER_DEFAULT_HEIGHT, 3445bd8deadSopenharmony_ci FRAMEBUFFER_DEFAULT_LAYERS, or FRAMEBUFFER_DEFAULT_SAMPLES, respectively. 3455bd8deadSopenharmony_ci 3465bd8deadSopenharmony_ci The error INVALID_VALUE is generated by NamedFramebufferParameteriEXT and 3475bd8deadSopenharmony_ci GetNamedFramebufferParameterivEXT if <framebuffer> is not a name returned 3485bd8deadSopenharmony_ci by GenFramebuffers. 3495bd8deadSopenharmony_ci 3505bd8deadSopenharmony_ciNew State 3515bd8deadSopenharmony_ci 3525bd8deadSopenharmony_ci Add to Table 6.33, Framebuffer (state per framebuffer object), p. 537 3535bd8deadSopenharmony_ci 3545bd8deadSopenharmony_ci Initial 3555bd8deadSopenharmony_ci Get Value Type Get Command Value Description Sec. Attrib. 3565bd8deadSopenharmony_ci ---------------------------- ---- --------------- ------- ------------------------ ----- --------- 3575bd8deadSopenharmony_ci FRAMEBUFFER_DEFAULT_WIDTH Z+ GetFramebuffer- 0 default width of frame- 4.4.1 - 3585bd8deadSopenharmony_ci Parameteriv buffer w/o attachments 3595bd8deadSopenharmony_ci FRAMEBUFFER_DEFAULT_HEIGHT Z+ GetFramebuffer- 0 default height of frame- 4.4.1 - 3605bd8deadSopenharmony_ci Parameteriv buffer w/o attachments 3615bd8deadSopenharmony_ci FRAMEBUFFER_DEFAULT_LAYERS Z+ GetFramebuffer- 0 default layer count of 4.4.1 - 3625bd8deadSopenharmony_ci Parameteriv framebuffer w/o 3635bd8deadSopenharmony_ci attachments 3645bd8deadSopenharmony_ci FRAMEBUFFER_DEFAULT_SAMPLES Z+ GetFramebuffer- 0 default sample count of 4.4.1 - 3655bd8deadSopenharmony_ci Parameteriv framebuffer w/o 3665bd8deadSopenharmony_ci attachments 3675bd8deadSopenharmony_ci FRAMEBUFFER_DEFAULT_FIXED_ B GetFramebuffer- FALSE default sample location 4.4.1 - 3685bd8deadSopenharmony_ci SAMPLE_LOCATIONS Parameteriv pattern of framebuffer 3695bd8deadSopenharmony_ci w/o attachments 3705bd8deadSopenharmony_ci 3715bd8deadSopenharmony_ci 3725bd8deadSopenharmony_ciNew Implementation Dependent State 3735bd8deadSopenharmony_ci 3745bd8deadSopenharmony_ci Get Value Type Get Command Minimum Value Description Sec. 3755bd8deadSopenharmony_ci ----------------------- ---- ----------- ------------- ------------------------- ----- 3765bd8deadSopenharmony_ci MAX_FRAMEBUFFER_WIDTH Z+ GetIntegerv 16384 (*) maximum width for 4.4.1 3775bd8deadSopenharmony_ci framebuffer object 3785bd8deadSopenharmony_ci MAX_FRAMEBUFFER_HEIGHT Z+ GetIntegerv 16384 (*) maximum height for 4.4.1 3795bd8deadSopenharmony_ci framebuffer object 3805bd8deadSopenharmony_ci MAX_FRAMEBUFFER_LAYERS Z+ GetIntegerv 2048 (*) maximum layer count for 4.4.1 3815bd8deadSopenharmony_ci layered framebuffer object 3825bd8deadSopenharmony_ci MAX_FRAMEBUFFER_SAMPLES Z+ GetIntegerv 4 (*) maximum sample count for 4.4.1 3835bd8deadSopenharmony_ci framebuffer object 3845bd8deadSopenharmony_ci 3855bd8deadSopenharmony_ci (*) Note: These minimum values are the ones applicable to this extension 3865bd8deadSopenharmony_ci on top of OpenGL 4.2 and higher. The minimum values may be lower on 3875bd8deadSopenharmony_ci implementations supporting only older versions of OpenGL. For 3885bd8deadSopenharmony_ci implementations supporting this extension on older versions, the minimums 3895bd8deadSopenharmony_ci can be determined from the table below. 3905bd8deadSopenharmony_ci 3915bd8deadSopenharmony_ci the minimum for is the minimum defined for 3925bd8deadSopenharmony_ci ----------------------- -------------------------- 3935bd8deadSopenharmony_ci MAX_FRAMEBUFFER_WIDTH MAX_TEXTURE_SIZE 3945bd8deadSopenharmony_ci MAX_FRAMEBUFFER_HEIGHT MAX_TEXTURE_SIZE 3955bd8deadSopenharmony_ci MAX_FRAMEBUFFER_LAYERS MAX_ARRAY_TEXTURE_LAYERS 3965bd8deadSopenharmony_ci MAX_FRAMEBUFFER_SAMPLES MAX_SAMPLES 3975bd8deadSopenharmony_ci 3985bd8deadSopenharmony_ciIssues 3995bd8deadSopenharmony_ci 4005bd8deadSopenharmony_ci (1) Should we specify the default framebuffer parameters in one command or 4015bd8deadSopenharmony_ci via separate FramebufferParameter* commands? 4025bd8deadSopenharmony_ci 4035bd8deadSopenharmony_ci RESOLVED: Separate parameters provide for a more future-proof API, in 4045bd8deadSopenharmony_ci case we need new defaults in the future. 4055bd8deadSopenharmony_ci 4065bd8deadSopenharmony_ci (2) Should the default framebuffer parameters affect only framebuffers 4075bd8deadSopenharmony_ci with no attachments? 4085bd8deadSopenharmony_ci 4095bd8deadSopenharmony_ci RESOLVED: As specified, they affect only framebuffers with no 4105bd8deadSopenharmony_ci attachments. 4115bd8deadSopenharmony_ci 4125bd8deadSopenharmony_ci Alternately, one could have treated these default parameters as 4135bd8deadSopenharmony_ci specifying an extra unusable attachment whose values would be used in 4145bd8deadSopenharmony_ci various intersection/consistency tests. In that approach, if a 4155bd8deadSopenharmony_ci framebuffer had a single attachment and default parameters were also 4165bd8deadSopenharmony_ci specified: 4175bd8deadSopenharmony_ci 4185bd8deadSopenharmony_ci * the renderable area would be the intersection of the rectangle/layer 4195bd8deadSopenharmony_ci count derived from the attachment and the rectangle/layer count from 4205bd8deadSopenharmony_ci the framebuffer defaults; 4215bd8deadSopenharmony_ci 4225bd8deadSopenharmony_ci * the sample count and fixed sample location state would have to match 4235bd8deadSopenharmony_ci between the attachment and framebuffer default. 4245bd8deadSopenharmony_ci 4255bd8deadSopenharmony_ci This specification is not using such an "intersection" approach, which 4265bd8deadSopenharmony_ci doesn't seem to introduce significant value. 4275bd8deadSopenharmony_ci 4285bd8deadSopenharmony_ci (3) Should we check the default framebuffer parameters against 4295bd8deadSopenharmony_ci implementation-dependent limits when they are specified, when testing 4305bd8deadSopenharmony_ci for completeness, or both? 4315bd8deadSopenharmony_ci 4325bd8deadSopenharmony_ci RESOLVED: We will expose implementation-dependent limits on the maximum 4335bd8deadSopenharmony_ci framebuffer width, height, layer count, and sample count, and check the 4345bd8deadSopenharmony_ci values passed the FramebufferParameteri against them. 4355bd8deadSopenharmony_ci 4365bd8deadSopenharmony_ci As specified, implementations are required to support all legal 4375bd8deadSopenharmony_ci combinations of default framebuffer width, height, sample count, and 4385bd8deadSopenharmony_ci layer count as long as they are under their respective implementation 4395bd8deadSopenharmony_ci limits. This requirement could be a problem if a hypothetical 4405bd8deadSopenharmony_ci implementation could support larger values for one default parameter as 4415bd8deadSopenharmony_ci long as others stayed small. For example, if an implementation could 4425bd8deadSopenharmony_ci support a 64Kx64K single-sample framebuffer, but could only support a 4435bd8deadSopenharmony_ci 16Kx16K framebuffer with 8 samples, this extension would only permit 4445bd8deadSopenharmony_ci them to expose a maximum width/height of 16K. The most obvious way to 4455bd8deadSopenharmony_ci support this would be to add a feature allowing larger default sizes, 4465bd8deadSopenharmony_ci but treating a framebuffer with an unsupported combination (e.g., 4475bd8deadSopenharmony_ci 64Kx64K at 8xAA) as incomplete. Such a capability will not be 4485bd8deadSopenharmony_ci incorporated into this extension, however. 4495bd8deadSopenharmony_ci 4505bd8deadSopenharmony_ci (4) How do the new implementation-dependent limits for maximum framebuffer 4515bd8deadSopenharmony_ci width, height, layer count, and sample count affect framebuffers with 4525bd8deadSopenharmony_ci attachments? 4535bd8deadSopenharmony_ci 4545bd8deadSopenharmony_ci RESOLVED: If implementation limits permit the creation of attachable 4555bd8deadSopenharmony_ci surfaces larger than the maximum framebuffer size, such images will be 4565bd8deadSopenharmony_ci considered not to be framebuffer attachment complete. We don't expect 4575bd8deadSopenharmony_ci this to be a common case, as the minimum maximums for framebuffer sizes 4585bd8deadSopenharmony_ci equals the minimum maximums for texture sizes. 4595bd8deadSopenharmony_ci 4605bd8deadSopenharmony_ci (5) The ClampColor setting FIXED_ONLY depends on the framebuffer. How is 4615bd8deadSopenharmony_ci this value intepreted in a framebuffer with no attachments? 4625bd8deadSopenharmony_ci 4635bd8deadSopenharmony_ci RESOLVED: Given current spec language, clamping should be enabled in 4645bd8deadSopenharmony_ci this case, as there are no enabled color buffers with non-fixed-point 4655bd8deadSopenharmony_ci components: 4665bd8deadSopenharmony_ci 4675bd8deadSopenharmony_ci If clamp is FIXED_ONLY, fragment color clamping is enabled if 4685bd8deadSopenharmony_ci all enabled color buffers have fixed-point components. 4695bd8deadSopenharmony_ci 4705bd8deadSopenharmony_ci This isn't really a new issue in this extension; it could also arise 4715bd8deadSopenharmony_ci when using a complete framebuffer with no color attachments. 4725bd8deadSopenharmony_ci 4735bd8deadSopenharmony_ci Note that this issue has no effect on the core profile of OpenGL. 4745bd8deadSopenharmony_ci CLAMP_VERTEX_COLOR and CLAMP_FRAGMENT_COLOR are compatibility-only. 4755bd8deadSopenharmony_ci CLAMP_READ_COLOR has no effect as ReadPixels will always generate an 4765bd8deadSopenharmony_ci error due to the lack of framebuffer attachments. 4775bd8deadSopenharmony_ci 4785bd8deadSopenharmony_ci (6) What should be returned on the compatibility profile queries of 4795bd8deadSopenharmony_ci RED_BITS, GREEN_BITS, BLUE_BITS, and ALPHA_BITS on a framebuffer with 4805bd8deadSopenharmony_ci no attachments? 4815bd8deadSopenharmony_ci 4825bd8deadSopenharmony_ci RESOLVED: Zero should be returned, which is also the case for 4835bd8deadSopenharmony_ci DEPTH_BITS and STENCIL_BITS. As in issue (5), this isn't a new issue in 4845bd8deadSopenharmony_ci this spec. 4855bd8deadSopenharmony_ci 4865bd8deadSopenharmony_ciRevision History 4875bd8deadSopenharmony_ci 4885bd8deadSopenharmony_ci Revision 5, May 7, 2015 (Jon Leech) 4895bd8deadSopenharmony_ci - Restore missing cube map arrays to new framebuffer attachment 4905bd8deadSopenharmony_ci completeness conditions (Bug 11201). 4915bd8deadSopenharmony_ci 4925bd8deadSopenharmony_ci Revision 4, September 12, 2012 (Jon Leech) 4935bd8deadSopenharmony_ci - Clarify legal <target> values (Bug 9344). 4945bd8deadSopenharmony_ci 4955bd8deadSopenharmony_ci Revision 3, June 4, 2012 (pbrown) 4965bd8deadSopenharmony_ci - Mark issues (4) through (6) as resolved. 4975bd8deadSopenharmony_ci 4985bd8deadSopenharmony_ci Revision 2, June 1, 2012 (pbrown) 4995bd8deadSopenharmony_ci - Add new implementation-dependent limits on framebuffer width, height, 5005bd8deadSopenharmony_ci layer count, and sample count. 5015bd8deadSopenharmony_ci - Assign enumerant values for all the new tokens. 5025bd8deadSopenharmony_ci - Specify that the default framebuffer parameters are error-checked 5035bd8deadSopenharmony_ci against the new implementation limits. 5045bd8deadSopenharmony_ci - Add new checks treating framebuffer attachments as incomplete in the 5055bd8deadSopenharmony_ci unlikely event that they exceed the new implementation limits. 5065bd8deadSopenharmony_ci - Mark issues (1) through (3) as resolved. 5075bd8deadSopenharmony_ci - Add new issues (4) through (6). 5085bd8deadSopenharmony_ci - Add overview text. 5095bd8deadSopenharmony_ci 5105bd8deadSopenharmony_ci Revision 1, May 14, 2012 (pbrown) 5115bd8deadSopenharmony_ci - Initial revision, for discussion purposes. 512