#ifndef MODELLOADER_H
#define MODELLOADER_H

#include <QMatrix4x4>
#include <QVector2D>
#include<QQuickView>
#include<QOpenGLTexture>
#include"loadmodel.h"


class ModelLoader : public QQuickItem
{
      Q_OBJECT

public:  
    explicit ModelLoader();
    ~ModelLoader();
  //  Q_INVOKABLE void setTexturename();
public slots:
    void initializeGL();
    void paintGL();
private slots:
    void handleWindowChanged(QQuickWindow *win);
private:
    QOpenGLShaderProgram program;
    LoadModel model;
    QString texturename;
    int matrixUniform1;
    int vertexLocation;
    int normalLocation;
    int texcoordLocation;
    QOpenGLTexture* m_tex;
};
#endif // MODELLOADER_H





