Skip to main content

12 docs tagged with "C API"

View All Tags

Application Development Overview

For developers familiar with C++ but new to OpenXR, check out the OpenXR Tutorial by Khronos, the organization behind the OpenXR standard. This tutorial serves as a step-by-step guide, introducing you to essential OpenXR APIs and concepts. You will learn how to set up your development environment, initialize OpenXR, render graphics, handle input, and explore the OpenXR features and extensions. Learn More

Building Application Framework Samples

These guides go through how to build the ML C api samples, which can serve as a starting point for Native Magic Leap app development. Before building the Magic Leap Samples, make sure to complete the Environment Setup instructions.

Building via Command Line

This section outlines the steps required to build the Magic Leap OpenXR Samples using the build.py script from the command line. Before attempting to build the samples, please complete the environment setup steps in Environment Setup. The build script uses gradle to build each of the applications.

C-API Samples Overview

The list below contains descriptions of each of the C-API samples available in the ML Hub. The README.md files of each example contain instructions on how to build, install and uninstall the example, as well as its expected behavior and GUI.

HelloXR Sample Application

Khronos' OpenXR SDK Source repo includes the helloxr sample app. This application can be used as a starting point to understand the basic functionality of OpenXR on a given device.

Magic Leap OpenXR Samples

The Magic Leap Hub includes a set of samples that demonstrate some of Magic Leap's device specific features. These samples can be downloaded via ML Hub's Package Manager and then built using Android Studio or a command line interface using the build.py script.

MLSDK to OpenXR/Android APIs

This page includes a list of the MLSDK APIs and their equivalents available through OpenXR Extensions and standard Android APIs.

Modifying APK for AR

In most cases, you can simply create a new Native C++ project in Android Studio and build it for the Magic Leap 2 platform. However, if you need the output to be in AR space, there are a few modifications necessary:

OpenXR Overview

We are proud to announce that Magic Leap 2 is now conformant with OpenXR. As an early contributor in the development of OpenXR, we're committed to building an open and accessible augmented reality (AR) ecosystem that benefits enterprises and developers across industries.

Using Application Simulator

The Application Simulator can fit into your workflow in a few different ways. To decide which target mode you want to work in, first decide where your input and world data come from. There are a few different sources this data can originate from.