mirror of
https://github.com/overte-org/overte.git
synced 2025-04-15 08:26:36 +02:00
Remove baking dependency from assignment-client
This commit is contained in:
parent
2eecb41337
commit
94a58a2471
8 changed files with 13 additions and 16 deletions
|
@ -13,7 +13,7 @@ setup_memory_debugger()
|
||||||
link_hifi_libraries(
|
link_hifi_libraries(
|
||||||
audio avatars octree gpu model fbx entities
|
audio avatars octree gpu model fbx entities
|
||||||
networking animation recording shared script-engine embedded-webserver
|
networking animation recording shared script-engine embedded-webserver
|
||||||
controllers physics plugins midi image baking
|
controllers physics plugins midi image
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(${TARGET_NAME} oven)
|
add_dependencies(${TARGET_NAME} oven)
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
#include <SharedUtil.h>
|
#include <SharedUtil.h>
|
||||||
#include <PathUtils.h>
|
#include <PathUtils.h>
|
||||||
#include <image/Image.h>
|
#include <image/Image.h>
|
||||||
#include <TextureBaker.h>
|
|
||||||
|
|
||||||
#include "AssetServerLogging.h"
|
#include "AssetServerLogging.h"
|
||||||
#include "BakeAssetTask.h"
|
#include "BakeAssetTask.h"
|
||||||
|
@ -250,7 +249,7 @@ AssetServer::AssetServer(ReceivedMessage& message) :
|
||||||
image::setNormalTexturesCompressionEnabled(true);
|
image::setNormalTexturesCompressionEnabled(true);
|
||||||
image::setCubeTexturesCompressionEnabled(true);
|
image::setCubeTexturesCompressionEnabled(true);
|
||||||
|
|
||||||
BAKEABLE_TEXTURE_EXTENSIONS = TextureBaker::getSupportedFormats();
|
BAKEABLE_TEXTURE_EXTENSIONS = image::getSupportedFormats();
|
||||||
qDebug() << "Supported baking texture formats:" << BAKEABLE_MODEL_EXTENSIONS;
|
qDebug() << "Supported baking texture formats:" << BAKEABLE_MODEL_EXTENSIONS;
|
||||||
|
|
||||||
// Most of the work will be I/O bound, reading from disk and constructing packet objects,
|
// Most of the work will be I/O bound, reading from disk and constructing packet objects,
|
||||||
|
|
|
@ -607,7 +607,7 @@ void FBXBaker::rewriteAndBakeSceneTextures() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!TextureBaker::getSupportedFormats().contains(textureFileInfo.suffix())) {
|
if (!image::getSupportedFormats().contains(textureFileInfo.suffix())) {
|
||||||
// this is a texture format we don't bake, skip it
|
// this is a texture format we don't bake, skip it
|
||||||
handleWarning(fbxTextureFileName + " is not a bakeable texture format");
|
handleWarning(fbxTextureFileName + " is not a bakeable texture format");
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -61,14 +61,6 @@ void TextureBaker::abort() {
|
||||||
_abortProcessing.store(true);
|
_abortProcessing.store(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
const QStringList TextureBaker::getSupportedFormats() {
|
|
||||||
auto formats = QImageReader::supportedImageFormats();
|
|
||||||
QStringList stringFormats;
|
|
||||||
std::transform(formats.begin(), formats.end(), std::back_inserter(stringFormats),
|
|
||||||
[](QByteArray& format) -> QString { return format; });
|
|
||||||
return stringFormats;
|
|
||||||
}
|
|
||||||
|
|
||||||
void TextureBaker::loadTexture() {
|
void TextureBaker::loadTexture() {
|
||||||
// check if the texture is local or first needs to be downloaded
|
// check if the texture is local or first needs to be downloaded
|
||||||
if (_textureURL.isLocalFile()) {
|
if (_textureURL.isLocalFile()) {
|
||||||
|
|
|
@ -31,8 +31,6 @@ public:
|
||||||
const QDir& outputDirectory, const QString& bakedFilename = QString(),
|
const QDir& outputDirectory, const QString& bakedFilename = QString(),
|
||||||
const QByteArray& textureContent = QByteArray());
|
const QByteArray& textureContent = QByteArray());
|
||||||
|
|
||||||
static const QStringList getSupportedFormats();
|
|
||||||
|
|
||||||
const QByteArray& getOriginalTexture() const { return _originalTexture; }
|
const QByteArray& getOriginalTexture() const { return _originalTexture; }
|
||||||
|
|
||||||
QUrl getTextureURL() const { return _textureURL; }
|
QUrl getTextureURL() const { return _textureURL; }
|
||||||
|
|
|
@ -75,6 +75,14 @@ glm::uvec2 rectifyToSparseSize(const glm::uvec2& size) {
|
||||||
|
|
||||||
namespace image {
|
namespace image {
|
||||||
|
|
||||||
|
const QStringList getSupportedFormats() {
|
||||||
|
auto formats = QImageReader::supportedImageFormats();
|
||||||
|
QStringList stringFormats;
|
||||||
|
std::transform(formats.begin(), formats.end(), std::back_inserter(stringFormats),
|
||||||
|
[](QByteArray& format) -> QString { return format; });
|
||||||
|
return stringFormats;
|
||||||
|
}
|
||||||
|
|
||||||
QImage::Format QIMAGE_HDR_FORMAT = QImage::Format_RGB30;
|
QImage::Format QIMAGE_HDR_FORMAT = QImage::Format_RGB30;
|
||||||
|
|
||||||
TextureUsage::TextureLoader TextureUsage::getTextureLoaderForType(Type type, const QVariantMap& options) {
|
TextureUsage::TextureLoader TextureUsage::getTextureLoaderForType(Type type, const QVariantMap& options) {
|
||||||
|
|
|
@ -80,6 +80,8 @@ gpu::TexturePointer processCubeTextureColorFromImage(const QImage& srcImage, con
|
||||||
|
|
||||||
} // namespace TextureUsage
|
} // namespace TextureUsage
|
||||||
|
|
||||||
|
const QStringList getSupportedFormats();
|
||||||
|
|
||||||
bool isColorTexturesCompressionEnabled();
|
bool isColorTexturesCompressionEnabled();
|
||||||
bool isNormalTexturesCompressionEnabled();
|
bool isNormalTexturesCompressionEnabled();
|
||||||
bool isGrayscaleTexturesCompressionEnabled();
|
bool isGrayscaleTexturesCompressionEnabled();
|
||||||
|
|
|
@ -17,6 +17,4 @@ if (UNIX)
|
||||||
endif()
|
endif()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set_target_properties(${TARGET_NAME} PROPERTIES EXCLUDE_FROM_ALL FALSE EXCLUDE_FROM_DEFAULT_BUILD FALSE)
|
|
||||||
|
|
||||||
install_beside_console()
|
install_beside_console()
|
||||||
|
|
Loading…
Reference in a new issue