#ifndef VIEWER_H
#define VIEWER_H

#include "opengl.h"
#include "shader.h"
#include "mesh.h"
#include "camera.h"

#include <iostream>

class Viewer{
 public:
   //! Constructor
   Viewer();
   virtual ~Viewer();
   
   // gl stuff
   void init(int w, int h);
   void display();
   void update(float time);
   void reshape(int w, int h);
   void createScene();
   void loadPrograms();
   void reloadPrograms();

   
   // events
   void mousePressed(GLFWwindow* window, int button, int action);
   void mouseMoved(int x, int y);
   void mouseScroll(double x, double y);
   void keyPressed(int key, int action, int mods);
   void charPressed(int key);
   
 private:
   int _winWidth, _winHeight;

   Shader _prog;
   Mesh _mesh;
   Camera _cam;
};

#endif
