From 82c60edbfb6d640a9362ba88e9e1ecdc6b67791d Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Fri, 14 Aug 2026 20:35:53 -0500 Subject: [PATCH 1/3] Document EGL lifecycle APIs Refs #307 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../Javax.Microedition.Khronos.Egl/IEGL10.xml | 89 ++++++++++++++----- 1 file changed, 69 insertions(+), 20 deletions(-) diff --git a/docs/xml/Javax.Microedition.Khronos.Egl/IEGL10.xml b/docs/xml/Javax.Microedition.Khronos.Egl/IEGL10.xml index 433001841..8314aa312 100644 --- a/docs/xml/Javax.Microedition.Khronos.Egl/IEGL10.xml +++ b/docs/xml/Javax.Microedition.Khronos.Egl/IEGL10.xml @@ -1134,8 +1134,13 @@ + Gets the EGL rendering context current to the calling thread. - To be added. + + The current rendering context, or + + if no context is current. + Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -1164,8 +1169,13 @@ + Gets the EGL display connection for the current rendering context. - To be added. + + The current display connection, or + + if no context is current. + Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -1195,10 +1205,19 @@ - To be added. + + Specifies whether to retrieve the read + () or draw + () surface. + + Gets the requested surface of the current EGL rendering context. - To be added. + + The requested current surface, or + + if no context is current. + Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -1228,10 +1247,19 @@ - To be added. + + The native display to connect to. Use + + for the default display. + + Gets an EGL display connection for a native display. - To be added. + + An EGL display connection, or + + if no matching connection is available. + Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -1260,8 +1288,12 @@ + Gets and clears the error from the last EGL function invoked on the current thread. - To be added. + + The EGL error code. Calling this method resets the error to + . + Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -1367,11 +1399,15 @@ - To be added. - To be added. + The EGL display connection to initialize. + Receives the implementation's EGL major and minor version numbers. + Initializes an EGL display connection. - To be added. + + if the display connection was initialized; otherwise, + . + Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -1504,13 +1540,17 @@ - To be added. - To be added. - To be added. - To be added. + The EGL display connection. + The draw surface. + The read surface. + The rendering context to attach to the surfaces. + Binds a rendering context to the calling thread and to its draw and read surfaces. - To be added. + + if the context was made current; otherwise, + . + Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -2329,11 +2369,15 @@ - To be added. - To be added. + The EGL display connection. + The drawing surface whose buffers are swapped. + Posts a back-buffered window surface's color buffer to its native window. - To be added. + + if the buffers were swapped; otherwise, + . + Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -2363,11 +2407,16 @@ - To be added. + The EGL display connection to terminate. + Releases resources associated with an EGL display connection. - To be added. + + if the display connection was terminated; otherwise, + . + + Resources associated with contexts or surfaces that are current remain until they are no longer current. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. From 2cb6dada87d6572ab9d0329863ad9447951e0925 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Fri, 14 Aug 2026 20:47:41 -0500 Subject: [PATCH 2/3] Clarify EGL lifecycle documentation Refs #307 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../Javax.Microedition.Khronos.Egl/IEGL10.xml | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/docs/xml/Javax.Microedition.Khronos.Egl/IEGL10.xml b/docs/xml/Javax.Microedition.Khronos.Egl/IEGL10.xml index 8314aa312..06522c3b4 100644 --- a/docs/xml/Javax.Microedition.Khronos.Egl/IEGL10.xml +++ b/docs/xml/Javax.Microedition.Khronos.Egl/IEGL10.xml @@ -1400,7 +1400,10 @@ The EGL display connection to initialize. - Receives the implementation's EGL major and minor version numbers. + + May be . Otherwise, it must contain at least two elements and + receives the EGL major and minor version numbers at indices 0 and 1. + Initializes an EGL display connection. @@ -1409,6 +1412,7 @@ . + Android's AOSP EGL binding exposes EGL 1.0 through . Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -1541,9 +1545,20 @@ The EGL display connection. - The draw surface. - The read surface. - The rendering context to attach to the surfaces. + + The draw surface, or + when releasing the current context. + + + The read surface, or + when releasing the current context. + + + The rendering context to attach to the surfaces. Pass + with both surfaces + set to to release + the current context. + Binds a rendering context to the calling thread and to its draw and read surfaces. @@ -2372,13 +2387,14 @@ The EGL display connection. The drawing surface whose buffers are swapped. - Posts a back-buffered window surface's color buffer to its native window. + Swaps the color buffers of an EGL drawing surface. if the buffers were swapped; otherwise, . + For a back-buffered window surface, this posts the color buffer to its native window. It has no effect on a single-buffered window, pixmap, or pixel-buffer surface. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. From 02bcbd57302b1c0bce73eff4182dc75393325770 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Sat, 15 Aug 2026 09:33:01 -0500 Subject: [PATCH 3/3] Document Android EGL argument contracts Refs #307 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../Javax.Microedition.Khronos.Egl/IEGL10.xml | 31 +++++++++++++++---- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/docs/xml/Javax.Microedition.Khronos.Egl/IEGL10.xml b/docs/xml/Javax.Microedition.Khronos.Egl/IEGL10.xml index 06522c3b4..d4c8257b3 100644 --- a/docs/xml/Javax.Microedition.Khronos.Egl/IEGL10.xml +++ b/docs/xml/Javax.Microedition.Khronos.Egl/IEGL10.xml @@ -1218,6 +1218,11 @@ if no context is current. + + is neither + nor + . + Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -1248,19 +1253,18 @@ - The native display to connect to. Use - - for the default display. + Ignored by Android's EGL binding. - Gets an EGL display connection for a native display. + Gets Android's default EGL display connection. - An EGL display connection, or + The default EGL display connection, or - if no matching connection is available. + if no display connection is available. + Android's AOSP EGL binding always obtains . Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -1411,6 +1415,10 @@ if the display connection was initialized; otherwise, . + + is , or + is non-null and has fewer than two elements. + Android's AOSP EGL binding exposes EGL 1.0 through . Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -1566,6 +1574,10 @@ if the context was made current; otherwise, . + + , , , or + is . + Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -2393,6 +2405,10 @@ if the buffers were swapped; otherwise, . + + or is + . + For a back-buffered window surface, this posts the color buffer to its native window. It has no effect on a single-buffered window, pixmap, or pixel-buffer surface. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. @@ -2431,6 +2447,9 @@ if the display connection was terminated; otherwise, . + + is . + Resources associated with contexts or surfaces that are current remain until they are no longer current. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.