diff options
author | Spartan322 <Megacake1234@gmail.com> | 2024-10-14 02:57:59 -0400 |
---|---|---|
committer | Spartan322 <Megacake1234@gmail.com> | 2024-10-14 02:57:59 -0400 |
commit | 22d604c80d9ffd7ad72b06458a2e8e72ee5737e3 (patch) | |
tree | 176614fa17d6a68691b5f27f8e5f7d9b4dd17729 /servers/rendering/renderer_rd/storage_rd | |
parent | 83d65738b06986e5aa0943cae01e357133e04a75 (diff) | |
parent | 92e51fca7247c932f95a1662aefc28aca96e8de6 (diff) | |
download | redot-engine-22d604c80d9ffd7ad72b06458a2e8e72ee5737e3.tar.gz |
Merge commit godotengine@92e51fca7247c932f95a1662aefc28aca96e8de6
Diffstat (limited to 'servers/rendering/renderer_rd/storage_rd')
-rw-r--r-- | servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp | 7 | ||||
-rw-r--r-- | servers/rendering/renderer_rd/storage_rd/mesh_storage.h | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp b/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp index 3df9ef9858..26bfac1aed 100644 --- a/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp +++ b/servers/rendering/renderer_rd/storage_rd/mesh_storage.cpp @@ -2187,7 +2187,7 @@ void MeshStorage::skeleton_allocate_data(RID p_skeleton, int p_bones, bool p_2d_ if (skeleton->size) { skeleton->data.resize(skeleton->size * (skeleton->use_2d ? 8 : 12)); skeleton->buffer = RD::get_singleton()->storage_buffer_create(skeleton->data.size() * sizeof(float)); - memset(skeleton->data.ptrw(), 0, skeleton->data.size() * sizeof(float)); + memset(skeleton->data.ptr(), 0, skeleton->data.size() * sizeof(float)); _skeleton_make_dirty(skeleton); @@ -2221,7 +2221,7 @@ void MeshStorage::skeleton_bone_set_transform(RID p_skeleton, int p_bone, const ERR_FAIL_INDEX(p_bone, skeleton->size); ERR_FAIL_COND(skeleton->use_2d); - float *dataptr = skeleton->data.ptrw() + p_bone * 12; + float *dataptr = skeleton->data.ptr() + p_bone * 12; dataptr[0] = p_transform.basis.rows[0][0]; dataptr[1] = p_transform.basis.rows[0][1]; @@ -2272,8 +2272,7 @@ void MeshStorage::skeleton_bone_set_transform_2d(RID p_skeleton, int p_bone, con ERR_FAIL_NULL(skeleton); ERR_FAIL_INDEX(p_bone, skeleton->size); ERR_FAIL_COND(!skeleton->use_2d); - - float *dataptr = skeleton->data.ptrw() + p_bone * 8; + float *dataptr = skeleton->data.ptr() + p_bone * 8; dataptr[0] = p_transform.columns[0][0]; dataptr[1] = p_transform.columns[1][0]; diff --git a/servers/rendering/renderer_rd/storage_rd/mesh_storage.h b/servers/rendering/renderer_rd/storage_rd/mesh_storage.h index 46d685eb18..a9ac1b7e14 100644 --- a/servers/rendering/renderer_rd/storage_rd/mesh_storage.h +++ b/servers/rendering/renderer_rd/storage_rd/mesh_storage.h @@ -314,7 +314,7 @@ private: struct Skeleton { bool use_2d = false; int size = 0; - Vector<float> data; + LocalVector<float> data; RID buffer; bool dirty = false; |