简体中文 | English

sdkDpnGetVersion

public native int sdkDpnGetVersion();

Get SDK Runtime version number.

The format of version number will be defined by DPNN_RUNTIME_VERSION.

sdkDpnnInit

public native boolean sdkDpnnInit(int apiVersion, DpnnUsageMode dpnnUsageMode, DpnnDeviceType dpnnDeviceType, Activity context);

This function used to initialize SDK.

The parameter apiVersion indicates the current version being used, shall be set to 1 currently.

The parameter dpnnUsageMode indicates the current mode used. DPNN_UM_DEFAULT mode shall be set as both helmet display and sensor. DPNN_UM_SENSOR_ONLY is just for sensing, no display. 

The parameter dpnnDeviceType refers to the type of OpenGL ES context. DPNN_DEVICE_GLES2 is OpenGL ES 2.* context; DPNN_DEVICE_GLES3 is OpenGL ES 3.* context. DPNN_DEVICE_DX11, DPNN_DEVICE_DX10, DPNN_DEVICE_DX9 not used on mobile.

The parameter context means the main activity

sdkDpnnDeinit

public native boolean sdkDpnnDeinit();

Release SDK related resources.

sdkDpnnGetDeviceInfo

public native boolean sdkDpnnGetDeviceInfo(DpnnDeviceInfo var1);

Get HMD device information, including interocular distance ipd (in meters), single eye resolution_x (in pixels) and resolution_y (in pixels); horizontal field of view fov_x (in degree) and vertical field of view fov_y (in degree), please read “DpVrView.Renderer: onSurfaceCreated” for more details.

sdkDpnnGetPose

public native void sdkDpnnGetPose(DpnnQuarterion var1);

Please call sdkDpnnGetPose to get HDM pose (orientation), please read “DpVrView.Renderer: onDrawFrame” for more details.

sdkDpnnGetPosition

public native void sdkDpnnGetPosition(DpnnVector3 var1);

Please call sdkDpnnGetPosition to get HDM tracking position when enable tracking, please read “DpVrView.Renderer: onDrawFrame” for more details.

sdkDpnnRecordPose

public native boolean sdkDpnnRecordPose(DpnnEyeType dpnnEyeType);

Record the current time sensor pose as render scene pose, which is used by timewarping. 

The parameter dpnnEyeType means which eye pose will be recorded. DPNN_EYE_LEFT for left eye, DPNN_EYE_RIGHT for right eye, DPNN_EYE_CENTER and DPNN_EYE_LEFT_RIGHT for both eyes, please read “DpVrView.Renderer: onDrawFrame” for more details.

sdkDpnnSetTexture

public native boolean sdkDpnnSetTexture(int texture, DpnnEyeType dpnnEyeType, DpnnTwType dpnnTwType);

This function set off-screen render texture to do distortion and time warping, then show on display.

The parameter texture refers to the pointer of actual texture. It shall be set up as texture id of OpenGL ES and there must be letterbox (at least one pixel) with black transparent color.

The parameter dpnnEyeType means texture represents which eye. DPNN_EYE_LEFT for left eye, DPNN_EYE_RIGHT for right eye, DPNN_EYE_CENTER for both eye use the same texture, and DPNN_EYE_LEFT_RIGHT for left and right eye in one texture as left right side by side.

The parameter dpnnTwType means whether to do distortion and time warping. DPNN_TW_NONE: no distortion and time warp; DPNN_TW_DISTORTION: distortion only; DPNN_TW_TW: time warp only; DPNN_TW_TW_DISTORTION: both distortion and time warp, suggest setting this value for better effect; DPNN_TW_SCREEN/DPNN_TW_TW_SCREEN: internal use only.

sdkDpnnCompose

public native boolean sdkDpnnCompose();

Inform SDK that texture set by sdkDpnnSetTexture is ready and starting displaying.

sdkDpnnResetPose

public native boolean sdkDpnnResetPose();

Recenter sensor pose (orientation).

sdkDpnnGetLastError

public native int sdkDpnnGetLastError();

Get SDK last error. 0 means no error.

sdkDpnnSetIntValue/ sdkDpnnGetIntValue

public native boolean sdkDpnnSetIntValue(String name, int value);

public native int sdkDpnnGetIntValue(String name, int value);

Get and set SDK integrator values, current internal use only.

sdkDpnnPause

public native boolean sdkDpnnPause(int var1);

Internal use only, called by DpVrView.

sdkDpnnResume

public native boolean sdkDpnnResume(int var1);

Internal use only, called by DpVrView.


Copyright © dpvr.cn, All Rights Reserved 沪ICP备15019466号-2 (Shanghai) Shanghai Lexiang Technology Co., Ltd