102f4aeb0Sopenharmony_ciName 202f4aeb0Sopenharmony_ci 302f4aeb0Sopenharmony_ci KHR_gl_texture_2D_image 402f4aeb0Sopenharmony_ci KHR_gl_texture_cubemap_image 502f4aeb0Sopenharmony_ci KHR_gl_texture_3D_image 602f4aeb0Sopenharmony_ci KHR_gl_renderbuffer_image 702f4aeb0Sopenharmony_ci 802f4aeb0Sopenharmony_ciName Strings 902f4aeb0Sopenharmony_ci 1002f4aeb0Sopenharmony_ci EGL_KHR_gl_texture_2D_image 1102f4aeb0Sopenharmony_ci EGL_KHR_gl_texture_cubemap_image 1202f4aeb0Sopenharmony_ci EGL_KHR_gl_texture_3D_image 1302f4aeb0Sopenharmony_ci EGL_KHR_gl_renderbuffer_image 1402f4aeb0Sopenharmony_ci 1502f4aeb0Sopenharmony_ciContributors 1602f4aeb0Sopenharmony_ci 1702f4aeb0Sopenharmony_ci Aaftab Munshi 1802f4aeb0Sopenharmony_ci Barthold Lichtenbelt 1902f4aeb0Sopenharmony_ci Gary King 2002f4aeb0Sopenharmony_ci Jeff Juliano 2102f4aeb0Sopenharmony_ci Jon Leech 2202f4aeb0Sopenharmony_ci Jonathan Grant 2302f4aeb0Sopenharmony_ci Acorn Pooley 2402f4aeb0Sopenharmony_ci 2502f4aeb0Sopenharmony_ciContacts 2602f4aeb0Sopenharmony_ci 2702f4aeb0Sopenharmony_ci Gary King, NVIDIA Corporation (gking 'at' nvidia.com) 2802f4aeb0Sopenharmony_ci 2902f4aeb0Sopenharmony_ciNotice 3002f4aeb0Sopenharmony_ci 3102f4aeb0Sopenharmony_ci Copyright (c) 2006-2013 The Khronos Group Inc. Copyright terms at 3202f4aeb0Sopenharmony_ci http://www.khronos.org/registry/speccopyright.html 3302f4aeb0Sopenharmony_ci 3402f4aeb0Sopenharmony_ciStatus 3502f4aeb0Sopenharmony_ci 3602f4aeb0Sopenharmony_ci Complete. 3702f4aeb0Sopenharmony_ci Approved by the Khronos Board of Promoters on February 11, 2008. 3802f4aeb0Sopenharmony_ci 3902f4aeb0Sopenharmony_ciVersion 4002f4aeb0Sopenharmony_ci 4102f4aeb0Sopenharmony_ci Version 13, October 9, 2013 4202f4aeb0Sopenharmony_ci 4302f4aeb0Sopenharmony_ciNumber 4402f4aeb0Sopenharmony_ci 4502f4aeb0Sopenharmony_ci EGL Extension #5 4602f4aeb0Sopenharmony_ci 4702f4aeb0Sopenharmony_ciDependencies 4802f4aeb0Sopenharmony_ci 4902f4aeb0Sopenharmony_ci All extensions require EGL 1.2 and the EGL_KHR_image extension 5002f4aeb0Sopenharmony_ci 5102f4aeb0Sopenharmony_ci These extensions are written against the wording of the EGL 1.2 5202f4aeb0Sopenharmony_ci Specification. 5302f4aeb0Sopenharmony_ci 5402f4aeb0Sopenharmony_ci KHR_gl_texture_2D_image requires an OpenGL or OpenGL ES client API (any 5502f4aeb0Sopenharmony_ci version of either API). 5602f4aeb0Sopenharmony_ci 5702f4aeb0Sopenharmony_ci KHR_gl_texture_cubemap_image requires an OpenGL or OpenGL ES client API 5802f4aeb0Sopenharmony_ci supporting texture cube maps, either in the core API or via extensions. 5902f4aeb0Sopenharmony_ci 6002f4aeb0Sopenharmony_ci KHR_gl_texture_3D_image requires KHR_gl_texture_2D_image to be supported 6102f4aeb0Sopenharmony_ci by the EGL implementation. It also requires an OpenGL or OpenGL ES 6202f4aeb0Sopenharmony_ci client API supporting three-dimensional textures, either in the core API 6302f4aeb0Sopenharmony_ci or via extensions. 6402f4aeb0Sopenharmony_ci 6502f4aeb0Sopenharmony_ci KHR_gl_renderbuffer_image requires KHR_gl_texture_2D_image to be 6602f4aeb0Sopenharmony_ci supported by the EGL implementation. It also requires an OpenGL or 6702f4aeb0Sopenharmony_ci OpenGL ES client API supporting renderbuffers, either in the core API or 6802f4aeb0Sopenharmony_ci via extensions. 6902f4aeb0Sopenharmony_ci 7002f4aeb0Sopenharmony_ciOverview 7102f4aeb0Sopenharmony_ci 7202f4aeb0Sopenharmony_ci The extensions specified in this document provide a mechanism for 7302f4aeb0Sopenharmony_ci creating EGLImage objects from OpenGL and OpenGL ES (henceforth referred 7402f4aeb0Sopenharmony_ci to collectively as 'GL') API resources, including two- and three- 7502f4aeb0Sopenharmony_ci dimensional textures, cube maps and render buffers. For an overview of 7602f4aeb0Sopenharmony_ci EGLImage operation, please see the EGL_KHR_image specification. 7702f4aeb0Sopenharmony_ci 7802f4aeb0Sopenharmony_ci Due to the number of available extensions for the OpenGL ES 1.1 and 7902f4aeb0Sopenharmony_ci OpenGL ES 2.0 APIs, this document is organized as 4 separate extensions, 8002f4aeb0Sopenharmony_ci described collectively. These extensions are separated based on the 8102f4aeb0Sopenharmony_ci required underlying GL functionality (described in the dependencies 8202f4aeb0Sopenharmony_ci section). 8302f4aeb0Sopenharmony_ci 8402f4aeb0Sopenharmony_ciNew Types 8502f4aeb0Sopenharmony_ci 8602f4aeb0Sopenharmony_ci None 8702f4aeb0Sopenharmony_ci 8802f4aeb0Sopenharmony_ciNew Procedures and Functions 8902f4aeb0Sopenharmony_ci 9002f4aeb0Sopenharmony_ci None 9102f4aeb0Sopenharmony_ci 9202f4aeb0Sopenharmony_ciNew Tokens 9302f4aeb0Sopenharmony_ci 9402f4aeb0Sopenharmony_ci Accepted in the <target> parameter of eglCreateImageKHR: 9502f4aeb0Sopenharmony_ci 9602f4aeb0Sopenharmony_ci EGL_GL_TEXTURE_2D_KHR 0x30B1 9702f4aeb0Sopenharmony_ci 9802f4aeb0Sopenharmony_ci Accepted as an attribute in the <attr_list> parameter of 9902f4aeb0Sopenharmony_ci eglCreateImageKHR: 10002f4aeb0Sopenharmony_ci 10102f4aeb0Sopenharmony_ci EGL_GL_TEXTURE_LEVEL_KHR 0x30BC 10202f4aeb0Sopenharmony_ci 10302f4aeb0Sopenharmony_ci Added by KHR_gl_texture_cubemap_image: 10402f4aeb0Sopenharmony_ci 10502f4aeb0Sopenharmony_ci Accepted in the <target> parameter of eglCreateImageKHR: 10602f4aeb0Sopenharmony_ci 10702f4aeb0Sopenharmony_ci EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3 10802f4aeb0Sopenharmony_ci EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4 10902f4aeb0Sopenharmony_ci EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5 11002f4aeb0Sopenharmony_ci EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6 11102f4aeb0Sopenharmony_ci EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7 11202f4aeb0Sopenharmony_ci EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8 11302f4aeb0Sopenharmony_ci 11402f4aeb0Sopenharmony_ci Added by KHR_gl_texture_3D_image: 11502f4aeb0Sopenharmony_ci 11602f4aeb0Sopenharmony_ci Accepted in the <target> parameter of eglCreateImageKHR: 11702f4aeb0Sopenharmony_ci 11802f4aeb0Sopenharmony_ci EGL_GL_TEXTURE_3D_KHR 0x30B2 11902f4aeb0Sopenharmony_ci 12002f4aeb0Sopenharmony_ci Accepted as an attribute in the <attr_list> parameter of 12102f4aeb0Sopenharmony_ci eglCreateImageKHR: 12202f4aeb0Sopenharmony_ci 12302f4aeb0Sopenharmony_ci EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD 12402f4aeb0Sopenharmony_ci 12502f4aeb0Sopenharmony_ci Added by KHR_gl_renderbuffer_image: 12602f4aeb0Sopenharmony_ci 12702f4aeb0Sopenharmony_ci Accepted in the <target> parameter of eglCreateImageKHR: 12802f4aeb0Sopenharmony_ci 12902f4aeb0Sopenharmony_ci EGL_GL_RENDERBUFFER_KHR 0x30B9 13002f4aeb0Sopenharmony_ci 13102f4aeb0Sopenharmony_ci 13202f4aeb0Sopenharmony_ciAdditions to the EGL Image (EGL_KHR_image) Specification: 13302f4aeb0Sopenharmony_ci 13402f4aeb0Sopenharmony_ci Add the following to Table aaa (Legal values for eglCreateImageKHR 13502f4aeb0Sopenharmony_ci <target> parameter), Section 2.5.1 (EGLImage Specification) 13602f4aeb0Sopenharmony_ci 13702f4aeb0Sopenharmony_ci +-------------------------------------+---------------------------------+ 13802f4aeb0Sopenharmony_ci | <target> | Notes | 13902f4aeb0Sopenharmony_ci +-------------------------------------+---------------------------------+ 14002f4aeb0Sopenharmony_ci | EGL_GL_TEXTURE_2D_KHR | Used for GL 2D texture images | 14102f4aeb0Sopenharmony_ci +-------------------------------------+---------------------------------+ 14202f4aeb0Sopenharmony_ci 14302f4aeb0Sopenharmony_ci If KHR_gl_texture_cubemap_image is supported: 14402f4aeb0Sopenharmony_ci 14502f4aeb0Sopenharmony_ci +-----------------------------------------+-----------------------------+ 14602f4aeb0Sopenharmony_ci | <target> | Notes | 14702f4aeb0Sopenharmony_ci +-----------------------------------------+-----------------------------+ 14802f4aeb0Sopenharmony_ci | EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR | Used for the +X face of | 14902f4aeb0Sopenharmony_ci | | GL cubemap texture images | 15002f4aeb0Sopenharmony_ci +-----------------------------------------+-----------------------------+ 15102f4aeb0Sopenharmony_ci | EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR | Used for the -X face of | 15202f4aeb0Sopenharmony_ci | | GL cubemap texture images | 15302f4aeb0Sopenharmony_ci +-----------------------------------------+-----------------------------+ 15402f4aeb0Sopenharmony_ci | EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR | Used for the +Y face of | 15502f4aeb0Sopenharmony_ci | | GL cubemap texture images | 15602f4aeb0Sopenharmony_ci +-----------------------------------------+-----------------------------+ 15702f4aeb0Sopenharmony_ci | EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR | Used for the -Y face of | 15802f4aeb0Sopenharmony_ci | | GL cubemap texture images | 15902f4aeb0Sopenharmony_ci +-----------------------------------------+-----------------------------+ 16002f4aeb0Sopenharmony_ci | EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR | Used for the +Z face of | 16102f4aeb0Sopenharmony_ci | | GL cubemap texture images | 16202f4aeb0Sopenharmony_ci +-----------------------------------------+-----------------------------+ 16302f4aeb0Sopenharmony_ci | EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR | Used for the -Z face of | 16402f4aeb0Sopenharmony_ci | | GL cubemap texture images | 16502f4aeb0Sopenharmony_ci +-----------------------------------------+-----------------------------+ 16602f4aeb0Sopenharmony_ci 16702f4aeb0Sopenharmony_ci If KHR_gl_texture_3D_image is supported: 16802f4aeb0Sopenharmony_ci 16902f4aeb0Sopenharmony_ci +-------------------------------------+---------------------------------+ 17002f4aeb0Sopenharmony_ci | <target> | Notes | 17102f4aeb0Sopenharmony_ci +-------------------------------------+---------------------------------+ 17202f4aeb0Sopenharmony_ci | EGL_GL_TEXTURE_3D_KHR | Used for GL 3D texture images | 17302f4aeb0Sopenharmony_ci +-------------------------------------+---------------------------------+ 17402f4aeb0Sopenharmony_ci 17502f4aeb0Sopenharmony_ci If KHR_gl_renderbuffer_image is supported: 17602f4aeb0Sopenharmony_ci 17702f4aeb0Sopenharmony_ci +-------------------------------------+---------------------------------+ 17802f4aeb0Sopenharmony_ci | <target> | Notes | 17902f4aeb0Sopenharmony_ci +-------------------------------------+---------------------------------+ 18002f4aeb0Sopenharmony_ci | EGL_GL_RENDERBUFFER_KHR | Used for GL renderbuffer images| 18102f4aeb0Sopenharmony_ci +-------------------------------------+---------------------------------+ 18202f4aeb0Sopenharmony_ci 18302f4aeb0Sopenharmony_ci Add the following to Table bbb (Legal attributes for eglCreateImageKHR 18402f4aeb0Sopenharmony_ci <attr_list> parameter), Section 2.5.1 (EGLImage Specification) 18502f4aeb0Sopenharmony_ci 18602f4aeb0Sopenharmony_ci +---------------------------+-------------------------------+----------------------------+---------+ 18702f4aeb0Sopenharmony_ci | | | Valid | Default | 18802f4aeb0Sopenharmony_ci | Attribute | Description | <target>s | Value | 18902f4aeb0Sopenharmony_ci +---------------------------+-------------------------------+----------------------------+---------+ 19002f4aeb0Sopenharmony_ci | EGL_GL_TEXTURE_LEVEL_KHR | Specifies the mipmap level | EGL_GL_TEXTURE_2D_KHR, | 0 | 19102f4aeb0Sopenharmony_ci | | used as the EGLImage source. | EGL_GL_TEXTURE_CUBE_MAP_*, | | 19202f4aeb0Sopenharmony_ci | | Must be part of the complete | EGL_GL_TEXTURE_3D_KHR | | 19302f4aeb0Sopenharmony_ci | | texture object <buffer> | | | 19402f4aeb0Sopenharmony_ci +---------------------------+-------------------------------+----------------------------+---------+ 19502f4aeb0Sopenharmony_ci 19602f4aeb0Sopenharmony_ci If KHR_gl_texture_3D_image is supported: 19702f4aeb0Sopenharmony_ci 19802f4aeb0Sopenharmony_ci +----------------------------+------------------------------+----------------------------+---------+ 19902f4aeb0Sopenharmony_ci | | | Valid | Default | 20002f4aeb0Sopenharmony_ci | Attribute | Description | <target>s | Value | 20102f4aeb0Sopenharmony_ci +----------------------------+------------------------------+----------------------------+---------+ 20202f4aeb0Sopenharmony_ci | EGL_GL_TEXTURE_ZOFFSET_KHR | Specifies the depth offset | EGL_GL_TEXTURE_3D_KHR | 0 | 20302f4aeb0Sopenharmony_ci | | of the image to use as the | | | 20402f4aeb0Sopenharmony_ci | | EGLImage source. Must be | | | 20502f4aeb0Sopenharmony_ci | | part of the complete texture| | | 20602f4aeb0Sopenharmony_ci | | object <buffer> | | | 20702f4aeb0Sopenharmony_ci +----------------------------+------------------------------+----------------------------+---------+ 20802f4aeb0Sopenharmony_ci 20902f4aeb0Sopenharmony_ci 21002f4aeb0Sopenharmony_ci Insert the following text after paragraph 3 ("If <target> is 21102f4aeb0Sopenharmony_ci NATIVE_PIXMAP_KHR...") of Section 2.5.1 (EGLImage Specification) 21202f4aeb0Sopenharmony_ci 21302f4aeb0Sopenharmony_ci "If <target> is EGL_GL_TEXTURE_2D_KHR, EGL_GL_TEXTURE_3D_KHR, 21402f4aeb0Sopenharmony_ci EGL_GL_RENDERBUFFER_KHR, 21502f4aeb0Sopenharmony_ci EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR, 21602f4aeb0Sopenharmony_ci EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR, 21702f4aeb0Sopenharmony_ci EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR, 21802f4aeb0Sopenharmony_ci EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR, 21902f4aeb0Sopenharmony_ci EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR, or 22002f4aeb0Sopenharmony_ci EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR, 22102f4aeb0Sopenharmony_ci <dpy> must be a valid EGLDisplay, 22202f4aeb0Sopenharmony_ci and <ctx> must be a valid GL API context on that display. 22302f4aeb0Sopenharmony_ci 22402f4aeb0Sopenharmony_ci If <target> is EGL_GL_TEXTURE_2D_KHR, <buffer> must be the name of a 22502f4aeb0Sopenharmony_ci nonzero, GL_TEXTURE_2D target texture object, cast into 22602f4aeb0Sopenharmony_ci the type EGLClientBuffer. <attr_list> should specify the mipmap level 22702f4aeb0Sopenharmony_ci which will be used as the EGLImage source (EGL_GL_TEXTURE_LEVEL_KHR); the 22802f4aeb0Sopenharmony_ci specified mipmap level must be part of <buffer>. If not specified, the 22902f4aeb0Sopenharmony_ci default value listed in Table bbb will be used, instead. Additional 23002f4aeb0Sopenharmony_ci values specified in <attr_list> are ignored. The texture must be complete 23102f4aeb0Sopenharmony_ci unless the mipmap level to be used is 0, the texture has mipmap level 0 23202f4aeb0Sopenharmony_ci specified, and no other mipmap levels are specified. 23302f4aeb0Sopenharmony_ci 23402f4aeb0Sopenharmony_ci If <target> is one of the EGL_GL_TEXTURE_CUBE_MAP_* enumerants, <buffer> 23502f4aeb0Sopenharmony_ci must be the name of a cube-complete, nonzero, GL_TEXTURE_CUBE_MAP (or 23602f4aeb0Sopenharmony_ci equivalent in GL extensions) target texture object, cast into the type 23702f4aeb0Sopenharmony_ci EGLClientBuffer. <attr_list> should specify the mipmap level which will 23802f4aeb0Sopenharmony_ci be used as the EGLImage source (EGL_GL_TEXTURE_LEVEL_KHR); the specified 23902f4aeb0Sopenharmony_ci mipmap level must be part of <buffer>. If not specified, the default 24002f4aeb0Sopenharmony_ci value listed in Table bbb will be used, instead. Additional values 24102f4aeb0Sopenharmony_ci specified in <attr_list> are ignored. The texture must be cube-complete 24202f4aeb0Sopenharmony_ci unless the mipmap level to be used is 0, the texture has mipmap level 0 24302f4aeb0Sopenharmony_ci specified for all faces, and no other mipmap levels are specified for any 24402f4aeb0Sopenharmony_ci faces. 24502f4aeb0Sopenharmony_ci 24602f4aeb0Sopenharmony_ci If <target> is EGL_GL_TEXTURE_3D_KHR, <buffer> must be the name of a 24702f4aeb0Sopenharmony_ci complete, nonzero, GL_TEXTURE_3D (or equivalent in GL extensions) target 24802f4aeb0Sopenharmony_ci texture object, cast 24902f4aeb0Sopenharmony_ci into the type EGLClientBuffer. <attr_list> should specify the mipmap 25002f4aeb0Sopenharmony_ci level (EGL_GL_TEXTURE_LEVEL_KHR) and z-offset (EGL_GL_TEXTURE_ZOFFSET_KHR) 25102f4aeb0Sopenharmony_ci which will be used as the EGLImage source; the specified mipmap level must 25202f4aeb0Sopenharmony_ci be part of <buffer>, and the specified z-offset must be smaller than the 25302f4aeb0Sopenharmony_ci depth of the specified mipmap level. If a value is not specified, the 25402f4aeb0Sopenharmony_ci default value listed in Table bbb will be used, instead. Additional 25502f4aeb0Sopenharmony_ci values specified in <attr_list> are ignored. The texture must be 25602f4aeb0Sopenharmony_ci complete unless the mipmap level to be used is 0, the texture has mipmap 25702f4aeb0Sopenharmony_ci level 0 specified, and no other mipmap levels are specified. 25802f4aeb0Sopenharmony_ci 25902f4aeb0Sopenharmony_ci If <target> is EGL_GL_RENDERBUFFER_KHR, <buffer> must be the name of a 26002f4aeb0Sopenharmony_ci complete, nonzero, non-multisampled GL_RENDERBUFFER (or equivalent in 26102f4aeb0Sopenharmony_ci extensions) target object, cast into the type EGLClientBuffer. Values 26202f4aeb0Sopenharmony_ci specified in <attr_list> are ignored." 26302f4aeb0Sopenharmony_ci 26402f4aeb0Sopenharmony_ci Add the following errors to the end of the list in Section 2.5.1 (EGLImage 26502f4aeb0Sopenharmony_ci Specification): 26602f4aeb0Sopenharmony_ci 26702f4aeb0Sopenharmony_ci " * If <target> is EGL_GL_TEXTURE_2D_KHR, EGL_GL_TEXTURE_CUBE_MAP_*_KHR, 26802f4aeb0Sopenharmony_ci EGL_GL_RENDERBUFFER_KHR or EGL_GL_TEXTURE_3D_KHR, and <dpy> is not a 26902f4aeb0Sopenharmony_ci valid EGLDisplay, the error EGL_BAD_DISPLAY is generated. 27002f4aeb0Sopenharmony_ci 27102f4aeb0Sopenharmony_ci * If <target> is EGL_GL_TEXTURE_2D_KHR, EGL_GL_TEXTURE_CUBE_MAP_*_KHR, 27202f4aeb0Sopenharmony_ci EGL_GL_RENDERBUFFER_KHR or EGL_GL_TEXTURE_3D_KHR, and <ctx> is not a 27302f4aeb0Sopenharmony_ci valid EGLContext, the error EGL_BAD_CONTEXT is generated. 27402f4aeb0Sopenharmony_ci 27502f4aeb0Sopenharmony_ci * If <target> is EGL_GL_TEXTURE_2D_KHR, EGL_GL_TEXTURE_CUBE_MAP_*_KHR, 27602f4aeb0Sopenharmony_ci EGL_GL_RENDERBUFFER_KHR or EGL_GL_TEXTURE_3D_KHR, and <ctx> is not a 27702f4aeb0Sopenharmony_ci valid GL context, or does not match the <dpy>, the error 27802f4aeb0Sopenharmony_ci EGL_BAD_MATCH is generated. 27902f4aeb0Sopenharmony_ci 28002f4aeb0Sopenharmony_ci * If <target> is EGL_GL_TEXTURE_2D_KHR, EGL_GL_TEXTURE_CUBE_MAP_*_KHR 28102f4aeb0Sopenharmony_ci or EGL_GL_TEXTURE_3D_KHR and <buffer> is not the name of a 28202f4aeb0Sopenharmony_ci texture object of type <target>, the error EGL_BAD_PARAMETER 28302f4aeb0Sopenharmony_ci is generated. 28402f4aeb0Sopenharmony_ci 28502f4aeb0Sopenharmony_ci * If <target> is EGL_GL_RENDERBUFFER_KHR and <buffer> is not the 28602f4aeb0Sopenharmony_ci name of a renderbuffer object, or if <buffer> is the name of a 28702f4aeb0Sopenharmony_ci multisampled renderbuffer object, the error EGL_BAD_PARAMETER is 28802f4aeb0Sopenharmony_ci generated. 28902f4aeb0Sopenharmony_ci 29002f4aeb0Sopenharmony_ci * If EGL_GL_TEXTURE_LEVEL_KHR is nonzero, <target> is 29102f4aeb0Sopenharmony_ci EGL_GL_TEXTURE_2D_KHR, EGL_GL_TEXTURE_CUBE_MAP_*_KHR or 29202f4aeb0Sopenharmony_ci EGL_GL_TEXTURE_3D_KHR, and <buffer> is not the name of a complete 29302f4aeb0Sopenharmony_ci GL texture object, the error EGL_BAD_PARAMETER is generated. 29402f4aeb0Sopenharmony_ci 29502f4aeb0Sopenharmony_ci * If EGL_GL_TEXTURE_LEVEL_KHR is 0, <target> is 29602f4aeb0Sopenharmony_ci EGL_GL_TEXTURE_2D_KHR, EGL_GL_TEXTURE_CUBE_MAP_*_KHR or 29702f4aeb0Sopenharmony_ci EGL_GL_TEXTURE_3D_KHR, <buffer> is the name of an incomplete GL 29802f4aeb0Sopenharmony_ci texture object, and any mipmap levels other than mipmap level 0 29902f4aeb0Sopenharmony_ci are specified, the error EGL_BAD_PARAMETER is generated. 30002f4aeb0Sopenharmony_ci 30102f4aeb0Sopenharmony_ci * If EGL_GL_TEXTURE_LEVEL_KHR is 0, <target> is 30202f4aeb0Sopenharmony_ci EGL_GL_TEXTURE_2D_KHR or EGL_GL_TEXTURE_3D_KHR, <buffer> is not 30302f4aeb0Sopenharmony_ci the name of a complete GL texture object, and mipmap level 0 is 30402f4aeb0Sopenharmony_ci not specified, the error EGL_BAD_PARAMETER is generated. 30502f4aeb0Sopenharmony_ci 30602f4aeb0Sopenharmony_ci * If EGL_GL_TEXTURE_LEVEL_KHR is 0, <target> is 30702f4aeb0Sopenharmony_ci EGL_GL_TEXTURE_CUBE_MAP_*_KHR, <buffer> is not the name of a 30802f4aeb0Sopenharmony_ci complete GL texture object, and one or more faces do not have 30902f4aeb0Sopenharmony_ci mipmap level 0 specified, the error EGL_BAD_PARAMETER is 31002f4aeb0Sopenharmony_ci generated. 31102f4aeb0Sopenharmony_ci 31202f4aeb0Sopenharmony_ci * If <target> is EGL_GL_TEXTURE_2D_KHR, 31302f4aeb0Sopenharmony_ci EGL_GL_TEXTURE_CUBE_MAP_*_KHR, EGL_GL_RENDERBUFFER_KHR or 31402f4aeb0Sopenharmony_ci EGL_GL_TEXTURE_3D_KHR and <buffer> refers to the default GL 31502f4aeb0Sopenharmony_ci texture object (0) for the corresponding GL target, the error 31602f4aeb0Sopenharmony_ci EGL_BAD_PARAMETER is generated. 31702f4aeb0Sopenharmony_ci 31802f4aeb0Sopenharmony_ci * If <target> is EGL_GL_TEXTURE_2D_KHR, EGL_GL_TEXTURE_CUBE_MAP_*_KHR, 31902f4aeb0Sopenharmony_ci or EGL_GL_TEXTURE_3D_KHR, and the value specified in <attr_list> 32002f4aeb0Sopenharmony_ci for EGL_GL_TEXTURE_LEVEL_KHR is not a valid mipmap level for the 32102f4aeb0Sopenharmony_ci specified GL texture object <buffer>, the error EGL_BAD_MATCH is 32202f4aeb0Sopenharmony_ci generated. 32302f4aeb0Sopenharmony_ci 32402f4aeb0Sopenharmony_ci * If <target> is EGL_GL_TEXTURE_3D_KHR, and the value specified in 32502f4aeb0Sopenharmony_ci <attr_list> for EGL_GL_TEXTURE_ZOFFSET_KHR exceeds the depth 32602f4aeb0Sopenharmony_ci of the specified mipmap level-of-detail in <buffer>, the error 32702f4aeb0Sopenharmony_ci EGL_BAD_PARAMETER is generated." 32802f4aeb0Sopenharmony_ci 32902f4aeb0Sopenharmony_ci 33002f4aeb0Sopenharmony_ciIssues 33102f4aeb0Sopenharmony_ci 33202f4aeb0Sopenharmony_ci 1. What should happen if an application attempts to create an 33302f4aeb0Sopenharmony_ci EGLImage from a default OpenGL object (i.e., objects with 33402f4aeb0Sopenharmony_ci a name of 0)? 33502f4aeb0Sopenharmony_ci 33602f4aeb0Sopenharmony_ci SUGGESTION: Disallow this operation, and generate an error. 33702f4aeb0Sopenharmony_ci 33802f4aeb0Sopenharmony_ci 2. What happens when one of 33902f4aeb0Sopenharmony_ci glTexImage2D 34002f4aeb0Sopenharmony_ci glCopyTexImage2D 34102f4aeb0Sopenharmony_ci glCompressedTexImage2D 34202f4aeb0Sopenharmony_ci glTexImage3D 34302f4aeb0Sopenharmony_ci glCopyTexImage3D 34402f4aeb0Sopenharmony_ci glCompressedTexImage3D 34502f4aeb0Sopenharmony_ci is called on a texture which has a mipmap level which is an EGLImage 34602f4aeb0Sopenharmony_ci sibling? 34702f4aeb0Sopenharmony_ci 34802f4aeb0Sopenharmony_ci RESOLVED: the EGLImage sibling is orphaned. The mipmap level and the 34902f4aeb0Sopenharmony_ci EGLImage no longer have any connection. 35002f4aeb0Sopenharmony_ci 35102f4aeb0Sopenharmony_ci 3. What happens when one of 35202f4aeb0Sopenharmony_ci glTexSubImage2D 35302f4aeb0Sopenharmony_ci glCopyTexSubImage2D 35402f4aeb0Sopenharmony_ci glCompressedTexSubImage2D 35502f4aeb0Sopenharmony_ci glTexSubImage3D 35602f4aeb0Sopenharmony_ci glCopyTexSubImage3D 35702f4aeb0Sopenharmony_ci glCompressedTexSubImage3D 35802f4aeb0Sopenharmony_ci is called on a texture which has a mipmap level which is an EGLImage 35902f4aeb0Sopenharmony_ci sibling? 36002f4aeb0Sopenharmony_ci 36102f4aeb0Sopenharmony_ci RESOLVED: the EGLImage sibling is NOT orphaned. The mipmap level 36202f4aeb0Sopenharmony_ci remains an EGLImage sibling. 36302f4aeb0Sopenharmony_ci 36402f4aeb0Sopenharmony_ci 4. What happens when glGenerateMipmaps is called on a texture which has a 36502f4aeb0Sopenharmony_ci mipmap level which is an EGLImage sibling? 36602f4aeb0Sopenharmony_ci 36702f4aeb0Sopenharmony_ci RESOLVED: If the texture is already complete, then the EGLImage 36802f4aeb0Sopenharmony_ci sibling is not orphaned, and the mipmap level remains an EGLImage 36902f4aeb0Sopenharmony_ci sibling. However, if the texture was not complete then the 37002f4aeb0Sopenharmony_ci EGLImage sibling IS orphaned. This is because the implementation 37102f4aeb0Sopenharmony_ci will implicitly alter the structure of the mipmap levels. 37202f4aeb0Sopenharmony_ci 37302f4aeb0Sopenharmony_ci 5. What happens when the GL_GENERATE_MIPMAP bit causes a texture to be 37402f4aeb0Sopenharmony_ci respecified. 37502f4aeb0Sopenharmony_ci 37602f4aeb0Sopenharmony_ci RESOLVED: If the texture is already complete, then the EGLImage 37702f4aeb0Sopenharmony_ci sibling is not orphaned, and the mipmap level remains an EGLImage 37802f4aeb0Sopenharmony_ci sibling. However, if the texture was not complete then the 37902f4aeb0Sopenharmony_ci EGLImage sibling IS orphaned. This is because the implementation 38002f4aeb0Sopenharmony_ci will implicitly alter the structure of the mipmap levels. 38102f4aeb0Sopenharmony_ci 38202f4aeb0Sopenharmony_ci 6. Can an EGLImage be created from a multisampled GL image? 38302f4aeb0Sopenharmony_ci 38402f4aeb0Sopenharmony_ci RESOLVED: NO. Attempting to create an EGLImage from a multisampled 38502f4aeb0Sopenharmony_ci GL renderbuffer is now an error. Attempting to create from a 38602f4aeb0Sopenharmony_ci multisampled OpenGL texture image is not possible because none of 38702f4aeb0Sopenharmony_ci the multisampled <target>s are supported. 38802f4aeb0Sopenharmony_ci 38902f4aeb0Sopenharmony_ci 7. Are all types of two-dimensional GL images which might 39002f4aeb0Sopenharmony_ci be associated with EGLImages allowed? 39102f4aeb0Sopenharmony_ci 39202f4aeb0Sopenharmony_ci Not yet. We could add new variants of these extensions to support 39302f4aeb0Sopenharmony_ci other image types such as rectangular and 2D array slice textures, 39402f4aeb0Sopenharmony_ci but haven't yet seen a need to do so. 39502f4aeb0Sopenharmony_ci 39602f4aeb0Sopenharmony_ciRevision History 39702f4aeb0Sopenharmony_ci 39802f4aeb0Sopenharmony_ci#13 (Jon Leech, October 9, 2013) - Define interactions with and support for 39902f4aeb0Sopenharmony_ci OpenGL and OpenGL ES 3.0, in addition to OpenGL ES 1/2. Add issue 7 (Bug 40002f4aeb0Sopenharmony_ci 10728). 40102f4aeb0Sopenharmony_ci#12 (Jon Leech, September 16, 2013) - Add error when specifying a 40202f4aeb0Sopenharmony_ci renderbuffer <target> and passing a multisampled renderbuffer object. 40302f4aeb0Sopenharmony_ci Add issue 6 describing lack of support for multisampled EGLImages (Bug 40402f4aeb0Sopenharmony_ci 10728). 40502f4aeb0Sopenharmony_ci#11 (Jon Leech, June 26, 2013) - Add error when specifying a renderbuffer 40602f4aeb0Sopenharmony_ci <target> and not passing a renderbuffer object (Bug 10384). 40702f4aeb0Sopenharmony_ci#10 (Jon Leech, June 13, 2013) - Add a "Valid Targets" column to table bbb 40802f4aeb0Sopenharmony_ci for new attributes, matching proposed changes in EGL_KHR_image_base (Bug 40902f4aeb0Sopenharmony_ci 10151). 41002f4aeb0Sopenharmony_ci#9 (Jon Leech, March 28, 2012) 41102f4aeb0Sopenharmony_ci - Fix spelling of *CUBE_MAP* tokens (from CUBEMAP) to agree with 41202f4aeb0Sopenharmony_ci eglext.h. 41302f4aeb0Sopenharmony_ci#8 (Jon Leech, February 4, 2009) 41402f4aeb0Sopenharmony_ci - Change "non-default ... texture object" to "nonzero". 41502f4aeb0Sopenharmony_ci#7 (Bruce Merry, January 20, 2009) 41602f4aeb0Sopenharmony_ci - Minor wording improvements on issues 4 and 5. 41702f4aeb0Sopenharmony_ci#6 (Acorn Pooley, January 13, 2009) 41802f4aeb0Sopenharmony_ci - Modify completion requirement so textures with only mipmap level 0 can 41902f4aeb0Sopenharmony_ci be EGLImage source siblings. Add issues 2-5. 42002f4aeb0Sopenharmony_ci#5 (Jon Leech, October 8, 2008) 42102f4aeb0Sopenharmony_ci - Updated status (approved as part of OpenKODE 1.0) 42202f4aeb0Sopenharmony_ci#4 (Jon Leech, April 7, 2007) 42302f4aeb0Sopenharmony_ci - Assigned enumerant values 42402f4aeb0Sopenharmony_ci - Added OpenKODE 1.0 Provisional disclaimer 42502f4aeb0Sopenharmony_ci#3 (December 14, 2006) 42602f4aeb0Sopenharmony_ci - Changed requirement to egl 1.2 to include EGLClientBuffer type. 42702f4aeb0Sopenharmony_ci - formatting to keep within 80 columns 42802f4aeb0Sopenharmony_ci - added error condition descriptions for <dpy> and <ctx> 42902f4aeb0Sopenharmony_ci - changed error condition for EGL_GL_TEXTURE_ZOFFSET_KHR too big to 43002f4aeb0Sopenharmony_ci be EGL_BAD_PARAMETER 43102f4aeb0Sopenharmony_ci#2 (November 27, 2006) 43202f4aeb0Sopenharmony_ci - Changed OES token to KHR 433