1Name 2 3 OES_surfaceless_context 4 5Name Strings 6 7 GL_OES_surfaceless_context 8 9Contributors 10 11 Kristian Hoegsberg, Intel 12 Steven Holte, NVIDIA 13 Greg Roth, NVIDIA 14 15Contact 16 17 Steven Holte, NVIDIA (sholte 'at' nvidia.com) 18 19Notice 20 21 Copyright (c) 2010-2013 The Khronos Group Inc. Copyright terms at 22 http://www.khronos.org/registry/speccopyright.html 23 24Specification Update Policy 25 26 Khronos-approved extension specifications are updated in response to 27 issues and bugs prioritized by the Khronos OpenGL ES Working Group. For 28 extensions which have been promoted to a core Specification, fixes will 29 first appear in the latest version of that core Specification, and will 30 eventually be backported to the extension document. This policy is 31 described in more detail at 32 https://www.khronos.org/registry/OpenGL/docs/update_policy.php 33 34Status 35 36 Complete. 37 Approved by the OpenGL ES Working Group. 38 Ratified by the Khronos Board of Promoters on July 28, 2012. 39 40Version 41 42 Version 4, 2012/05/30 43 44Number 45 46 OpenGL ES Extension #116 47 48Dependencies 49 50 This extension is written against the OpenGL ES 2.0 Specification 51 but can apply to OpenGL ES 1.1 with the GL_OES_framebuffer_object 52 extension. 53 54 Support for creating contexts that this extension applies to may 55 require extensions to companion APIs (see 56 EGL_KHR_surfaceless_context) 57 58Overview 59 60 Applications that only want to render to framebuffer objects should 61 not need to create a throw-away EGL surface (typically a 1x1 62 pbuffer) just to get a current context. The EGL extension 63 KHR_surfaceless_context provides a mechanism for making a context 64 current without a surface. This extensions specifies the behaviour 65 of OpenGL ES 1.x and OpenGL ES 2.0 when such a context is made 66 current. 67 68New Procedures and Functions 69 70 None 71 72New Tokens 73 74 Returned by glCheckFramebufferStatusOES and glCheckFramebufferStatus: 75 76 GL_FRAMEBUFFER_UNDEFINED_OES 0x8219 77 78Additions to Chapter 2 'OpenGL ES Operation' of the OpenGL ES 2.0 79Specification: 80 81 In section 2.1 'OpenGL ES Fundamentals', replace the paragraphs 82 beginning: 83 84 " The GL interacts with two classes of framebuffers: window- 85 system-provided framebuffers and application-created framebuffers ... 86 The effects of GL commands on the window-system-provided 87 framebuffer are ultimately controlled by the window-system that 88 allocates framebuffer resources ... 89 The initialization of a GL context itself occurs when the 90 window-system allocates a window for GL rendering and is influenced 91 by the state of the windowsystem-provided framebuffer" 92 93 with the following paragraphs: 94 95 " The GL interacts with two classes of framebuffers: window 96 system-provided and application-created. There is at most one window 97 system-provided framebuffer at any time, referred to as the default 98 framebuffer. Application-created framebuffers, referred to as 99 framebuffer objects, may be created as desired. These two types of 100 framebuffer are distinguished primarily by the interface for 101 configuring and managing their state. 102 The effects of GL commands on the default framebuffer are 103 ultimately controlled by the window system, which allocates 104 framebuffer resources, determines which portions of the default 105 framebuffer the GL may access at any given time, and communicates to 106 the GL how those portions are structured. Therefore, there are no GL 107 commands to initialize a GL context or configure the default 108 framebuffer. 109 Similarly, display of framebuffer contents on a physical display 110 device (including the transformation of individual framebuffer 111 values by such techniques as gamma correction) is not addressed by 112 the GL. 113 Allocation and configuration of the default framebuffer occurs 114 outside of the GL in conjunction with the window system, using 115 companion APIs, such as EGL. Allocation and initialization of GL 116 contexts is also done using these companion APIs. GL contexts can 117 typically be associated with different default framebuffers, and 118 some context state is determined at the time this association is 119 performed. 120 It is possible to use a GL context without a default framebuffer, 121 in which case a framebuffer object must be used to perform all 122 rendering. This is useful for applications needing to perform 123 offscreen rendering." 124 125 In the last paragraph of section 2.12 'Controlling the viewport', 126 after the sentence: 127 128 " In the initial state, w and h are set to the width and height, 129 respectively, of the window into which the GL is to do its 130 rendering." 131 132 Add the sentence: 133 134 " If no default framebuffer is associated with the GL context (see 135 chapter 4), then w and h are initially set to zero." 136 137Additions to Chapter 4 'Per-Fragment Operations and the Framebuffer', of 138the OpenGL ES 2.0 Specification: 139 140 In the introduction, after the sentence: 141 142 " Further, and implementation or context may not provide depth or 143 stencil buffers." 144 145 Add the sentence: 146 " If no default framebuffer is associated with the GL context, the 147 framebuffer is incomplete except when a framebuffer object is bound. 148 (see sections 4.4.1 and 4.4.5)" 149 150 In the last paragraph of section 4.1.2 'Scissor Test', after the 151 sentence 152 153 " The state required consists of four integer values and a bit 154 indicating whether the test is enabled or disabled. In the initial 155 state left = bottom = 0; width and height are determined by the size 156 of the GL window." 157 158 Add the sentence: 159 160 " If the default framebuffer is bound but no default framebuffer is 161 associated with the GL context (see chapter 4), then width and 162 height are initially set to zero." 163 164 In section 4.4.5 'Framebuffer Completeness', before the first 165 paragraph, add the paragraphs: 166 167 " A framebuffer must be framebuffer complete to effectively be 168 used as the draw or read framebuffer of the GL. 169 The default framebuffer is always complete if it exists; however, 170 if no default framebuffer exists (no window system-provided drawable 171 is associated with the GL context), it is deemed to be incomplete." 172 173 In the subsection 'Framebuffer Completeness', add to the list of 174 rules for framebuffer completeness and associated errors: 175 176 "* if target is the default framebuffer, the default framebuffer 177 exists. { FRAMEBUFFER_UNDEFINED_OES } " 178 179 To the list of actions which may affect framebuffer completeness, 180 add the action: 181 182 " Associating a different window system-provided drawable, or no 183 drawable, with the default framebuffer using a window system binding 184 API such as EGL." 185 186Revision History 187 188 Version 4, 2012/05/30 (Greg Roth) - OESify. Add suffix. Omit 189 indiscression. Revise widths. 190 191 Version 3, 2012/05/29 (Steven Holte) - Typo corrections. 192 193 Version 2, 2012/04/13 (Steven Holte) - Language modifications 194 expanded to include harmonize with related specifications. 195 196 Version 1, 2010/08/19 (Kristian Hoegsberg) - Initial draft, based 197 on Jon's wording in the EGL_KHR_surfaceless_gles extension. 198