/// <summary>
        /// Gets the current index in the TextureSwapChain.
        /// </summary>
        /// <param name="index">Returns the current (free) index in specified chain.</param>
        /// <returns>Returns an ovrResult for which the return code is negative upon error. </returns>
        public OVRTypes.Result GetCurrentIndex(out int index)
        {
            if (Disposed)
            {
                throw new ObjectDisposedException("TextureSwapChain");
            }

            return(OVR.GetTextureSwapChainCurrentIndex(Session, TextureSwapChainPtr, out index));
        }