add textureTransform to ObjectBase

before textures load refactoring
This commit is contained in:
2023-02-05 21:23:41 +03:00
parent 7d30802cbd
commit 7c6ca07323
39 changed files with 570 additions and 144 deletions

View File

@@ -28,6 +28,10 @@ QVector3D colorVector(QRgb c) {
}
void TextureManager::addSearchPath(const QString & path) {
if (!search_pathes.contains(path)) search_pathes << path;
}
QString TextureManager::findFile(const QString & path) {
return ::findFile(path, search_pathes);
}
@@ -38,7 +42,7 @@ GLuint TextureManager::loadTexture(const QString & path, bool ownership, bool bu
if (p.isEmpty()) return 0;
int tid = textureID(p, bump);
if (tid > 0) {
// qDebug() << "[TextureManager] Found" << path << "as" << tid;
qDebug() << "[TextureManager] Found" << path << "as" << tid;
return tid;
}
QImage image(p);
@@ -70,7 +74,7 @@ GLuint TextureManager::loadTexture(const QImage & im, bool ownership, bool bump)
qDebug() << "[TextureManager] Can`t load image";
return tid;
}
// qDebug() << "[TextureManager] Loaded image as" << tid;
qDebug() << "[TextureManager] Loaded image as" << tid;
return tid;
}