102f4aeb0Sopenharmony_ciName 202f4aeb0Sopenharmony_ci 302f4aeb0Sopenharmony_ci KHR_surfaceless_context 402f4aeb0Sopenharmony_ci 502f4aeb0Sopenharmony_ciName Strings 602f4aeb0Sopenharmony_ci 702f4aeb0Sopenharmony_ci EGL_KHR_surfaceless_context 802f4aeb0Sopenharmony_ci 902f4aeb0Sopenharmony_ciContributors 1002f4aeb0Sopenharmony_ci 1102f4aeb0Sopenharmony_ci Acorn Pooley 1202f4aeb0Sopenharmony_ci Jon Leech 1302f4aeb0Sopenharmony_ci Kristian Hoegsberg 1402f4aeb0Sopenharmony_ci Steven Holte 1502f4aeb0Sopenharmony_ci 1602f4aeb0Sopenharmony_ciContact 1702f4aeb0Sopenharmony_ci 1802f4aeb0Sopenharmony_ci Acorn Pooley: apooley at nvidia dot com 1902f4aeb0Sopenharmony_ci 2002f4aeb0Sopenharmony_ciNotice 2102f4aeb0Sopenharmony_ci 2202f4aeb0Sopenharmony_ci Copyright (c) 2010-2013 The Khronos Group Inc. Copyright terms at 2302f4aeb0Sopenharmony_ci http://www.khronos.org/registry/speccopyright.html 2402f4aeb0Sopenharmony_ci 2502f4aeb0Sopenharmony_ciStatus 2602f4aeb0Sopenharmony_ci 2702f4aeb0Sopenharmony_ci Complete. 2802f4aeb0Sopenharmony_ci Approved by the EGL Working Group on June 6, 2012. 2902f4aeb0Sopenharmony_ci Approved by the Khronos Board of Promoters on July 27, 2012. 3002f4aeb0Sopenharmony_ci 3102f4aeb0Sopenharmony_ciVersion 3202f4aeb0Sopenharmony_ci 3302f4aeb0Sopenharmony_ci Version 4, 2012/05/03 3402f4aeb0Sopenharmony_ci 3502f4aeb0Sopenharmony_ciNumber 3602f4aeb0Sopenharmony_ci 3702f4aeb0Sopenharmony_ci EGL Extension #40 3802f4aeb0Sopenharmony_ci 3902f4aeb0Sopenharmony_ciDependencies 4002f4aeb0Sopenharmony_ci 4102f4aeb0Sopenharmony_ci EGL 1.0 is required. 4202f4aeb0Sopenharmony_ci 4302f4aeb0Sopenharmony_ci The functionality of this extension is not supported by client OpenGL ES 4402f4aeb0Sopenharmony_ci contexts unless the GL_OES_surfaceless_context extension is supported by 4502f4aeb0Sopenharmony_ci those contexts. 4602f4aeb0Sopenharmony_ci 4702f4aeb0Sopenharmony_ci Written against wording of EGL 1.4 specification. 4802f4aeb0Sopenharmony_ci 4902f4aeb0Sopenharmony_ciOverview 5002f4aeb0Sopenharmony_ci 5102f4aeb0Sopenharmony_ci These extensions allows an application to make a context current by 5202f4aeb0Sopenharmony_ci passing EGL_NO_SURFACE for the write and read surface in the 5302f4aeb0Sopenharmony_ci call to eglMakeCurrent. The motivation is that applications that only 5402f4aeb0Sopenharmony_ci want to render to client API targets (such as OpenGL framebuffer 5502f4aeb0Sopenharmony_ci objects) should not need to create a throw-away EGL surface just to get 5602f4aeb0Sopenharmony_ci a current context. 5702f4aeb0Sopenharmony_ci 5802f4aeb0Sopenharmony_ci The state of an OpenGL ES context with no default framebuffer provided 5902f4aeb0Sopenharmony_ci by EGL is the same as a context with an incomplete framebuffer object 6002f4aeb0Sopenharmony_ci bound. 6102f4aeb0Sopenharmony_ci 6202f4aeb0Sopenharmony_ciNew Procedures and Functions 6302f4aeb0Sopenharmony_ci 6402f4aeb0Sopenharmony_ci None 6502f4aeb0Sopenharmony_ci 6602f4aeb0Sopenharmony_ciNew Tokens 6702f4aeb0Sopenharmony_ci 6802f4aeb0Sopenharmony_ci None 6902f4aeb0Sopenharmony_ci 7002f4aeb0Sopenharmony_ciAdditions to the EGL Specification section "3.7.3 Binding Contexts and 7102f4aeb0Sopenharmony_ciDrawables" 7202f4aeb0Sopenharmony_ci 7302f4aeb0Sopenharmony_ci Replace the following two error conditions in the 7402f4aeb0Sopenharmony_ci list of eglMakeCurrent errors: 7502f4aeb0Sopenharmony_ci 7602f4aeb0Sopenharmony_ci " * If <ctx> is not a valid context, an EGL_BAD_CONTEXT error is 7702f4aeb0Sopenharmony_ci generated. 7802f4aeb0Sopenharmony_ci * If either <draw> or <read> are not valid EGL surfaces, an 7902f4aeb0Sopenharmony_ci EGL_BAD_SURFACE error is generated." 8002f4aeb0Sopenharmony_ci 8102f4aeb0Sopenharmony_ci with the following error conditions: 8202f4aeb0Sopenharmony_ci 8302f4aeb0Sopenharmony_ci " * If <ctx> is not a valid context and is not EGL_NO_CONTEXT, an 8402f4aeb0Sopenharmony_ci EGL_BAD_CONTEXT error is generated. 8502f4aeb0Sopenharmony_ci * If either <draw> or <read> are not valid EGL surfaces and are 8602f4aeb0Sopenharmony_ci not EGL_NO_SURFACE, an EGL_BAD_SURFACE error is generated. 8702f4aeb0Sopenharmony_ci * If <ctx> is EGL_NO_CONTEXT and either <draw> or <read> are not 8802f4aeb0Sopenharmony_ci EGL_NO_SURFACE, an EGL_BAD_MATCH error is generated. 8902f4aeb0Sopenharmony_ci * If either of <draw> or <read> is a valid surface and the other 9002f4aeb0Sopenharmony_ci is EGL_NO_SURFACE, an EGL_BAD_MATCH error is generated. 9102f4aeb0Sopenharmony_ci * If <ctx> does not support being bound without read and draw 9202f4aeb0Sopenharmony_ci surfaces, and both <draw> and <read> are EGL_NO_SURFACE, an 9302f4aeb0Sopenharmony_ci EGL_BAD_MATCH error is generated." 9402f4aeb0Sopenharmony_ci 9502f4aeb0Sopenharmony_ci Replace the paragraph starting "If <ctx> is EGL_NO_CONTEXT and 9602f4aeb0Sopenharmony_ci <draw> and <read> are not EGL_NO_SURFACE..." with 9702f4aeb0Sopenharmony_ci 9802f4aeb0Sopenharmony_ci "If both <draw> and <read> are EGL_NO_SURFACE, and <ctx> is a context 9902f4aeb0Sopenharmony_ci which supports being bound without read and draw surfaces, then no error 10002f4aeb0Sopenharmony_ci is generated and the context is made current without a 10102f4aeb0Sopenharmony_ci <default framebuffer>. The meaning of this is defined by the API of the 10202f4aeb0Sopenharmony_ci supporting context. (See chapter 4 of the OpenGL 3.0 Specification, and 10302f4aeb0Sopenharmony_ci the GL_OES_surfaceless_context OpenGL ES extension.)" 10402f4aeb0Sopenharmony_ci 10502f4aeb0Sopenharmony_ci Append to the paragraph starting "The first time an OpenGL or OpenGL 10602f4aeb0Sopenharmony_ci ES context is made current..." with 10702f4aeb0Sopenharmony_ci 10802f4aeb0Sopenharmony_ci "If the first time <ctx> is made current, it is without a default 10902f4aeb0Sopenharmony_ci framebuffer (e.g. both <draw> and <read> are EGL_NO_SURFACE), then 11002f4aeb0Sopenharmony_ci the viewport and scissor regions are set as though 11102f4aeb0Sopenharmony_ci glViewport(0,0,0,0) and glScissor(0,0,0,0) were called." 11202f4aeb0Sopenharmony_ci 11302f4aeb0Sopenharmony_ciInteractions with other extensions 11402f4aeb0Sopenharmony_ci 11502f4aeb0Sopenharmony_ci The semantics of having a current context with no surface for OpenGL ES 11602f4aeb0Sopenharmony_ci 1.x and OpenGL ES 2.x are specified by the GL_OES_surfaceless_context 11702f4aeb0Sopenharmony_ci extension. 11802f4aeb0Sopenharmony_ci 11902f4aeb0Sopenharmony_ciIssues 12002f4aeb0Sopenharmony_ci 12102f4aeb0Sopenharmony_ci 1) Do we need a mechanism to indicate which contexts may be bound with 12202f4aeb0Sopenharmony_ci <read> and <draw> set to NULL? Or is it ok to require that if this 12302f4aeb0Sopenharmony_ci extension is supported then any context of the particular API may be 12402f4aeb0Sopenharmony_ci made current with no surfaces? 12502f4aeb0Sopenharmony_ci 12602f4aeb0Sopenharmony_ci RESOLVED. Because multiple API implementations may be available as 12702f4aeb0Sopenharmony_ci contexts we cannot guarantee that all OpenGL ES 1.x or OpenGL ES 2.x 12802f4aeb0Sopenharmony_ci contexts will support GL_OES_surfaceless_context. If the user attempts 12902f4aeb0Sopenharmony_ci to call eglMakeCurrent with EGL_NO_SURFACE on a context which does not 13002f4aeb0Sopenharmony_ci support it, this simply results in EGL_BAD_MATCH. 13102f4aeb0Sopenharmony_ci 13202f4aeb0Sopenharmony_ci 2) Do we need to include all of the relevant "default framebuffer" language 13302f4aeb0Sopenharmony_ci from the OpenGL specification to properly specify OpenGL ES behavior 13402f4aeb0Sopenharmony_ci with no default framebuffer bound? 13502f4aeb0Sopenharmony_ci 13602f4aeb0Sopenharmony_ci RESOLVED. Yes, the behaviour of the GLES contexts when no default 13702f4aeb0Sopenharmony_ci framebuffer is associated with the context has been moved to the OpenGL 13802f4aeb0Sopenharmony_ci ES extension OES_surfaceless_context. 13902f4aeb0Sopenharmony_ci 14002f4aeb0Sopenharmony_ci 3) Since these EGL extensions also modify OpenGL ES behavior and introduce 14102f4aeb0Sopenharmony_ci a new error condition, do we want corresponding OpenGL ES extension 14202f4aeb0Sopenharmony_ci strings as well? 14302f4aeb0Sopenharmony_ci 14402f4aeb0Sopenharmony_ci RESOLVED. Yes, see GL_OES_surfaceless_context extension. 14502f4aeb0Sopenharmony_ci 14602f4aeb0Sopenharmony_ci 4) How does this document interact with EGL_KHR_create_context and OpenGL 14702f4aeb0Sopenharmony_ci contexts? 14802f4aeb0Sopenharmony_ci 14902f4aeb0Sopenharmony_ci RESOLVED. Some language defining the error conditions of eglMakeCurrent 15002f4aeb0Sopenharmony_ci have been imported from the draft specification of EGL_KHR_create_context 15102f4aeb0Sopenharmony_ci and the definitions of the behaviour of the GLES contexts without a 15202f4aeb0Sopenharmony_ci default framebuffer have been moved to GL_OES_surfaceless_context. Any 15302f4aeb0Sopenharmony_ci further interactions are left to the create_context extension to define 15402f4aeb0Sopenharmony_ci when it is completed. 15502f4aeb0Sopenharmony_ci 15602f4aeb0Sopenharmony_ciRevision History 15702f4aeb0Sopenharmony_ci 15802f4aeb0Sopenharmony_ci Version 5, 2014/01/07 (Jon Leech) - Correct references to 15902f4aeb0Sopenharmony_ci EXT_surfaceless_context with GL_OES_surfaceless_context. 16002f4aeb0Sopenharmony_ci 16102f4aeb0Sopenharmony_ci Version 4, 2012/02/27 (Steven Holte) - Add language for error conditions 16202f4aeb0Sopenharmony_ci from EGL_KHR_create_context, and resolutions of issues. Combined API 16302f4aeb0Sopenharmony_ci specific extensions into a single extension. 16402f4aeb0Sopenharmony_ci 16502f4aeb0Sopenharmony_ci Version 3, 2010/08/19 (Kristian Hoegsberg) - Move default framebuffer 16602f4aeb0Sopenharmony_ci language to new GLES extension (GL_OES_surfaceless_context) and make 16702f4aeb0Sopenharmony_ci this extension depend on that. 16802f4aeb0Sopenharmony_ci 16902f4aeb0Sopenharmony_ci Version 2, 2010/08/03 (Jon Leech) - add default framebuffer language to 17002f4aeb0Sopenharmony_ci the OpenGL ES Specifications, including changes to initial GL state and 17102f4aeb0Sopenharmony_ci the FRAMEBUFFER_UNDEFINED incompleteness status when no default 17202f4aeb0Sopenharmony_ci framebuffer is bound. 17302f4aeb0Sopenharmony_ci 17402f4aeb0Sopenharmony_ci Version 1, 2010/07/09 (Acorn Pooley) - Initial draft. 175