Add destructor to viewer for cleaning up
public:
Viewer(int, char **);
+ ~Viewer();
virtual int main();
private:
camera.look_at(GL::Vector3(0, 0, 0));
}
+Viewer::~Viewer()
+{
+ delete object;
+ delete mesh;
+}
+
int Viewer::main()
{
window.show();
void Viewer::tick()
{
- window.get_display().tick();
+ window.tick();
GL::Framebuffer::system().clear(GL::COLOR_BUFFER_BIT|GL::DEPTH_BUFFER_BIT);