diff --git a/src/Sprite.hpp b/src/Sprite.hpp index 68f8928..0241817 100644 --- a/src/Sprite.hpp +++ b/src/Sprite.hpp @@ -29,11 +29,13 @@ namespace sb private: - /* The plane is included using composition instead of inheritance, allowing the user to define a custom plane. */ + /* The plane is a class member rather than the class's inherited type, allowing the user to define a custom plane. When the sprite is copied, + * the plane is copied with its references to GPU memory preserved. */ sb::Plane plane; - /* Keep a reference of the matrix transformations generated when the user applies a transformation, so that each can be reapplied - * without having to set all the transformations every time one is changed. */ + /* Keep a copy of the matrix transformations generated when the user applies a transformation, so that each can be reapplied + * without having to set all the transformations every time one is changed. When the sprite is copied, the transformation values are + * copied to the new object, so the new sprite can alter the transformations independently. */ glm::mat4 _scale {1.0f}, _translation {1.0f}, _rotation {1.0f}; /* A sprite by definition has only one texture per draw, so keep an index to the currently active texture. */ diff --git a/src/Texture.cpp b/src/Texture.cpp index 2895611..2bcc489 100644 --- a/src/Texture.cpp +++ b/src/Texture.cpp @@ -165,7 +165,7 @@ void Texture::bind() const message << "Cannot bind texture that has not been generated yet."; if (!path.empty()) { - message << " Texture path is \"" << path << "\"."; + message << " Texture path is " << path << "."; } throw std::runtime_error(message.str()); }