Skip to content

Commit

Permalink
Make Mesh::add_*_attribute() take const ptrs
Browse files Browse the repository at this point in the history
  • Loading branch information
SirBob01 committed Oct 25, 2024
1 parent 483702d commit 494b192
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Graphics/Mesh.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ namespace Dynamo::Graphics {
* @param count
*/
template <typename T>
void add_vertex_attribute(T *array) {
void add_vertex_attribute(const T *array) {
attributes.emplace_back();
AttributeBuffer &buffer = attributes.back();
buffer.resize(vertex_count * sizeof(T));
Expand All @@ -79,7 +79,7 @@ namespace Dynamo::Graphics {
* @param count
*/
template <typename T>
void add_instance_attribute(T *array) {
void add_instance_attribute(const T *array) {
attributes.emplace_back();
AttributeBuffer &buffer = attributes.back();
buffer.resize(instance_count * sizeof(T));
Expand Down

0 comments on commit 494b192

Please sign in to comment.