Skip to content

Commit

Permalink
fix const array and InterleavedBufferAttribute case
Browse files Browse the repository at this point in the history
  • Loading branch information
markaren committed Feb 29, 2024
1 parent 0d4abb8 commit 9c4e856
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/threepp/core/BufferAttribute.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ namespace threepp {
return array_;
}

const std::vector<T>& array() const {
virtual const std::vector<T>& array() const {

return array();
return array_;
}

TypedBufferAttribute<T>& copyAt(unsigned int index1, const TypedBufferAttribute<T>& attribute, unsigned int index2) {
Expand Down
5 changes: 5 additions & 0 deletions include/threepp/core/InterleavedBufferAttribute.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ namespace threepp {
return data->array();
}

[[nodiscard]] const std::vector<float>& array() const override {

return data->array();
}

[[nodiscard]] int count() const override {

return data->count();
Expand Down

0 comments on commit 9c4e856

Please sign in to comment.