mirror of
https://github.com/overte-org/overte.git
synced 2025-06-21 07:40:08 +02:00
Attempt to fix build errors
This commit is contained in:
parent
cb1f42afe5
commit
a3412bb25e
6 changed files with 15 additions and 13 deletions
|
@ -4,5 +4,3 @@ setup_hifi_library(Concurrent)
|
||||||
link_hifi_libraries(shared shaders graphics networking material-networking graphics-scripting ktx image fbx model-baker task)
|
link_hifi_libraries(shared shaders graphics networking material-networking graphics-scripting ktx image fbx model-baker task)
|
||||||
include_hifi_library_headers(gpu)
|
include_hifi_library_headers(gpu)
|
||||||
include_hifi_library_headers(hfm)
|
include_hifi_library_headers(hfm)
|
||||||
|
|
||||||
target_draco()
|
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
|
|
||||||
#include "MaterialBaker.h"
|
#include "MaterialBaker.h"
|
||||||
|
|
||||||
|
#include <unordered_map>
|
||||||
|
|
||||||
#include "QJsonObject"
|
#include "QJsonObject"
|
||||||
#include "QJsonDocument"
|
#include "QJsonDocument"
|
||||||
|
|
||||||
|
@ -124,7 +126,7 @@ void MaterialBaker::processMaterial() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QPair<QUrl, image::TextureUsage::Type> textureKey = { textureURL, it->second };
|
QPair<QUrl, image::TextureUsage::Type> textureKey { textureURL, it->second };
|
||||||
if (!_textureBakers.contains(textureKey)) {
|
if (!_textureBakers.contains(textureKey)) {
|
||||||
QSharedPointer<TextureBaker> textureBaker {
|
QSharedPointer<TextureBaker> textureBaker {
|
||||||
new TextureBaker(textureURL, it->second, _textureOutputDir),
|
new TextureBaker(textureURL, it->second, _textureOutputDir),
|
||||||
|
|
|
@ -21,7 +21,7 @@ public:
|
||||||
FSTBaker(const QUrl& inputMappingURL, TextureBakerThreadGetter inputTextureThreadGetter,
|
FSTBaker(const QUrl& inputMappingURL, TextureBakerThreadGetter inputTextureThreadGetter,
|
||||||
const QString& bakedOutputDirectory, const QString& originalOutputDirectory = "", bool hasBeenBaked = false);
|
const QString& bakedOutputDirectory, const QString& originalOutputDirectory = "", bool hasBeenBaked = false);
|
||||||
|
|
||||||
virtual QUrl getFullOutputMappingURL() const;
|
virtual QUrl getFullOutputMappingURL() const override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void fstLoaded();
|
void fstLoaded();
|
||||||
|
|
|
@ -4,4 +4,6 @@ setup_hifi_library()
|
||||||
link_hifi_libraries(shared shaders task gpu graphics hfm material-networking)
|
link_hifi_libraries(shared shaders task gpu graphics hfm material-networking)
|
||||||
include_hifi_library_headers(networking)
|
include_hifi_library_headers(networking)
|
||||||
include_hifi_library_headers(image)
|
include_hifi_library_headers(image)
|
||||||
include_hifi_library_headers(ktx)
|
include_hifi_library_headers(ktx)
|
||||||
|
|
||||||
|
target_draco()
|
||||||
|
|
|
@ -145,7 +145,7 @@ void DomainBaker::loadLocalFile() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DomainBaker::addModelBaker(const QString& property, const QString& url, QJsonValueRef& jsonRef) {
|
void DomainBaker::addModelBaker(const QString& property, const QString& url, const QJsonValueRef& jsonRef) {
|
||||||
// grab a QUrl for the model URL
|
// grab a QUrl for the model URL
|
||||||
QUrl bakeableModelURL = getBakeableModelURL(url);
|
QUrl bakeableModelURL = getBakeableModelURL(url);
|
||||||
if (!bakeableModelURL.isEmpty() && (_shouldRebakeOriginals || !isModelBaked(bakeableModelURL))) {
|
if (!bakeableModelURL.isEmpty() && (_shouldRebakeOriginals || !isModelBaked(bakeableModelURL))) {
|
||||||
|
@ -185,7 +185,7 @@ void DomainBaker::addModelBaker(const QString& property, const QString& url, QJs
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DomainBaker::addTextureBaker(const QString& property, const QString& url, image::TextureUsage::Type type, QJsonValueRef& jsonRef) {
|
void DomainBaker::addTextureBaker(const QString& property, const QString& url, image::TextureUsage::Type type, const QJsonValueRef& jsonRef) {
|
||||||
QString cleanURL = QUrl(url).adjusted(QUrl::RemoveQuery | QUrl::RemoveFragment).toDisplayString();
|
QString cleanURL = QUrl(url).adjusted(QUrl::RemoveQuery | QUrl::RemoveFragment).toDisplayString();
|
||||||
auto idx = cleanURL.lastIndexOf('.');
|
auto idx = cleanURL.lastIndexOf('.');
|
||||||
auto extension = idx >= 0 ? url.mid(idx + 1).toLower() : "";
|
auto extension = idx >= 0 ? url.mid(idx + 1).toLower() : "";
|
||||||
|
@ -225,7 +225,7 @@ void DomainBaker::addTextureBaker(const QString& property, const QString& url, i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DomainBaker::addScriptBaker(const QString& property, const QString& url, QJsonValueRef& jsonRef) {
|
void DomainBaker::addScriptBaker(const QString& property, const QString& url, const QJsonValueRef& jsonRef) {
|
||||||
// grab a clean version of the URL without a query or fragment
|
// grab a clean version of the URL without a query or fragment
|
||||||
QUrl scriptURL = QUrl(url).adjusted(QUrl::RemoveQuery | QUrl::RemoveFragment);
|
QUrl scriptURL = QUrl(url).adjusted(QUrl::RemoveQuery | QUrl::RemoveFragment);
|
||||||
|
|
||||||
|
@ -257,7 +257,7 @@ void DomainBaker::addScriptBaker(const QString& property, const QString& url, QJ
|
||||||
_entitiesNeedingRewrite.insert(scriptURL, { property, jsonRef });
|
_entitiesNeedingRewrite.insert(scriptURL, { property, jsonRef });
|
||||||
}
|
}
|
||||||
|
|
||||||
void DomainBaker::addMaterialBaker(const QString& property, const QString& data, bool isURL, QJsonValueRef& jsonRef) {
|
void DomainBaker::addMaterialBaker(const QString& property, const QString& data, bool isURL, const QJsonValueRef& jsonRef) {
|
||||||
// grab a clean version of the URL without a query or fragment
|
// grab a clean version of the URL without a query or fragment
|
||||||
QString materialData;
|
QString materialData;
|
||||||
if (isURL) {
|
if (isURL) {
|
||||||
|
|
|
@ -73,10 +73,10 @@ private:
|
||||||
|
|
||||||
bool _shouldRebakeOriginals { false };
|
bool _shouldRebakeOriginals { false };
|
||||||
|
|
||||||
void addModelBaker(const QString& property, const QString& url, QJsonValueRef& jsonRef);
|
void addModelBaker(const QString& property, const QString& url, const QJsonValueRef& jsonRef);
|
||||||
void addTextureBaker(const QString& property, const QString& url, image::TextureUsage::Type type, QJsonValueRef& jsonRef);
|
void addTextureBaker(const QString& property, const QString& url, image::TextureUsage::Type type, const QJsonValueRef& jsonRef);
|
||||||
void addScriptBaker(const QString& property, const QString& url, QJsonValueRef& jsonRef);
|
void addScriptBaker(const QString& property, const QString& url, const QJsonValueRef& jsonRef);
|
||||||
void addMaterialBaker(const QString& property, const QString& data, bool isURL, QJsonValueRef& jsonRef);
|
void addMaterialBaker(const QString& property, const QString& data, bool isURL, const QJsonValueRef& jsonRef);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_DomainBaker_h
|
#endif // hifi_DomainBaker_h
|
||||||
|
|
Loading…
Reference in a new issue