mirror of
https://github.com/narrrl/proton-stream.git
synced 2026-11-03 16:41:26 +01:00
Merge pull request #2 from mathieu-rahab/fix/macos-embedded-video
fix(player): resolve GL entry points from OpenGL.framework on macOS
This commit is contained in:
1 file changed
+10
-1
@@ -42,7 +42,7 @@ use libloading::Library;
|
|||||||
///
|
///
|
||||||
/// EGL leads on a Wayland session and GLX on an X11 one, matching what glutin
|
/// EGL leads on a Wayland session and GLX on an X11 one, matching what glutin
|
||||||
/// will have picked — though with `libglvnd` in the way, either order works.
|
/// will have picked — though with `libglvnd` in the way, either order works.
|
||||||
#[cfg(unix)]
|
#[cfg(all(unix, not(target_os = "macos")))]
|
||||||
fn candidates() -> Vec<&'static str> {
|
fn candidates() -> Vec<&'static str> {
|
||||||
let wayland = std::env::var_os("WAYLAND_DISPLAY").is_some();
|
let wayland = std::env::var_os("WAYLAND_DISPLAY").is_some();
|
||||||
if wayland {
|
if wayland {
|
||||||
@@ -52,6 +52,15 @@ fn candidates() -> Vec<&'static str> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// eframe's context on macOS is CGL, and the framework exports every GL
|
||||||
|
/// function it implements as a plain symbol — there is no `GetProcAddress` to
|
||||||
|
/// go through, so the direct lookup in [`GlLoader::resolve`] answers for all of
|
||||||
|
/// them.
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
|
fn candidates() -> Vec<&'static str> {
|
||||||
|
vec!["/System/Library/Frameworks/OpenGL.framework/OpenGL"]
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
fn candidates() -> Vec<&'static str> {
|
fn candidates() -> Vec<&'static str> {
|
||||||
vec!["opengl32.dll"]
|
vec!["opengl32.dll"]
|
||||||
|
|||||||
Reference in new issue
Block a user