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模式。



阅读更多
上一篇Qualcomm_Snapdragon_VR_SDK SvrPluginAndroid脚本简介(13)
下一篇Qualcomm_Snapdragon_VR_SDK SvrPluginAndroid脚本简介(15)
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭