/// <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 Result GetCurrentIndex(out int index) { if (IsDisposed) { throw new ObjectDisposedException("TextureSwapChain"); } return(_ovr.GetTextureSwapChainCurrentIndex(_sessionPtr, TextureSwapChainPtr, out index)); }
public void Commit() { var result = _ovr.CommitTextureSwapChain(_sessionPtr, _textureSwapChainPtr); if (result < Ab3d.OculusWrap.Result.Success) { var lastError = _ovr.GetLastErrorInfo(); throw new OvrException("Commit failed: " + lastError.ErrorString, lastError.Result); } result = _ovr.GetTextureSwapChainCurrentIndex(_sessionPtr, _textureSwapChainPtr, out _currentIndex); if (result < Ab3d.OculusWrap.Result.Success) { var lastError = _ovr.GetLastErrorInfo(); throw new OvrException(lastError.ErrorString, lastError.Result); } }