Qualcomm技术william hill官网
直播中

刘雪映

7年用户 214经验值
私信 关注
[经验]

Qualcomm_Snapdragon_VR_SDK SvrPluginAndroid脚本简介(14)

public override void Shutdown()
        {
IssueEvent (RenderEvent.Shutdown);
base.Shutdown();
        }
public override bool PollEvent(ref SvrManager.SvrEvent frameEvent)
{
uint[] dataBuffer = new uint[2];
int dataCount = Marshal.SizeOf(frameEvent.eventData) / sizeof(uint);
                int eventType = 0;
bool isEvent = SvrPollEvent(ref eventType, ref frameEvent.deviceId, ref frameEvent.eventtimeStamp, dataCount, dataBuffer);
                frameEvent.eventType = (SvrManager.svrEventType)(eventType);
switch (frameEvent.eventType)
{
case SvrManager.svrEventType.kEventThermal:
//Debug.LogFormat("PollEvent: data {0} {1}", dataBuffer[0], dataBuffer[1]);
frameEvent.eventData.thermal.zone = (SvrManager.svrThermalZone)dataBuffer[0];
frameEvent.eventData.thermal.level = (SvrManager.svrThermalLevel)dataBuffer[1];
break;
}
return isEvent;
}在SvrPluginAndroid脚本中提供了Shutdown方法,向底层代码中发送RenderEvent.Shutdown事件,作用是关闭当前的VR模式,与Endvr不同的是 shutdown调用之后无法通过BeginVR重新开启vr模式。

更多回帖

发帖
×
20
完善资料,
赚取积分