After over 200 commits over 10 Months and 6 Days, it’s finally time to announce that Looking Glass has nearly reached it’s Beta 2 release.
This marks the first of the B2 release candidates and the change list is enormous so if I miss some things I apologize.
Firstly before we continue please be aware that the amount of time and work that has gone into this update is enormous and would not be possible without those that are sponsoring the work via platforms like Patreon and Kofi.
That said, this project is financially and time expensive to produce and I would very much appreciate any help you can render to continue this work should it be useful to you. Below are the options available should you wish to do so.
- GitHub (preferred as GitHub have no fees and are currently matching every dollar donated with the same out of their own pocket).
- BTC - 14ZFcYjsKPiVreHqcaekvHGL846u3ZuT13
With that ugly stuff out of the way, here are the detals
There is a public wiki at https://looking-glass.hostfission.com/wiki/
Most if not all information there is current and applies here still. If anything is missing or wrong feel free to sign up and edit the content
Where to get it
Note: Once again Microsoft is being stupid and are incorrectly flagging the host as a Virus (Trojan:Win32/Fuery.C!cl, and Trojan:Win32/Wacatac.C!ml), this is not true. I have submitted a request yet again to have this fixed.
Complete source archive and pre-compiled Windows x64 host available at:
Shared Memory Changes
TL;DR: The looking glass host can now stream to up to 32 clients.
Initially, LG was designed to use the shared memory in a very primitive way that was just to get things working, but as this project has grown many people wanted to use LG with OBS simultaneously. This required a complete redesign of the shared memory communication to use a fast and intelligent system to mediate the sharing of this data between multiple clients without impacting performance or increasing memory usage.
Thus Looking Glass Memory Protocol (LGMP) was born. This project is not Looking Glass specific and can be used stand-alone outside of Looking Glass to create any data broadcast system over shared memory. It is platform agnostic and as such compiles and has been tested on both Windows and Linux platforms.
TL;DR: The spice client is far improved, uses less memory, has lower latency and generally works far better then it ever did.
Existing spice-protocol libraries are very heavyweight requiring GTK and supporting every feature of spice, including the one we care least about, graphics support. As such I wrote a spice client implementation into Looking Glass that is implemented in pure C. As this project has become more known people have wanted to use this code to create a stand-alone spice input utility however it was too integrated into Looking Glass’s codebase. It has now been separated out into a standalone library (PureSpice) and now lives in it’s own code repository.
Several bug fixes and improvements have also gone in, most notably race condition fixes that would corrupt the data stream and more efficient use of the datagrams by packing them together where possible allowing us to fully leverage the threadsafe
write syscalls making the library mostly lockless.
Native OBS Looking Glass Plugin
TL;DR: Works well but no cursor support yet.
This plugin lives in the
obs directory of the project, building it is the same pattern as the client. I am sure someone will document it on the wiki if I don’t get to it first.
TL;DR: More frames, lower latency, less stuttering, etc. The
fpsLimit is no longer as much a limit but a target value to operate at and will be exceeded if the guest updates at a higher rate then the limit.
LG has been plagued with micro stutters for as long as it has been around, the cause of which has been mainly due to my lack of OpenGL/EGL experience and/or understanding. Over the last year though I have had a lot of time to learn and experiment and have come up with a design that resolves (for me at least) all micro stuttering issues caused due to frame rate sync between host and guest.
Several race conditions also were not helping things where sometimes a frame was presented before it had been completely uploaded to the GPU, showing an old frame. A new state machine was built to properly track the streamed textures and their ready states to fix this.
As part of this thread concurrency is properly supported now allowing the frame update thread to update textures concurrently.
The final fix to micro stuttering was to change the render loop to be loosely coupled to the fps limiter. Now when a new frame arrives it can trigger the render loop to run even if the fps limiter has not yet timed out. This not only resolves the primary cause of micros suttering, but also means we no longer need to have the FPS limit default to 2x the refresh rate.
Capturing the secure desktop (UAC/Lock Screen/Task Manger), etc.
If the looking glass host is run using
PsExec as the SYSTEM account it is now able to capture the secure desktop. As
PsExec is a microsoft tool you will need to procure this from them should you desire this feature.
PsExec64.exe -s -i -d C:\\path\\to\\looking\\glass\\looking-glass-host.exe
A scheduled task can be created to run this at startup.
Way too many to list… tons of Quality of Life fixes, etc.