static SRWork_SeeThrough() { SRWorkModule_API.GetSeeThrougParameterBool((int)Vive.Plugin.SR.SeeThroughParam.OUTPUT_4K_READY, ref b4KImageReady); SRWorkModule_API.GetSeeThrougParameterInt((int)Vive.Plugin.SR.SeeThroughParam.OUTPUT_DISTORTED_WIDTH, ref DistortedImageWidth); SRWorkModule_API.GetSeeThrougParameterInt((int)Vive.Plugin.SR.SeeThroughParam.OUTPUT_DISTORTED_HEIGHT, ref DistortedImageHeight); SRWorkModule_API.GetSeeThrougParameterInt((int)Vive.Plugin.SR.SeeThroughParam.OUTPUT_DISTORTED_CHANNEL, ref DistortedImageChannel); SRWorkModule_API.GetSeeThrougParameterInt((int)Vive.Plugin.SR.SeeThroughParam.OUTPUT_UNDISTORTED_WIDTH, ref UndistortedImageWidth); SRWorkModule_API.GetSeeThrougParameterInt((int)Vive.Plugin.SR.SeeThroughParam.OUTPUT_UNDISTORTED_HEIGHT, ref UndistortedImageHeight); SRWorkModule_API.GetSeeThrougParameterInt((int)Vive.Plugin.SR.SeeThroughParam.OUTPUT_UNDISTORTED_CHANNEL, ref UndistortedImageChannel); //b4KImageReady = false; SRWorkModule_API.GetSeeThroug4KParameterInt((int)Vive.Plugin.SR.SeeThrough4KParam.OUTPUT_DISTORTED_4K_WIDTH, ref Distorted4KImageWidth); SRWorkModule_API.GetSeeThroug4KParameterInt((int)Vive.Plugin.SR.SeeThrough4KParam.OUTPUT_DISTORTED_4K_HEIGHT, ref Distorted4KImageHeight); SRWorkModule_API.GetSeeThroug4KParameterInt((int)Vive.Plugin.SR.SeeThrough4KParam.OUTPUT_DISTORTED_4K_CHANNEL, ref Distorted4KImageChannel); SRWorkModule_API.GetSeeThroug4KParameterInt((int)Vive.Plugin.SR.SeeThrough4KParam.OUTPUT_UNDISTORTED_4K_WIDTH, ref Undistorted4KImageWidth); SRWorkModule_API.GetSeeThroug4KParameterInt((int)Vive.Plugin.SR.SeeThrough4KParam.OUTPUT_UNDISTORTED_4K_HEIGHT, ref Undistorted4KImageHeight); SRWorkModule_API.GetSeeThroug4KParameterInt((int)Vive.Plugin.SR.SeeThrough4KParam.OUTPUT_UNDISTORTED_4K_CHANNEL, ref Undistorted4KImageChannel); //IntPtr.Zero; // see_through_data_.distorted_frame_left = IntPtr.Zero; see_through_data_.distorted_frame_right = IntPtr.Zero; see_through_data_.undistorted_frame_left = IntPtr.Zero; see_through_data_.undistorted_frame_right = IntPtr.Zero; SeeThroughDataLeftDistort = Marshal.AllocCoTaskMem(sizeof(char) * DistortedImageWidth * DistortedImageHeight * DistortedImageChannel); SeeThroughDataRighttDistort = Marshal.AllocCoTaskMem(sizeof(char) * DistortedImageWidth * DistortedImageHeight * DistortedImageChannel); see_through_data_.pose_left = Marshal.AllocCoTaskMem(sizeof(float) * 16); see_through_data_.pose_right = Marshal.AllocCoTaskMem(sizeof(float) * 16); see_through_data_.Camera_params = Marshal.AllocCoTaskMem(sizeof(char) * 1032); see_through_data_.d3d11_texture2d_shared_handle_left = Marshal.AllocCoTaskMem(IntPtr.Size); see_through_data_.d3d11_texture2d_shared_handle_right = Marshal.AllocCoTaskMem(IntPtr.Size); see_through_4k_data_.distorted_4k_frame_left = IntPtr.Zero; see_through_4k_data_.distorted_4k_frame_right = IntPtr.Zero; see_through_4k_data_.undistorted_4k_frame_left = IntPtr.Zero; see_through_4k_data_.undistorted_4k_frame_right = IntPtr.Zero; see_through_4k_data_.output4k_pose_left = Marshal.AllocCoTaskMem(sizeof(float) * 16); see_through_4k_data_.output4k_pose_right = Marshal.AllocCoTaskMem(sizeof(float) * 16); see_through_4k_data_.Camera4k_params = Marshal.AllocCoTaskMem(sizeof(char) * 1032); see_through_4k_data_.d3d11_texture2d_shared_handle_left = Marshal.AllocCoTaskMem(IntPtr.Size); see_through_4k_data_.d3d11_texture2d_shared_handle_right = Marshal.AllocCoTaskMem(IntPtr.Size); //RegisterDistortedCallback(); }