fixed texture error
This commit is contained in:
parent
481256e8ea
commit
96379a9afb
@ -132,7 +132,16 @@ void OpenGlViewer::paintGL()
|
||||
{
|
||||
// set the texture
|
||||
std::uint32_t tmp_textureIndex = segmentIterator->textureIndex >= m_vTextures->size() ? m_vTextures->size() - 1 : segmentIterator->textureIndex;
|
||||
m_oglTexture->setData(*m_vTextures->at(tmp_textureIndex));
|
||||
|
||||
if (m_oglTexture->isCreated())
|
||||
{
|
||||
m_oglTexture->destroy();
|
||||
m_oglTexture->create();
|
||||
m_oglTexture->setSize(m_vTextures->at(tmp_textureIndex)->width(), m_vTextures->at(tmp_textureIndex)->height());
|
||||
m_oglTexture->setData(*m_vTextures->at(tmp_textureIndex));
|
||||
}
|
||||
|
||||
|
||||
|
||||
// give the MVP to the shader
|
||||
m_program->setUniformValue(m_uniformMVP, getMVPMatrix(modelIndex));
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "Header\MainWindow.h"
|
||||
#include <QtWidgets/QApplication>
|
||||
|
||||
|
||||
int startGUI(int argc, char* argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
|
Loading…
Reference in New Issue
Block a user