Example using C to use the OpenVR GetMirrorTextureD3D11 and process it. Also more in general a "how to use directx with c" for certain values of DirectX.
In general:
- You get the system layer, so things like chaperone will draw on top, and you won't be pixel perfect from what the game gives you.
- Oddly enough, it doesn't seem like this gets reprojected with motion.
- It consumes a nontrival amount of CPU resources.
- Now here's an example for how to grab what the user is seeing with OpenVR.
- I finally have an example doing DirectX stuff in C.
You will need the 3.8MB TinyCC Toolchain, available here: https://github.com/cnlohr/tinycc-win64-installer/releases/tag/v0_0.9.27 Install to a system-reachable path.
SteamVR 1.27 or higher.