Remove baking dependency from assignment-client

This commit is contained in:
Ryan Huffman 2017-12-07 10:53:23 -08:00
parent 2eecb41337
commit 94a58a2471
8 changed files with 13 additions and 16 deletions

View file

@ -13,7 +13,7 @@ setup_memory_debugger()
link_hifi_libraries(
audio avatars octree gpu model fbx entities
networking animation recording shared script-engine embedded-webserver
controllers physics plugins midi image baking
controllers physics plugins midi image
)
add_dependencies(${TARGET_NAME} oven)

View file

@ -33,7 +33,6 @@
#include <SharedUtil.h>
#include <PathUtils.h>
#include <image/Image.h>
#include <TextureBaker.h>
#include "AssetServerLogging.h"
#include "BakeAssetTask.h"
@ -250,7 +249,7 @@ AssetServer::AssetServer(ReceivedMessage& message) :
image::setNormalTexturesCompressionEnabled(true);
image::setCubeTexturesCompressionEnabled(true);
BAKEABLE_TEXTURE_EXTENSIONS = TextureBaker::getSupportedFormats();
BAKEABLE_TEXTURE_EXTENSIONS = image::getSupportedFormats();
qDebug() << "Supported baking texture formats:" << BAKEABLE_MODEL_EXTENSIONS;
// Most of the work will be I/O bound, reading from disk and constructing packet objects,

View file

@ -607,7 +607,7 @@ void FBXBaker::rewriteAndBakeSceneTextures() {
return;
}
if (!TextureBaker::getSupportedFormats().contains(textureFileInfo.suffix())) {
if (!image::getSupportedFormats().contains(textureFileInfo.suffix())) {
// this is a texture format we don't bake, skip it
handleWarning(fbxTextureFileName + " is not a bakeable texture format");
continue;

View file

@ -61,14 +61,6 @@ void TextureBaker::abort() {
_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() {
// check if the texture is local or first needs to be downloaded
if (_textureURL.isLocalFile()) {

View file

@ -31,8 +31,6 @@ public:
const QDir& outputDirectory, const QString& bakedFilename = QString(),
const QByteArray& textureContent = QByteArray());
static const QStringList getSupportedFormats();
const QByteArray& getOriginalTexture() const { return _originalTexture; }
QUrl getTextureURL() const { return _textureURL; }

View file

@ -75,6 +75,14 @@ glm::uvec2 rectifyToSparseSize(const glm::uvec2& size) {
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;
TextureUsage::TextureLoader TextureUsage::getTextureLoaderForType(Type type, const QVariantMap& options) {

View file

@ -80,6 +80,8 @@ gpu::TexturePointer processCubeTextureColorFromImage(const QImage& srcImage, con
} // namespace TextureUsage
const QStringList getSupportedFormats();
bool isColorTexturesCompressionEnabled();
bool isNormalTexturesCompressionEnabled();
bool isGrayscaleTexturesCompressionEnabled();

View file

@ -17,6 +17,4 @@ if (UNIX)
endif()
endif ()
set_target_properties(${TARGET_NAME} PROPERTIES EXCLUDE_FROM_ALL FALSE EXCLUDE_FROM_DEFAULT_BUILD FALSE)
install_beside_console()