Make sure to actually use the vector write proxies.

This commit is contained in:
Relintai 2021-08-11 18:39:03 +02:00
parent aa47e344fd
commit e0ee26fc61

View File

@ -147,7 +147,11 @@ Array MeshMerger::build_mesh() {
#endif
for (int i = 0; i < _vertices.size(); ++i) {
#if !GODOT4
w[i] = _vertices[i].vertex;
#else
array.set(i, _vertices[i].vertex);
#endif
}
#if !GODOT4
@ -169,7 +173,11 @@ Array MeshMerger::build_mesh() {
#endif
for (int i = 0; i < _vertices.size(); ++i) {
#if !GODOT4
w[i] = _vertices[i].normal;
#else
array.set(i, _vertices[i].normal);
#endif
}
#if !GODOT4
@ -186,7 +194,11 @@ Array MeshMerger::build_mesh() {
#endif
for (int i = 0; i < _vertices.size(); ++i) {
#if !GODOT4
w[i] = _vertices[i].color;
#else
array.set(i, _vertices[i].color);
#endif
}
#if !GODOT4
@ -203,7 +215,11 @@ Array MeshMerger::build_mesh() {
#endif
for (int i = 0; i < _vertices.size(); ++i) {
#if !GODOT4
w[i] = _vertices[i].uv;
#else
array.set(i, _vertices[i].uv);
#endif
}
#if !GODOT4
@ -221,7 +237,11 @@ Array MeshMerger::build_mesh() {
#endif
for (int i = 0; i < _vertices.size(); ++i) {
#if !GODOT4
w[i] = _vertices[i].uv2;
#else
array.set(i, _vertices[i].uv2);
#endif
}
#if !GODOT4
@ -295,7 +315,11 @@ Array MeshMerger::build_mesh() {
#endif
for (int i = 0; i < _indices.size(); ++i) {
#if !GODOT4
w[i] = _indices[i];
#else
array.set(i, _indices[i]);
#endif
}
#if !GODOT4