added open file ability from the old project to Qt,

texture seams not to open,
texture display does not work
This commit is contained in:
Anakin
2016-12-12 16:47:38 +01:00
parent 1cc4f1ca90
commit 481256e8ea
7 changed files with 283 additions and 107 deletions

View File

@@ -6,7 +6,7 @@
#include <QOpenGlShaderProgram>
#include <QOpenGlTexture>
#include <QImage>
#include "..\Header\MshFile.h"
#include "..\Header\FileInterface.h"
struct Vertex {
GLfloat position[3];
@@ -30,8 +30,8 @@ private:
QOpenGLShaderProgram* m_program = nullptr;
// Data ========================================
std::vector<Model*>* m_vModels = nullptr;
std::vector<QImage*> m_vTextures;
std::vector<Model*>* m_vModels = nullptr;
std::vector<QImage*>* m_vTextures = nullptr;
BoundingBox m_sceneBoundings;
// Transformation ==============================
@@ -49,13 +49,13 @@ private:
private:
virtual void initializeGL() override final;
virtual void resizeGL(int w, int h) override final;
virtual void paintGL() override final;
void printContextInformation();
QMatrix4x4 getModelMatrix(unsigned int index) const;
QMatrix4x4 getMVPMatrix(unsigned int index) const;
void deleteData();
public:
void setData(std::vector<Model*>* models, std::vector<QImage*> textures);
void setData(std::vector<Model*>* models, std::vector<QImage*>* textures, BoundingBox bbox);
};