#ifndef GLVIEW_H
#define GLVIEW_H

#include <string>
#include <vector>
#include <list>
#include <QGLWidget>
#include <QApplication>
#include <QTimer>

#include "shader.h"
#include "mesh.h"
#include "camera.h"
#include "object.h"
#include "scene.h"
#include "texture.h"

using namespace std;
using namespace Eigen;

class GLView : public QGLWidget
{
    friend class MainWindow;
    Q_OBJECT

public:
    EIGEN_MAKE_ALIGNED_OPERATOR_NEW
    GLView(QWidget *parent = 0);
    ~GLView();

    void setScene(int scene);
    Camera* camera(){ return &_scene._camera; }
    void colorPicking(Vector2i mouse_coord);

protected:
    virtual void initializeGL();
    virtual void resizeGL(int width, int height);
    virtual void paintGL();
    void activeShaderObject();

private:
    bool _initGL;
    Scene _scene;
    Texture2D _texture;
};


#endif // GLVIEW_H
