• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    ANGLE_external_context_and_surface
4
5Name Strings
6
7    EGL_ANGLE_external_context_and_surface
8
9Contributors
10
11    Peng Huang
12    Shahbaz Youssefi
13
14Contacts
15
16    Shahbaz Youssefi, Google (syoussefi 'at' google.com)
17
18Status
19
20    Draft
21
22Version
23
24    Version 2, July 24, 2023
25
26Number
27
28    EGL Extension #??
29
30Dependencies
31
32    This extension is written against the wording of the EGL 1.4
33    Specification.
34
35Overview
36
37    This extension allows plugging an external OpenGL context and surface to
38    the OpenGL backend of ANGLE.
39
40New Types
41
42    None
43
44New Procedures and Functions
45
46    void eglAcquireExternalContextANGLE(
47        EGLDisplay dpy);
48    void eglReleaseExternalContextANGLE(
49        EGLDisplay dpy);
50
51New Tokens
52
53    Accepted as an attribute name in the <*attrib_list> argument to
54    eglCreateContext:
55
56        EGL_EXTERNAL_CONTEXT_ANGLE 0x348E
57        EGL_EXTERNAL_CONTEXT_SAVE_STATE_ANGLE 0x3490
58
59    Accepted in the <buftype> parameter of eglCreatePbufferFromClientBuffer:
60
61        EGL_EXTERNAL_SURFACE_ANGLE 0x348F
62
63Additions to the EGL 1.4 Specification
64
65    Add the following to section 3.7.1 "Creating Rendering Contexts":
66
67    EGL_EXTERNAL_CONTEXT_ANGLE indicates whether the context is externally
68    managed, and that no internal context is created.
69    In this case, the context must be made current by the application before
70    calling other EGL or GL functions that may access the context.
71
72    EGL_EXTERNAL_CONTEXT_SAVE_STATE_ANGLE indicates whether the context state
73    is automatically synchronized from and to the external context when
74    eglMakeCurrent is called.
75    eglAcquireExternalContextANGLE and eglReleaseExternalContextANGLE can be
76    used to perform this synchronization independently from MakeCurrent.
77
78    Add the following to section 3.5.3 "Binding Off-Screen Rendering Surfaces
79    To Client Buffers":
80
81    EGL_EXTERNAL_SURFACE_ANGLE indicates whether the surface is externally
82    managed, and that no internal surface is created.
83    In this case, the surface must be made current by the application before
84    calling other EGL or GL functions that may access the surface.
85
86    Add the following to section 3.7.3 "Binding Contexts and Drawables":
87
88    Before making a call that uses a context created with
89    EGL_EXTERNAL_CONTEXT_ANGLE, the context must be synchronized from external.
90    If EGL_EXTERNAL_CONTEXT_SAVE_STATE_ANGLE is specified when creating the
91    context, this can be done with a call to eglMakeCurrent.
92    Alternatively, eglAcquireExternalContextANGLE can be called to perform this
93    synchronization.
94    The eglAcquireExternalContextANGLE call ensures that the implementation is
95    up-to-date with respect to changes that external has made to the context.
96
97    Before the application (external) can continue using the context after the
98    implementation has modified it, the context must be synchronized to
99    external, restoring the state from when the external context was
100    "acquired".
101    If EGL_EXTERNAL_CONTEXT_SAVE_STATE_ANGLE is specified when creating the
102    context, this can be done with a call to eglMakeCurrent that sets the
103    context to NULL.
104    Alternatively, eglReleaseExternalContextANGLE can be called to perform this
105    synchronization.
106    The eglReleaseExternalContextANGLE call ensures that the context is
107    restored to its original state from before the
108    eglAcquireExternalContextANGLE call.
109
110Issues
111
112    None yet.
113
114Revision History
115
116    Rev.    Date         Author     Changes
117    ----  -------------  ---------  ----------------------------------------
118      1   Jan 7, 2021    penghuang  Initial version
119      2   July 24, 2023  syoussefi  Add eglAcquireExternalContextANGLE, and
120                                      eglReleaseExternalContextANGLE
121