public static IssueWithData ( RenderEventType eventType, int eventData ) : void | ||
eventType | RenderEventType | |
eventData | int | |
return | void |
/// <summary> /// Issues Camera EndFrame Plugin Event /// </summary> public void CameraEndFrame(RenderEventType eventType) { int offs = (eventType == RenderEventType.LeftEyeEndFrame) ? 0 : 1; int texId = CameraTextureIds[EyeBufferNum[CurrEyeBufferIdx] * 2 + offs]; //Debug.Log( "CameraTextureId[ " + offs + "] = " + texId ); OVRPluginEvent.IssueWithData(eventType, texId); }
public static void EndEye(OVREye eye, int eyeTextureId) { #if UNITY_ANDROID && !UNITY_EDITOR RenderEventType eventType = (eye == OVREye.Left) ? RenderEventType.LeftEyeEndFrame : RenderEventType.RightEyeEndFrame; OVRPluginEvent.IssueWithData(eventType, eyeTextureId); #endif }
/// <summary> /// Marks the beginning of all rendering. /// </summary> public void BeginFrame() { bool updateFrameCount = !(OVRManager.instance.timeWarp && OVRManager.instance.freezeTimeWarp); if (updateFrameCount) { frameCount++; } OVRPluginEvent.IssueWithData(RenderEventType.BeginFrame, frameCount); }
IEnumerator CallPluginEndOfFrame() { while (true) { yield return(new WaitForEndOfFrame()); // Pass down the TimeWarpViewNumber aquired during CameraController.Update() // to link which sensor reading is associated with these images. OVRPluginEvent.IssueWithData(RenderEventType.TimeWarp, TimeWarpViewNumber); } }
/// <summary> /// Marks the beginning of all rendering. /// </summary> public void BeginFrame() { #if (!UNITY_ANDROID || UNITY_EDITOR) bool updateFrameCount = !(OVRManager.instance.timeWarp && OVRManager.instance.freezeTimeWarp); if (updateFrameCount) { timeWarpViewNumber++; } OVRPlugin.Update(timeWarpViewNumber); OVRPluginEvent.IssueWithData(RenderEventType.BeginFrame, timeWarpViewNumber); #endif if (UpdatedTracking != null) { UpdatedTracking(); } }
public static void DoTimeWarp(int timeWarpViewNumber) { #if UNITY_ANDROID && !UNITY_EDITOR OVRPluginEvent.IssueWithData(RenderEventType.TimeWarp, timeWarpViewNumber); #endif }
/// <summary> /// Marks the end of all rendering. /// </summary> public void EndFrame() { OVRPluginEvent.IssueWithData(RenderEventType.TimeWarp, timeWarpViewNumber); }