Name WGL_EXT_create_context_es2_profile Name Strings WGL_EXT_create_context_es2_profile Contact Jon Leech (jon 'at' alumni.caltech.edu) Piers Daniell (pdaniell 'at' nvidia.com) IP Status No known IP claims. Status Complete. Version Version 1, May 18, 2010 Number ??? Dependencies WGL_ARB_extensions_string is required. WGL_ARB_create_context is required. WGL_ARB_create_context_profile is required. An OpenGL ES 2.0 implementation is required. Overview This extension allows creating an OpenGL ES 2.0 context. New Procedures and Functions None New Tokens Accepted as a bit in the attribute value for WGL_CONTEXT_PROFILE_MASK_ARB in <*attribList>: WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004 Additions to the OpenGL / GLX / GLX Protocol Specificaitons None. This specification is written for WGL. Additions to the WGL specification This extension modifies language specified in the WGL_ARB_create_context and WGL_ARB_create_context_profile extensions. In the description of wglCreateContextAttribsARB, replace the sentence "... If a version less than or equal to 3.0 is requested, the context returned may implement any of the following versions:" with "... If the version requested is 2.0, and the WGL_CONTEXT_ES2_PROFILE_BIT_EXT bit is set in the WGL_CONTEXT_PROFILE_MASK_ARB attribute (see below), then the context returned will implement OpenGL ES 2.0. This is the only way in which an implementation may request an OpenGL ES 2.0 context. Otherwise, if a version less than or equal to 3.0 is requested, the context returned may implement any of the following versions:" Replace the sentence "... If the requested OpenGL version is less than 3.2, WGL_CONTEXT_PROFILE_MASK_ARB is ignored and the functionality of the context is determined solely by the requested version." with "... If the WGL_CONTEXT_ES2_PROFILE_BIT_EXT bit is set, and the requested version is 2.0, then a context implementing OpenGL ES 2.0 is returned; otherwise, if the requested OpenGL version is less than 3.2, WGL_CONTEXT_PROFILE_MASK_ARB is ignored and the functionality of the context is determined solely by the requested version." Add prior to the sentence "The attribute name WGL_CONTEXT_FLAGS_ARB specifies a set of flag bits affecting the rendering context.": "If the OpenGL ES 2.0 profile is requested, then the context returned cannot implement additional functionality, including functionality defined only by the core or compatibility profiles, unless such functionality is defined by extensions that are themselves specified relative to OpenGL ES 2.0[*]. [*] Such functionality should have a corresponding extension specification in the OpenGL ES Registry. In some implementations, vendor extensions defined relative to OpenGL ES 2.0, but not yet added to the OpenGL ES Registry, may also be supported." Replace the bullet point starting "* If attribute WGL_CONTEXT_PROFILE_MASK_ARB has no bits set;..." with "* If attribute WGL_CONTEXT_PROFILE_MASK_ARB has no bits set; has any bits set other than WGL_CONTEXT_CORE_PROFILE_BIT_ARB, WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB, or WGL_CONTEXT_ES2_PROFILE_BIT_EXT; has more than one of these bits set; or if the implementation does not supported the requested profile, then ERROR_INVALID_PROFILE_ARB is generated." Dependencies on WGL_ARB_extensions_string Because there is no way to extend WGL, these calls are defined in the ICD and can be called by obtaining the address with wglGetProcAddress. Because this extension is a WGL extension, it is not included in the GL_EXTENSIONS string. Its existence can be determined with the WGL_ARB_extensions_string extension. Errors ERROR_INVALID_PROFILE_ARB is generated is GLX_CONTEXT_PROFILE_MASK_ARB contains more than a single valid profile bit. New State None New Implementation Dependent State None Conformance Tests TBD Sample Code TBD Issues 1) How is an OpenGL ES 2.0 "profile" defined in a desktop OpenGL implementation? OpenGL ES 2.0 is essentially a stripped-down version of OpenGL 2.0 with a few added features, so it is natural to consider it a profile of OpenGL 2.0. This is potentially confusing, in that the API profile mechanism was not introduced until OpenGL 3.2. However, the extended context creation mechanism operates outside the scope of a GL context, and we can define the meaning of "version 2.0, profile ES2" to be an OpenGL ES 2.0 context. 2) May an OpenGL ES 2.0 "profile" include OpenGL functionality introduced by OpenGL 2.1 and later versions? PROPOSED: NO, except in the form of extensions that are themselves defined relative to OpenGL ES 2.0. This restriction is intended to make it difficult to create ill-defined conglomerations of OpenGL ES and OpenGL features and to eliminate subjective interpretations of what it means to subset a GL extension for implementation against OpenGL ES. If features specific to OpenGL ES 2.0 are required together with features from recent versions of OpenGL, a different mechanism, such as an OpenGL extension defining those OpenGL ES 2.0 features, may be appropriate. 3) Is implementation of an OpenGL ES 2.0 profile mandatory for a desktop OpenGL implementation? RESOLVED: NO. The ARB considered making support for an ES 2.0 profile mandatory for an OpenGL 4.1 implementation, but decided against it. Most ARB members would prefer that people use EGL to access OpenGL ES 2.0, whether on the desktop or on mobile devices. Revision History Version 1, 2010/05/18 - Recast the OpenGL ES 2.0 "profile" mechanism into a separate EXT layered on the ARB profiled context creation mechanism.