Native C/C++ Mirror Sample Guide
Start using Meta Avatars in your native C/C++ app by experimenting with the Mirror sample included with the Meta Avatar SDK. The Mirror sample implements multiple avatar features, making it a good foundation for implementing avatars in your own code.
To use avatars in your native C/C++ application, you must download and use the Meta Avatar SDK.
- Download the Meta Avatar SDK from our Downloads page.
- Extract the contents of the ZIP archive to your local drive.
Building the Mirror Sample with Microsoft Visual Studio (Oculus Rift)
- Make sure the Rift is correctly connected to the PC.
- Download and install cmake from https://cmake.org/download.
- From a command prompt, go to
OVRAvatarSDK\Samples\Mirror\Projects\Windows
. - At the command prompt, enter
cmake .
. The project should build. - In Visual Studio, open the
Mirror.sln
file that was created at OVRAvatarSDK\Samples\Mirror\Projects\Windows
. - Press F5 to debug and run.
- Make sure the Meta Android device is correctly connected to the PC or Mac.
- Open a Windows command prompt or macOS terminal window and go to
OVRAvatarSDK\Samples\Mirror\Projects\Android
. - Enter
build.py
. The project should build. - In Android Studio, choose to open an existing project and select
OVRAvatarSDK\Samples\Mirror\Projects\Android
. - After the project has loaded, select Run > Run ‘Android’ to debug and run.