A small library for duplicating your desktop window within a StereoKit application on Windows.
To use this library, you do not need to clone this repository, simply add the StereoKit.DesktopMirror NuGet package to your project! You can do this via Visual Studio's NuGet package manager UI, or via CLI like so:
dotnet add package StereoKit.DesktopMirror
To use this functionality in your project, the simplest thing to do is add the DesktopMirror
IStepper
once, anytime in your StereoKit project.
SK.AddStepper<DesktopMirror>();
For more advanced usage, for example if you would like to apply the desktop texture to some other surface in your project, you can use the DesktopMaterial
directly:
DesktopMaterial desktop = new DesktopMaterial();
desktop.Start();
SK.Run(() => {
desktop.Step();
Mesh.Cube.Draw(desktop.Material, Matrix.TS(0,0,-0.5f, 0.2f));
});
If you wish to contribute changes or improvements to DesktopMirror, you can clone and modify the package source at https://github.com/StereoKit/StereoKit.DesktopMirror.