1Name 2 3 WGL_ARB_create_context_robustness 4 5Name Strings 6 7 WGL_ARB_create_context_robustness 8 9Contact 10 11 Jon Leech (jon 'at' alumni.caltech.edu) 12 13Notice 14 15 Copyright (c) 2010-2013 The Khronos Group Inc. Copyright terms at 16 http://www.khronos.org/registry/speccopyright.html 17 18Specification Update Policy 19 20 Khronos-approved extension specifications are updated in response to 21 issues and bugs prioritized by the Khronos OpenGL Working Group. For 22 extensions which have been promoted to a core Specification, fixes will 23 first appear in the latest version of that core Specification, and will 24 eventually be backported to the extension document. This policy is 25 described in more detail at 26 https://www.khronos.org/registry/OpenGL/docs/update_policy.php 27 28Status 29 30 Complete. Approved by the ARB on June 9, 2010. 31 Approved by the Khronos Board of Promoters on July 23, 2010. 32 33Version 34 35 Version 3, 2010/07/22 36 37Number 38 39 ARB Extension #102 40 41Dependencies 42 43 WGL_ARB_extensions_string is required. 44 45 WGL_ARB_create_context is required. 46 47 An OpenGL implementation supporting GL_ARB_robustness is required. 48 49Overview 50 51 This extension allows creating an OpenGL context supporting robust 52 buffer access behavior and a specified graphics reset notification 53 behavior. 54 55IP Status 56 57 No known IP claims. 58 59New Procedures and Functions 60 61 None 62 63New Tokens 64 65 Accepted as a bit in the attribute value for WGL_CONTEXT_FLAGS_ARB 66 in the <*attrib_list> argument to wglCreateContextAttribsARB: 67 68 WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004 69 70 Accepted as an attribute name in the <*attrib_list> argument to 71 wglCreateContextAttribsARB: 72 73 WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 74 75 Accepted as an attribute value for 76 WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB in the <*attrib_list> 77 argument to wglCreateContextAttribsARB: 78 79 WGL_NO_RESET_NOTIFICATION_ARB 0x8261 80 WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 81 82Additions to the OpenGL / GLX / GLX Protocol Specificaitons 83 84 None. This specification is written for WGL. 85 86Additions to the WGL specification 87 88 This extension modifies language specified in the 89 WGL_ARB_create_context and WGL_ARB_create_context_profile 90 extensions. 91 92 In the description of wglCreateContextAttribsARB, insert a new 93 paragraph before the paragraph "The default value of 94 WGL_CONTEXT_FLAGS_ARB is 0.": 95 96 "If the WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB bit is set in 97 WGL_CONTEXT_FLAGS_ARB, then a context supporting <robust buffer 98 access> will be created. Robust buffer access is defined in the 99 GL_ARB_robustness extension specification, and the resulting context 100 must also support either the GL_ARB_robustness extension, or a 101 version of OpenGL incorporating equivalent functionality." 102 103 Add a new paragraph to the description of 104 wglCreateContextAttribsARB: 105 106 "The attribute name WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 107 specifies the <reset notification behavior> of the rendering 108 context. Reset notification behavior is defined in the 109 GL_ARB_robustness extension specification, and the resulting context 110 must also support either the GL_ARB_robustness extension, or a 111 version of OpenGL incorporating equivalent functionality. The 112 attribute value may be either WGL_NO_RESET_NOTIFICATION_ARB or 113 WGL_LOSE_CONTEXT_ON_RESET_ARB, which respectively result in reset 114 notification behavior of GL_NO_RESET_NOTIFICATION_ARB and 115 GL_LOSE_CONTEXT_ON_RESET_ARB, as described by GL_ARB_robustness. The 116 default value for WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB is 117 WGL_NO_RESET_NOTIFICATION_ARB." 118 119 Add "robust buffer access flag" and "reset notification behavior" to 120 the list of possible context creation errors resulting in a 121 ERROR_INVALID_PIXEL_FORMAT error in this sentence: 122 123 "* If the pixel format associated with <hDC> does not support OpenGL 124 contexts providing the requested API major and minor version, 125 forward-compatible flag, and/or debug context flag, then 126 ERROR_INVALID_PIXEL_FORMAT is generated." 127 128 Add a new context creation error to wglCreateContextAttribsARB: 129 130 "* If the reset notification behavior of <hShareContext> and the 131 newly created context are different, then 132 ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB is generated." 133 134 Add to the description of wglShareLists: 135 136 "If the reset notification behavior of <hglrc1> and <hglrc2> are 137 different, then wglShareLists will return FALSE, and GetLastError 138 will return ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB." 139 140Dependencies on WGL_ARB_extensions_string 141 142 Because there is no way to extend WGL, these calls are defined in 143 the ICD and can be called by obtaining the address with 144 wglGetProcAddress. Because this extension is a WGL extension, it is 145 not included in the GL_EXTENSIONS string. Its existence can be 146 determined with the WGL_ARB_extensions_string extension. 147 148Errors 149 150 ERROR_INVALID_PIXEL_FORMAT is generated if 151 WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB is set in attribute 152 WGL_CONTEXT_FLAGS_ARB, and no GL context supporting the 153 GL_ARB_robustness extension with robust buffer access enabled 154 exists. 155 156 ERROR_INVALID_PIXEL_FORMAT is generated if no GL context supporting 157 the GL_ARB_robustness extension with the specified reset 158 notification behavior (the value of attribute 159 WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB) can be created. 160 161 ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB is generated by 162 wglCreateContextAttribsARB if the reset notification behavior of 163 <hShareContext> does not match the reset notification behavior of 164 the context being created. 165 166 ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB is generated by wglShareLists 167 if the reset notification behavior of <hglrc1> and <hglrc2> are 168 different. 169 170New State 171 172 None 173 174New Implementation Dependent State 175 176 None 177 178Conformance Tests 179 180 TBD 181 182Sample Code 183 184 TBD 185 186Issues 187 188 1) Should there be a discovery mechanism for GL contexts supported by 189 the implementation? 190 191 UNRESOLVED. As we add more and more versions, profiles, and context 192 flags, the number of possible types of contexts is growing rapidly. 193 Some discovery mechanism may be useful, but simply enumerating all 194 the possible contexts is probably impractica. 195 196 2) How can applications query if a context supports robust buffer 197 access? 198 199 UNRESOLVED. See the matching issue in GL_ARB_robustness. 200 201Revision History 202 203 Version 3, 2010/07/22 - Assign enums for new tokens (shared with GLX and 204 GL robustness extensions). 205 206 Version 2, 2010/07/21 - Move reset notification behavior from a GL 207 toggle to a context creation parameter. Disallow sharing contexts 208 with different reset notification behaviors. Rename extension, since 209 it's no longer only about robust buffer access. 210 211 Version 1, 2010/06/06 - Initial version. 212