added limited rotation,
2 directions do not work
This commit is contained in:
@@ -126,13 +126,9 @@ void GeometryEngine::loadTexture(const char* filePath, const char* fileName)
|
||||
else
|
||||
img = loadTga((std::string(filePath) + std::string(fileName)).c_str(), loadSuccess);
|
||||
|
||||
//TODO: emit if not successfull
|
||||
if (!loadSuccess)
|
||||
{
|
||||
QString msg = "WARNING: texture not found or corrupted: ";
|
||||
msg += QString(fileName);
|
||||
emit sendMessage(msg, 1);
|
||||
}
|
||||
emit sendMessage("WARNING: texture not found or corrupted: " + QString(fileName), 1);
|
||||
|
||||
// Load image to OglTexture
|
||||
QOpenGLTexture* new_texture = new QOpenGLTexture(img.mirrored());
|
||||
|
||||
@@ -206,7 +202,6 @@ void GeometryEngine::drawGeometry(QOpenGLShaderProgram *program)
|
||||
|
||||
for (auto& it : m_drawList)
|
||||
{
|
||||
Q_ASSERT(!m_textures.isEmpty());
|
||||
// bind the correct texture
|
||||
if (it.textureIndex < m_textures.size())
|
||||
m_textures.at(it.textureIndex)->bind();
|
||||
|
||||
Reference in New Issue
Block a user