Improve XML docs for ReadWriteTexture[2D|3D]<T, TPixel>.AsReadOnly()
このコミットが含まれているのは:
1 親
40d3cd0182
コミット
e74ad2cd34
2ファイル変更
+28
-2
検索条件に一致するファイルはありません
@@ -25,7 +25,20 @@ partial class ReadWriteTexture2D<T, TPixel>
|
||||
/// Retrieves a wrapping <see cref="IReadOnlyTexture2D{TPixel}"/> instance for the current resource.
|
||||
/// </summary>
|
||||
/// <returns>An <see cref="IReadOnlyTexture2D{TPixel}"/> instance wrapping the current resource.</returns>
|
||||
/// <remarks>The returned instance can be used in a shader to enable texture sampling.</remarks>
|
||||
/// <remarks>
|
||||
/// <para>The returned instance can be used in a shader to enable texture sampling.</para>
|
||||
/// <para>
|
||||
/// This is an advanced API that can only be used after the current instance has been transitioned to be in a readonly state. To do so,
|
||||
/// use <see cref="ComputeContextExtensions.Transition{T, TPixel}(in ComputeContext, ReadWriteTexture2D{T, TPixel}, ResourceState)"/>,
|
||||
/// and specify <see cref="ResourceState.ReadOnly"/>. After that, <see cref="AsReadOnly"/> can be used to get a readonly wrapper for
|
||||
/// the current texture to use in a shader. This instance should not be cached or reused, but just passed directly to a shader
|
||||
/// being dispatched through that same <see cref="ComputeContext"/>, as it will not work if the texture changes state later on.
|
||||
/// Before the end of that list of operations, the texture also needs to be transitioned back to writeable state, using the same
|
||||
/// API as before but specifying <see cref="ResourceState.ReadWrite"/>. Failing to do so results in undefined behavior.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
/// <exception cref="ObjectDisposedException">Thrown if the current instance or its associated device are disposed.</exception>
|
||||
/// <exception cref="InvalidOperationException">Thrown if the current instance is not in a readonly state.</exception>
|
||||
public IReadOnlyTexture2D<TPixel> AsReadOnly()
|
||||
{
|
||||
GraphicsDevice.ThrowIfDisposed();
|
||||
|
||||
@@ -25,7 +25,20 @@ partial class ReadWriteTexture3D<T, TPixel>
|
||||
/// Retrieves a wrapping <see cref="IReadOnlyTexture3D{TPixel}"/> instance for the current resource.
|
||||
/// </summary>
|
||||
/// <returns>An <see cref="IReadOnlyTexture3D{TPixel}"/> instance wrapping the current resource.</returns>
|
||||
/// <remarks>The returned instance can be used in a shader to enable texture sampling.</remarks>
|
||||
/// <remarks>
|
||||
/// <para>The returned instance can be used in a shader to enable texture sampling.</para>
|
||||
/// <para>
|
||||
/// This is an advanced API that can only be used after the current instance has been transitioned to be in a readonly state. To do so,
|
||||
/// use <see cref="ComputeContextExtensions.Transition{T, TPixel}(in ComputeContext, ReadWriteTexture3D{T, TPixel}, ResourceState)"/>,
|
||||
/// and specify <see cref="ResourceState.ReadOnly"/>. After that, <see cref="AsReadOnly"/> can be used to get a readonly wrapper for
|
||||
/// the current texture to use in a shader. This instance should not be cached or reused, but just passed directly to a shader
|
||||
/// being dispatched through that same <see cref="ComputeContext"/>, as it will not work if the texture changes state later on.
|
||||
/// Before the end of that list of operations, the texture also needs to be transitioned back to writeable state, using the same
|
||||
/// API as before but specifying <see cref="ResourceState.ReadWrite"/>. Failing to do so results in undefined behavior.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
/// <exception cref="ObjectDisposedException">Thrown if the current instance or its associated device are disposed.</exception>
|
||||
/// <exception cref="InvalidOperationException">Thrown if the current instance is not in a readonly state.</exception>
|
||||
public IReadOnlyTexture3D<TPixel> AsReadOnly()
|
||||
{
|
||||
GraphicsDevice.ThrowIfDisposed();
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする