summaryrefslogtreecommitdiff
path: root/platform/macos/gl_manager_macos_legacy.mm
diff options
context:
space:
mode:
Diffstat (limited to 'platform/macos/gl_manager_macos_legacy.mm')
-rw-r--r--platform/macos/gl_manager_macos_legacy.mm9
1 files changed, 9 insertions, 0 deletions
diff --git a/platform/macos/gl_manager_macos_legacy.mm b/platform/macos/gl_manager_macos_legacy.mm
index dec4821b86..ea5c36da6c 100644
--- a/platform/macos/gl_manager_macos_legacy.mm
+++ b/platform/macos/gl_manager_macos_legacy.mm
@@ -215,6 +215,15 @@ bool GLManager_MacOS::is_using_vsync() const {
return use_vsync;
}
+NSOpenGLContext *GLManager_MacOS::get_context(DisplayServer::WindowID p_window_id) {
+ if (!windows.has(p_window_id)) {
+ return nullptr;
+ }
+
+ GLWindow &win = windows[p_window_id];
+ return win.context;
+}
+
GLManager_MacOS::GLManager_MacOS(ContextType p_context_type) {
context_type = p_context_type;
}