]> git.tdb.fi Git - libs/gl.git/commitdiff
Use SimpleWindow::tick in viewer
authorMikko Rasa <tdb@tdb.fi>
Wed, 3 Nov 2010 07:00:19 +0000 (07:00 +0000)
committerMikko Rasa <tdb@tdb.fi>
Wed, 3 Nov 2010 07:00:19 +0000 (07:00 +0000)
Add destructor to viewer for cleaning up

viewer.cpp

index 5ddda4792ad6d45945523d986067e0a1c340bf57..43036209b50b68c171060c7d19afc588f475cbc7 100644 (file)
@@ -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);