diff --git a/src/application.cpp b/src/application.cpp index c60f890..7f2498e 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -310,7 +310,6 @@ std::shared_ptr application::capture_frame() const frame->resize(w, h); // Read pixel data from framebuffer into image - unsigned char* pixels = new unsigned char[w * h * 3]; glReadBuffer(GL_BACK); glReadPixels(0, 0, w, h, GL_RGB, GL_UNSIGNED_BYTE, frame->get_pixels()); diff --git a/src/application.hpp b/src/application.hpp index 5cfbd4e..672a459 100644 --- a/src/application.hpp +++ b/src/application.hpp @@ -84,16 +84,16 @@ public: void change_state(const state_type& state); /** - * Captures a screenshot of last rendered frame. + * Captures a screenshot of the most recently rendered frame. * * @return Image containing the captured frame. */ std::shared_ptr capture_frame() const; /** - * Captures a screenshot of last rendered frame. + * Saves a PNG screenshot of the most recently rendered frame. * - * @return Image containing the captured frame. + * @param path File path to the where the screenshot should be saved. */ void save_frame(const std::string& path) const;