ARToolKit Wrapper for UWP (Universal Windows Platform)
Author: Long Qian
Date: 2020-04-19
ARWrapper library provided by ARToolKit is compatible with multiple platforms, but not with UWP yet. This project intends to fill this gap. The native library built by this project consumes UWP runtime, and can be accessed by .NET applications via PInovoke.
Starting v0.3, ARToolKitUWP supports HoloLens 2 (ARM64) in addition to HoloLens 1 (x86).
ARToolKitUWP.sln
solution builds a dynamic link library for x86 or ARM64, namely, ARToolKitUWP.dll
. This library incorperates the following ARToolKit (v5.3.2) components:
- AR.lib
- ARICP.lib
- ARMulti.lib
Therefore, this wrapper is capable of detecting single-pattern markers and multi-pattern markers. NFT (Natural Feature Marker) is not supported right now, because of its various unsatisfied dependencies on UWP.
The exported functions from this dll are listed in ARToolKitUWP/include/ARToolKitUWP.h
.
- Make sure you have Visual Studio 2017 and Windows 10 SDK installed.
- Open solution file
ARToolKitUWP.sln
, choose configurationRelease, Win32
orRelease, ARM64
, and hitBuild Solution
. - Find the
ARToolKitUWP.dll
file at the output directory. Simple.
Place the built library in Unity project folder: Assets/ARToolKitUWP/Plugins/WSA/x86/
or Assets/ARToolKitUWP/Plugins/WSA/ARM64/
. In the Unity inspector, these libraries need to be manually set for WSAPlayer
and the correct CPU architecture.
ARToolKitUWP is open for use in compliance with GNU Lesser General Public License (LGPL v3.0). Please see COPYING and COPYING.LESSER for license details.
ARToolKitUWP is a modified version of ARToolKit, statically links against ARToolKit binaries, and therefore complies with the license restrictions of ARToolKit (see details).