diff --git a/QtMeshViewer/Header/MshFile.h b/QtMeshViewer/Header/MshFile.h index f5b017a..61ce382 100644 --- a/QtMeshViewer/Header/MshFile.h +++ b/QtMeshViewer/Header/MshFile.h @@ -43,7 +43,7 @@ private: void readVertex(Segment* dataDestination, std::streampos position); void readUV(Segment* dataDestination, std::streampos position); - void loadTexture(QOpenGLTexture* destination, QString filepath); + void loadTexture(QOpenGLTexture*& destination, QString filepath); QMatrix4x4 getParentMatrix(std::string parent) const; QQuaternion getParentRotation(std::string parent) const; diff --git a/QtMeshViewer/Source/MshFile.cpp b/QtMeshViewer/Source/MshFile.cpp index d7cecfe..35e5555 100644 --- a/QtMeshViewer/Source/MshFile.cpp +++ b/QtMeshViewer/Source/MshFile.cpp @@ -622,7 +622,7 @@ void MshFile::readUV(Segment * dataDestination, std::streampos position) m_file.read(F2V(dataDestination->vertices[i].texCoord[j]), sizeof(float)); } -void MshFile::loadTexture(QOpenGLTexture * destination, QString filepath) +void MshFile::loadTexture(QOpenGLTexture *& destination, QString filepath) { bool loadSuccess(false); QImage img;