コード例 #1
0
        private void _UpdateDisplayGeometry()
        {
            if (!m_CachedScreenOrientation.HasValue ||
                Screen.orientation != m_CachedScreenOrientation)
            {
                m_CachedScreenOrientation = Screen.orientation;
                m_CachedDisplayRotation   = AndroidNativeHelper.GetDisplayRotation();
            }

            ExternApi.ArPresto_setDisplayGeometry(
                m_CachedDisplayRotation, Screen.width, Screen.height);
        }
コード例 #2
0
        private void _UpdateDisplayGeometry()
        {
            IntPtr sessionHandle = IntPtr.Zero;

            ExternApi.ArPresto_getSession(ref sessionHandle);

            if (sessionHandle == IntPtr.Zero)
            {
                return;
            }

            if (!m_CachedScreenOrientation.HasValue || Screen.orientation != m_CachedScreenOrientation)
            {
                m_CachedScreenOrientation = Screen.orientation;
                m_CachedDisplayRotation   = AndroidNativeHelper.GetDisplayRotation();
            }

            ExternApi.ArSession_setDisplayGeometry(sessionHandle, (int)m_CachedDisplayRotation, Screen.width,
                                                   Screen.height);
        }
コード例 #3
0
 public static extern void ArPresto_setDisplayGeometry(
     AndroidNativeHelper.AndroidSurfaceRotation rotation, int width, int height);