From 5e435ce171da7fdf07722e503add7501e9d79bb9 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 3 Nov 2010 07:00:19 +0000 Subject: [PATCH] Use SimpleWindow::tick in viewer Add destructor to viewer for cleaning up --- viewer.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/viewer.cpp b/viewer.cpp index 5ddda479..43036209 100644 --- a/viewer.cpp +++ b/viewer.cpp @@ -44,6 +44,7 @@ private: public: Viewer(int, char **); + ~Viewer(); virtual int main(); private: @@ -110,6 +111,12 @@ Viewer::Viewer(int argc, char **argv): camera.look_at(GL::Vector3(0, 0, 0)); } +Viewer::~Viewer() +{ + delete object; + delete mesh; +} + int Viewer::main() { window.show(); @@ -118,7 +125,7 @@ int Viewer::main() void Viewer::tick() { - window.get_display().tick(); + window.tick(); GL::Framebuffer::system().clear(GL::COLOR_BUFFER_BIT|GL::DEPTH_BUFFER_BIT); -- 2.45.2