Varjo SDK Examples
Example can be found under \varjo-sdk\examples \Benchmark\src and you can open the project by running \varjo-sdk\examples\vs2017-x64\VarjoExamples.sln
This application renders several donuts and a background grid to stress test the Varjo API.
Use main.cpp as a starting point. It contains the main rendering loop and all the frame logic that is not related to graphics.
To learn about the renderer, check the IRenderer.cpp file. Implementation can be found from D3D11Renderer.cpp and GLRenderer.cpp depending on the rendering engine.
Gaze tracking implementation can be found in the GazeTracking.cpp file. Example include:
- Checking that gaze tracking is allowed
- Initializing gaze tracking
- Requesting gaze calibration
- Calculating relative gaze vector
- Positioning gaze in relation to user pose
- Calculating gaze position in world coordinates