1Name 2 3 EXT_bind_to_front 4 5Name Strings 6 7 EGL_EXT_bind_to_front 8 9 10Contributors 11 12 Daniel Herring 13 14Contacts 15 16 Daniel Herring, Core Avionics & Industrial Inc., daniel dot herring at ch1group dot com 17 18Status 19 20 Complete 21 22Version 23 24 Version 1.0, February 21, 2017 25 26Number 27 28 EGL Extension #121 29 30Dependencies 31 32 Requires EGL 1.2. 33 34Overview 35 36 This extension allows for using double buffered Pbuffers for rendering to textures, by 37 allowing a new enumeration to be used in eglBindTexImage. EGL_FRONT_BUFFER_EXT is used 38 to denote reading the textures data from the front buffer of a double buffered Pbuffer. 39 40New Types 41 42 None 43 44New Procedures and Functions 45 46 None 47 48New Tokens 49 50 EGL_FRONT_BUFFER_EXT 0x3464 51 52Modify Section 3.6.1 of the EGL 1.2 Specification, paragraph 1 53 Add EGL_FRONT_BUFFER_EXT to list of acceptable values for buffer attribute. 54 55Modify Section 3.6.2 of the EGL 1.2 Specification, paragraph 5 56 Add EGL_FRONT_BUFFER_EXT to list of acceptable values for buffer attribute. 57 58Modify Section 3.5.2 of the EGL 1.2 Specification, paragraph 4 59 Add EGL_RENDER_BUFFER to list of attributes which can be accepted in attrib_list. 60 61Add to Section 3.5.2 of the EGL 1.2 Specification 62 EGL_RENDER_BUFFER specifies the number of color buffers which should be useable by the 63 client API rendering to the Pbuffer. If its value is EGL_SINGLE_BUFFER, then there is 64 one color buffer the client APIs will render to directly. If its value is EGL_BACK_BUFFER, 65 then there are at least two color buffers the client API can render to. eglSwapBuffers 66 is used to switch which color buffer is currently being rendered to. By default, all 67 client APIs should render into the back buffer. The default value of EGL_RENDER_BUFFER 68 is EGL_SINGLE_BUFFER. 69 70Modify Section 2.2.2 of the EGL 1.2 Specification, paragraph 2 71 Pbuffer surfaces have a back buffer but no associated window, so the back buffer 72 need not be copied. 73 Change to: 74 Pbuffer surfaces have no associated window, and include a back buffer, used by 75 default, for rendering to by the client API. Pbuffers may have a front buffer 76 used during render to texture operations to provide a read only texture which may 77 be used while the back buffer is being rendered to. 78 79Modify Section 3.5.6 80 Querying EGL RENDER BUFFER returns the buffer which client API rendering 81 is requested to use. For a window surface, this is the same attribute value 82 specified when the surface was created. For a Pbuffer surface, it is always 83 EGL BACK BUFFER. For a pixmap surface, it is always EGL SINGLE BUFFER. To 84 determine the actual buffer being rendered to by a context, call eglQueryContext 85 (see section 3.7.4). 86 87 Change to: 88 Querying EGL RENDER BUFFER returns the buffer which client API rendering 89 is requested to use. For a window surface or Pbuffer surface, this is the 90 same attribute value specified when the surface was created. For a pixmap 91 surface, it is always EGL SINGLE BUFFER. To determine the actual buffer being 92 rendered to by a context, call eglQueryContext (see section 3.7.4). 93 94Revision History 95 Version 1.0, 21/02/2017 - Initial Version 96 97Question: 98 What if the implementation already uses double buffering for single buffered PBuffers? 99 Such as when an implementation must insert a resolve to a texture instead of being 100 able to use the same memory. 101Answer: 102 EGL_BACK_BUFFER would still refer to the resolved buffer. But in the case of the a 103 double buffer EGL_FRONT_BUFFER should be used to reference the resolved buffer instead 104 of EGL_BACK_BUFFER as in this case the user has specified 2 buffers and knows they want 105 the resolved buffer. 106 In the double buffer case where only a back draw and a front resolved buffer is used 107 the implementation may not support EGL_BACK_BUFFER and should generate an EGL_BAD_ 108 PARAMETER error when not supporting EGL_BACK_BUFFER texture binding. 109