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

            return(OVR.GetTextureSwapChainLength(Session, TextureSwapChainPtr, out length));
        }