102f4aeb0Sopenharmony_ciName 202f4aeb0Sopenharmony_ci 302f4aeb0Sopenharmony_ci NV_native_query 402f4aeb0Sopenharmony_ci 502f4aeb0Sopenharmony_ciName Strings 602f4aeb0Sopenharmony_ci 702f4aeb0Sopenharmony_ci EGL_NV_native_query 802f4aeb0Sopenharmony_ci 902f4aeb0Sopenharmony_ciContributors 1002f4aeb0Sopenharmony_ci 1102f4aeb0Sopenharmony_ci Mathias Heyer, NVIDIA 1202f4aeb0Sopenharmony_ci Daniel Kartch, NVIDIA 1302f4aeb0Sopenharmony_ci Peter Pipkorn, NVIDIA 1402f4aeb0Sopenharmony_ci Acorn Pooley, NVIDIA 1502f4aeb0Sopenharmony_ci Greg Roth, NVIDIA 1602f4aeb0Sopenharmony_ci 1702f4aeb0Sopenharmony_ciContacts 1802f4aeb0Sopenharmony_ci 1902f4aeb0Sopenharmony_ci Peter Pipkorn, NVIDIA Corporation (ppipkorn 'at' nvidia.com) 2002f4aeb0Sopenharmony_ci 2102f4aeb0Sopenharmony_ciStatus 2202f4aeb0Sopenharmony_ci 2302f4aeb0Sopenharmony_ci Complete 2402f4aeb0Sopenharmony_ci 2502f4aeb0Sopenharmony_ciVersion 2602f4aeb0Sopenharmony_ci 2702f4aeb0Sopenharmony_ci Version 0.4, 25 Sept, 2012 2802f4aeb0Sopenharmony_ci 2902f4aeb0Sopenharmony_ciNumber 3002f4aeb0Sopenharmony_ci 3102f4aeb0Sopenharmony_ci EGL Extension #45 3202f4aeb0Sopenharmony_ci 3302f4aeb0Sopenharmony_ciDependencies 3402f4aeb0Sopenharmony_ci 3502f4aeb0Sopenharmony_ci Requires EGL 1.0 3602f4aeb0Sopenharmony_ci 3702f4aeb0Sopenharmony_ci This extension is written against the wording of the EGL 1.4 3802f4aeb0Sopenharmony_ci Specification. 3902f4aeb0Sopenharmony_ci 4002f4aeb0Sopenharmony_ciOverview 4102f4aeb0Sopenharmony_ci 4202f4aeb0Sopenharmony_ci This extension allows an application to query which native display, 4302f4aeb0Sopenharmony_ci pixmap and surface corresponds to a EGL object. 4402f4aeb0Sopenharmony_ci 4502f4aeb0Sopenharmony_ciNew Procedures and Functions 4602f4aeb0Sopenharmony_ci 4702f4aeb0Sopenharmony_ci EGLBoolean eglQueryNativeDisplayNV( 4802f4aeb0Sopenharmony_ci EGLDisplay dpy, 4902f4aeb0Sopenharmony_ci EGLNativeDisplayType* display_id); 5002f4aeb0Sopenharmony_ci 5102f4aeb0Sopenharmony_ci EGLBoolean eglQueryNativeWindowNV( 5202f4aeb0Sopenharmony_ci EGLDisplay dpy, 5302f4aeb0Sopenharmony_ci EGLSurface surf, 5402f4aeb0Sopenharmony_ci EGLNativeWindowType* window); 5502f4aeb0Sopenharmony_ci 5602f4aeb0Sopenharmony_ci EGLBoolean eglQueryNativePixmapNV( 5702f4aeb0Sopenharmony_ci EGLDisplay dpy, 5802f4aeb0Sopenharmony_ci EGLSurface surf, 5902f4aeb0Sopenharmony_ci EGLNativePixmapType* pixmap); 6002f4aeb0Sopenharmony_ci 6102f4aeb0Sopenharmony_ciChanges to Chapter 3 of the EGL 1.4 Specification (EGL Functions and Errors) 6202f4aeb0Sopenharmony_ci 6302f4aeb0Sopenharmony_ci In Chapter 3.2, after the description of eglInitialize and before the 6402f4aeb0Sopenharmony_ci description of eglTerminate insert 6502f4aeb0Sopenharmony_ci 6602f4aeb0Sopenharmony_ci "While initialized, the native display that corresponds to an 6702f4aeb0Sopenharmony_ci EGLDisplay can retrieved by 6802f4aeb0Sopenharmony_ci 6902f4aeb0Sopenharmony_ci EGLBoolean eglQueryNativeDisplayNV( 7002f4aeb0Sopenharmony_ci EGLDisplay dpy, 7102f4aeb0Sopenharmony_ci EGLNativeDisplayType* display_id); 7202f4aeb0Sopenharmony_ci 7302f4aeb0Sopenharmony_ci If the <dpy> is a valid and initialized EGLDisplay, EGL_TRUE 7402f4aeb0Sopenharmony_ci will be returned and the native display handle will be written 7502f4aeb0Sopenharmony_ci to <display_id>. Otherwise EGL_FALSE will be returned and the 7602f4aeb0Sopenharmony_ci contents of <display_id> are left untouched. If the <dpy> is 7702f4aeb0Sopenharmony_ci not valid, an EGL_BAD_DISPLAY error will be generated. If <dpy> 7802f4aeb0Sopenharmony_ci is not initialized, an EGL_NOT_INITIALIZED error will be 7902f4aeb0Sopenharmony_ci generated. If <display_id> is NULL, an EGL_BAD_PARAMETER error 8002f4aeb0Sopenharmony_ci will be generated. 8102f4aeb0Sopenharmony_ci 8202f4aeb0Sopenharmony_ci In Chapter 3.5 Rendering Surfaces, after section 3.5.1 insert 8302f4aeb0Sopenharmony_ci 8402f4aeb0Sopenharmony_ci "The native window that corresponds to an EGLSurface can be 8502f4aeb0Sopenharmony_ci retrieved by 8602f4aeb0Sopenharmony_ci 8702f4aeb0Sopenharmony_ci EGLBoolean eglQueryNativeWindowNV( 8802f4aeb0Sopenharmony_ci EGLDisplay dpy, 8902f4aeb0Sopenharmony_ci EGLSurface surf, 9002f4aeb0Sopenharmony_ci EGLNativeWindowType* win); 9102f4aeb0Sopenharmony_ci 9202f4aeb0Sopenharmony_ci The corresponding native window will be written to <win>, 9302f4aeb0Sopenharmony_ci and EGL_TRUE will be returned. If the call fails, EGL_FALSE 9402f4aeb0Sopenharmony_ci will be returned, and content of <win> will not be modified. 9502f4aeb0Sopenharmony_ci If <dpy> is not a valid EGLDisplay, an EGL_BAD_DISPLAY error 9602f4aeb0Sopenharmony_ci will be generated. If <dpy> is not initialized, an EGL_NOT_- 9702f4aeb0Sopenharmony_ci INITIALIZED error will be generated. If <surf> is not a valid 9802f4aeb0Sopenharmony_ci EGLSurface, or <surf> does not have a corresponding native 9902f4aeb0Sopenharmony_ci window, an EGL_BAD_SURFACE error will be generated." If <win> 10002f4aeb0Sopenharmony_ci is NULL, an EGL_BAD_PARAMETER error will be generated. 10102f4aeb0Sopenharmony_ci 10202f4aeb0Sopenharmony_ci After section 3.5.4 Creating Native Pixmap Rendering Surfaces insert 10302f4aeb0Sopenharmony_ci 10402f4aeb0Sopenharmony_ci "The native pixmap that corresponds to an EGLSurface can be 10502f4aeb0Sopenharmony_ci retrieved by 10602f4aeb0Sopenharmony_ci 10702f4aeb0Sopenharmony_ci EGLBoolean eglQueryNativePixmapNV( 10802f4aeb0Sopenharmony_ci EGLDisplay dpy, 10902f4aeb0Sopenharmony_ci EGLSurface surf, 11002f4aeb0Sopenharmony_ci EGLNativePixmapType* pixmap); 11102f4aeb0Sopenharmony_ci 11202f4aeb0Sopenharmony_ci The corresponding native pixmap will be written to <pixmap>, 11302f4aeb0Sopenharmony_ci and EGL_TRUE will be returned. If the call fails, EGL_FALSE 11402f4aeb0Sopenharmony_ci will be returned, and the content of <pixmap> will not be 11502f4aeb0Sopenharmony_ci modified. If <dpy> is not a valid EGLDisplay, an EGL_BAD_- 11602f4aeb0Sopenharmony_ci DISPLAY error will be generated. If <dpy> is not initialized, 11702f4aeb0Sopenharmony_ci an EGL_NOT_INITIALIZED error will be generated. If <surf> is 11802f4aeb0Sopenharmony_ci not a valid EGLSurface, or <surf> does not have a corresponding 11902f4aeb0Sopenharmony_ci native pixmap, an EGL_BAD_SURFACE error will be generated." If 12002f4aeb0Sopenharmony_ci <pixmap> is NULL, an EGL_BAD_PARAMETER error will be 12102f4aeb0Sopenharmony_ci generated. 12202f4aeb0Sopenharmony_ci 12302f4aeb0Sopenharmony_ciIssues 12402f4aeb0Sopenharmony_ci 12502f4aeb0Sopenharmony_ciRevision History 12602f4aeb0Sopenharmony_ci#4 (Greg Roth, Sept 25, 2012) 12702f4aeb0Sopenharmony_ci - Further document all potential errors for all functions 12802f4aeb0Sopenharmony_ci 12902f4aeb0Sopenharmony_ci#3 (Daniel Kartch, August 30, 2011) 13002f4aeb0Sopenharmony_ci - Add restriction that EGLDisplay be initialized 13102f4aeb0Sopenharmony_ci 13202f4aeb0Sopenharmony_ci#2 (Peter Pipkorn, December 16, 2009) 13302f4aeb0Sopenharmony_ci - Minor cleanup 13402f4aeb0Sopenharmony_ci 13502f4aeb0Sopenharmony_ci#1 (Peter Pipkorn, December 15, 2009) 13602f4aeb0Sopenharmony_ci - First Draft 13702f4aeb0Sopenharmony_ci 138