mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-25 22:18:34 +01:00
copy vertex data more efficiently
This commit is contained in:
parent
04dc2bf2d0
commit
e5593f2132
1 changed files with 1 additions and 2 deletions
|
@ -77,8 +77,7 @@ namespace MLEM.Misc {
|
|||
var totalIndex = 0;
|
||||
while (totalIndex < this.vertices.Count) {
|
||||
var now = Math.Min(this.vertices.Count - totalIndex, Data.Length);
|
||||
for (var i = 0; i < now; i++)
|
||||
Data[i] = this.vertices[totalIndex + i];
|
||||
this.vertices.CopyTo(totalIndex, Data, 0, now);
|
||||
this.vertexBuffers[arrayIndex++].SetData(Data);
|
||||
totalIndex += now;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue