WVR_StartTracker¶
-
WVR_EXPORT WVR_Result WVR_StartTracker()
Function to start the feature of the tracker.
This API will start the feature of the tracker. This API must be called by main thread.
- Version
- API Level 8
- Return Value
WVR_Success
: start the tracker feature successfully.others
: means failure. (Refer to WVR_Result.)
How to use¶
Here is an example for the function:
- Header & global variable.
#include <wvr/wvr.h> // for enum WVR_SupportedFeature
#include <wvr/wvr_tracker.h>
#include <wvr/wvr_types.h>
bool gRunningTR = false;
- Use function WVR_StartTracker to start tracker feature. (See also WVR Supported Features)
if (WVR_GetSupportedFeatures() & WVR_SupportedFeature_Tracker) { // the tracker feature is supported or not
WVR_Result res = WVR_StartTracker();
if (res == WVR_Success) gRunningTR = true;
}
Warning
This function must be called first and return WVR_Success before calling other tracker functions.