mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Merge pull request #97771 from dsnopek/openxr-linux-egl
OpenXR: Add support for Wayland on Linux
This commit is contained in:
@@ -414,6 +414,30 @@ EGLContext EGLManager::get_context(DisplayServer::WindowID p_window_id) {
|
||||
return display.egl_context;
|
||||
}
|
||||
|
||||
EGLDisplay EGLManager::get_display(DisplayServer::WindowID p_window_id) {
|
||||
GLWindow &glwindow = windows[p_window_id];
|
||||
|
||||
if (!glwindow.initialized) {
|
||||
return EGL_NO_CONTEXT;
|
||||
}
|
||||
|
||||
GLDisplay &display = displays[glwindow.gldisplay_id];
|
||||
|
||||
return display.egl_display;
|
||||
}
|
||||
|
||||
EGLConfig EGLManager::get_config(DisplayServer::WindowID p_window_id) {
|
||||
GLWindow &glwindow = windows[p_window_id];
|
||||
|
||||
if (!glwindow.initialized) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
GLDisplay &display = displays[glwindow.gldisplay_id];
|
||||
|
||||
return display.egl_config;
|
||||
}
|
||||
|
||||
Error EGLManager::initialize(void *p_native_display) {
|
||||
#if defined(GLAD_ENABLED) && !defined(EGL_STATIC)
|
||||
// Loading EGL with a new display gets us just the bare minimum API. We'll then
|
||||
|
||||
Reference in New Issue
Block a user