mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-26 06:28:35 +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;
|
var totalIndex = 0;
|
||||||
while (totalIndex < this.vertices.Count) {
|
while (totalIndex < this.vertices.Count) {
|
||||||
var now = Math.Min(this.vertices.Count - totalIndex, Data.Length);
|
var now = Math.Min(this.vertices.Count - totalIndex, Data.Length);
|
||||||
for (var i = 0; i < now; i++)
|
this.vertices.CopyTo(totalIndex, Data, 0, now);
|
||||||
Data[i] = this.vertices[totalIndex + i];
|
|
||||||
this.vertexBuffers[arrayIndex++].SetData(Data);
|
this.vertexBuffers[arrayIndex++].SetData(Data);
|
||||||
totalIndex += now;
|
totalIndex += now;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue