WVR_ShowPassthroughOverlay

WVR_EXPORT bool WVR_ShowPassthroughOverlay(bool show)

Function to show the passthrough overlay.

Use this function to also decide whether the passthrough overlay should be shown or not. This function must be called after calling WVR_RenderInit().

Version
API Level 5
Note
Supported from Runtime version 5 or higher (certain devices only). Make sure the target device supports passthrough overlay by calling WVR_GetSupportedFeatures() and checking WVR_SupportedFeature_PassthroughOverlay. Calling this API on render thread is not recommended due to IPC with Passthrough service.
Parameters
  • Show: or hide passthrough overlay.
Return Value
  • true: The setting is valid.
  • false: The setting is invalid.

How to use

The following example shows the passthrough overlay:

#include <wvr/wvr_arena.h>

void showPassThrough() {
    uint64_t support = WVR_GetSupportedFeatures();
    if (support & WVR_SupportedFeature_PassthroughOverlay) {
        WVR_ShowPassthroughOverlay(true);
    }
}

void main() {
    WVR_RenderError pError = WVR_RenderInit(&param);
    showPassThrough();
}