Repository navigation
Flag::Stereo in an ordinary window, on a Linux desktop that mixes 3D and 2D windows #699
danielcamposramos
started this conversation in
Show and tell
Replies: 1 comment
|
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi Vladimír, and thank you for Magnum.
Sparky Stereo OS is a Linux desktop where 3D windows and 2D windows share the same screen: https://github.com/Sparky-OS/sparky-stereo-os
It is a stereo 3D edition of SparkyLinux, on Debian testing with KDE Plasma, and I make it.
A stereo program runs in an ordinary window next to a browser or an editor, and the compositor shows that window in 3D and the rest of the desktop in 2D.
The same desktop drives a 3D TV over HDMI frame packing, any monitor as red and cyan anaglyph, and a phone in a cheap viewer as the PC's display (photos: Sparky-OS/flat-headset#5).
It runs on ordinary GPUs through Mesa: no professional card and no full screen mode needed.
A Magnum program needs nothing new for this.
GLConfiguration::Flag::Stereo, with one eye drawn intoBackLeftand the other intoBackRight, is the whole interface, and Magnum has had it for years.What I ran: a
GlfwApplicationwith three flat cubes and two parallel cameras with off-axis frusta, on native Wayland, with Corrade and Magnum master built the way yourpackage/debianbuilds them, on an AMD GPU and on llvmpipe.In both eyes each cube landed where the projection predicts: all 24 silhouette edges within one pixel, and no vertical disparity.
Without the flag, the same program opens an ordinary 2D window.
What had to change was below Magnum.
On Wayland, OpenGL goes through EGL, which has no stereo config, so GLFW refused the flag.
Our forks of GLFW (https://github.com/Sparky-OS/glfw) and Mesa (https://gitlab.freedesktop.org/danielcamposramos/mesa) now give a stereo window two views through
EGL_EXT_multiview_window, and the compositor takes it from there.Two limits today.
Sdl2Applicationhas no stereo flag, so an SDL program stays 2D unless it asks SDL forSDL_GL_STEREOitself.The X11 route (GLX on Xwayland) still squeezes the picture; we are fixing it now, so this note is about Wayland only.
Thank you for an engine where stereo was already there to use.
I wrote this with help from Claude (Anthropic), and I checked the results myself.
All reactions