diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2020-07-03 19:41:27 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-04 00:41:27 +0200 |
| commit | dbeb50684d24bf43c2bdbc087f6b1f52f385acf2 (patch) | |
| tree | 587a270df01e8f8f7b189d5911cf368aa879a8e1 /Ryujinx.Graphics.Gpu/Memory | |
| parent | b0d9ec8a8202039b21fb799707c8d26f37c4fbfd (diff) | |
Support inline index buffer data (#1351)
* Support inline index buffer data
* Sort usings
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Memory')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Memory/BufferManager.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs b/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs index 39d1cd6f..533b0576 100644 --- a/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs +++ b/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs @@ -104,6 +104,18 @@ namespace Ryujinx.Graphics.Gpu.Memory } /// <summary> + /// Sets a new index buffer that overrides the one set on the call to <see cref="CommitGraphicsBindings"/>. + /// </summary> + /// <param name="buffer">Buffer to be used as index buffer</param> + /// <param name="type">Type of each index buffer element</param> + public void SetIndexBuffer(BufferRange buffer, IndexType type) + { + _context.Renderer.Pipeline.SetIndexBuffer(buffer, type); + + _indexBufferDirty = true; + } + + /// <summary> /// Sets the memory range with vertex buffer data, to be used for subsequent draw calls. /// </summary> /// <param name="index">Index of the vertex buffer (up to 16)</param> |
