added limited rotation,

2 directions do not work
This commit is contained in:
Anakin
2017-01-07 12:46:06 +01:00
parent e963b7538e
commit 8c2ca44f20
3 changed files with 52 additions and 9 deletions

View File

@@ -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();