src | 从中复制计数器的附加/使用缓冲区。 |
dst | 要将计数器复制到的缓冲区。 |
dstOffsetBytes |
dst 中的目标字节偏移。 |
将附加/使用缓冲区的计数器值复制到另一个缓冲区。
附加/使用和计数器缓冲区(请参阅 ComputeBufferType.Append、ComputeBufferType.Counter)使用一个特殊的计数器变量记录其中的元素数。CopyCount 从 src
缓冲区将其计数器
值复制到 dst
缓冲区中的给定字节偏移位置。
其最常与 Graphics.DrawProceduralIndirect 结合使用,
以渲染任意数量的图元,不必将它们的计数读回到 CPU。
DX11 上存在对 dst
缓冲区的限制 - 该缓冲区必须以 ComputeBufferType.Raw 或 ComputeBufferType.IndirectArguments 类型创建。在其他平台上,dst
可以是任何类型。
另请参阅:SetCounterValue。
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.