/// <summary>
        /// Creates a new TextureSwapChain.
        /// </summary>
        /// <param name="ovr">Interface to Oculus runtime methods.</param>
        /// <param name="session">Session of the Hmd owning this texture swap chain.</param>
        /// <param name="textureSwapChainPtr">Unmanaged texture swap chain.</param>
        public TextureSwapChain(OVRBase ovr, ovrSession session, ovrTextureSwapChain textureSwapChainPtr)
        {
            if (ovr == null)
            {
                throw new ArgumentNullException("ovr");
            }
            if (session == null)
            {
                throw new ArgumentNullException("session");
            }
            if (textureSwapChainPtr == IntPtr.Zero)
            {
                throw new ArgumentNullException("textureSwapChain");
            }

            OVR                 = ovr;
            Session             = session;
            TextureSwapChainPtr = textureSwapChainPtr;
        }
示例#2
0
        /// <summary>
        /// Creates a new MirrorTexture.
        /// </summary>
        /// <param name="ovr">Interface to Oculus runtime methods.</param>
        /// <param name="session">Session of the Hmd owning this mirror texture.</param>
        /// <param name="mirrorTexturePtr">Unmanaged mirror texture.</param>
        public MirrorTexture(OVRBase ovr, ovrSession session, IntPtr mirrorTexturePtr)
        {
            if (ovr == null)
            {
                throw new ArgumentNullException("ovr");
            }
            if (session == null)
            {
                throw new ArgumentNullException("session");
            }
            if (mirrorTexturePtr == IntPtr.Zero)
            {
                throw new ArgumentNullException("mirrorTexturePtr");
            }

            OVR              = ovr;
            Session          = session;
            MirrorTexturePtr = mirrorTexturePtr;
        }