summaryrefslogtreecommitdiff
path: root/subprojects/packagefiles/glfm/get_egl_internal.diff
blob: 3c9098c5f9addf7cd8f970aa7fef00812a7aae2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
diff --git a/include/glfm.h b/include/glfm.h
index ceace39..d18711c 100644
--- a/include/glfm.h
+++ b/include/glfm.h
@@ -892,6 +892,9 @@ ANativeActivity *glfmAndroidGetActivity(void) GLFM_DEPRECATED("Use glfmGetAndroi
 /// ``GLFMAppFocusFunc``.
 void *glfmGetAndroidActivity(const GLFMDisplay *display);
 
+void *glfmGetEglDisplay(const GLFMDisplay *display);
+void *glfmGetEglContext(const GLFMDisplay *display);
+
 #endif // GLFM_EXPOSE_NATIVE_ANDROID
 
 #ifdef __cplusplus
diff --git a/src/glfm_android.c b/src/glfm_android.c
index 67d1927..7942ddf 100644
--- a/src/glfm_android.c
+++ b/src/glfm_android.c
@@ -2800,4 +2800,20 @@ void *glfmGetAndroidActivity(const GLFMDisplay *display) {
     return platformData->activity;
 }
 
+void *glfmGetEglDisplay(const GLFMDisplay *display) {
+    if (!display || !display->platformData) {
+        return NULL;
+    }
+    GLFMPlatformData *platformData = display->platformData;
+    return platformData->eglDisplay;
+}
+
+void *glfmGetEglContext(const GLFMDisplay *display) {
+    if (!display || !display->platformData) {
+        return NULL;
+    }
+    GLFMPlatformData *platformData = display->platformData;
+    return platformData->eglContext;
+}
+
 #endif // __ANDROID__