Added single-element indexers for texture types

このコミットが含まれているのは:
Sergio Pedri committed 2020-12-07 17:08:14 +01:00
1 親 04e3dbc316
コミット c262cd5519
5ファイル変更
+38 -4

検索条件に一致するファイルはありません

+10 -2
ファイルの表示
@@ -28,11 +28,19 @@ namespace ComputeSharp
}
/// <summary>
/// Gets or sets a single <typeparamref name="T"/> value from the current readonly texture.
/// Gets a single <typeparamref name="T"/> value from the current writeable texture.
/// </summary>
/// <param name="x">The horizontal offset of the value to get.</param>
/// <param name="y">The vertical offset of the value to get.</param>
/// <remarks>This API can only be used from a compute shader, and will always throw if used anywhere else.</remarks>
public ref T this[int x, int y] => throw new InvalidExecutionContextException($"{nameof(ReadWriteTexture2D<T>)}<T>[int,int]");
/// <summary>
/// Gets or sets a single <typeparamref name="T"/> value from the current writeable texture.
/// </summary>
/// <param name="xy">The coordinates of the value to get.</param>
/// <remarks>This API can only be used from a compute shader, and will always throw if used anywhere else.</remarks>
public ref T this[Int2 xy] => throw new InvalidExecutionContextException($"{nameof(ReadOnlyTexture2D<T>)}<T>[Int2]");
public ref T this[Int2 xy] => throw new InvalidExecutionContextException($"{nameof(ReadWriteTexture2D<T>)}<T>[Int2]");
/// <inheritdoc/>
public override string ToString()