read tx1d tx2d tx3d texture names and print to info window

This commit is contained in:
Anakin
2017-01-23 12:17:26 +01:00
parent 2ed9e475ce
commit b2df84eb4c
6 changed files with 89 additions and 29 deletions

View File

@@ -42,8 +42,12 @@ struct Model {
struct Material {
QString name;
QString textureName;
QOpenGLTexture* texture = Q_NULLPTR;
QString tx0d;
QString tx1d;
QString tx2d;
QString tx3d;
QOpenGLTexture* texture0 = Q_NULLPTR;
QOpenGLTexture* texture1 = Q_NULLPTR;
QVector4D specularColor = { 1.0, 1.0, 1.0, 1.0 };
QVector4D diffuseColor = { 1.0, 0.0, 0.0, 1.0 };
QVector4D ambientColor = { 1.0, 1.0, 1.0, 1.0 };
@@ -132,7 +136,7 @@ public:
// f.ex. texture coordinate (1.1, 1.2) is same as (0.1, 0.2)
new_texture->setWrapMode(QOpenGLTexture::Repeat);
defMaterial->texture = new_texture;
defMaterial->texture0 = new_texture;
defMaterial->name = "Default Material";
return defMaterial;