Fix build errors due to TexturePointer change

This commit is contained in:
Ryan Huffman 2017-04-19 11:25:20 -07:00 committed by Atlante45
parent cc7169b754
commit 841d301dec
3 changed files with 4 additions and 4 deletions

View file

@ -525,7 +525,7 @@ public:
ExternalUpdates getUpdates() const;
// Serialize ktx header and keyvalues directly to a file, and return a Texture representing that file
static Texture* serializeHeader(const std::string& ktxfile, const ktx::Header& header, const ktx::KeyValues& keyValues);
static TexturePointer serializeHeader(const std::string& ktxfile, const ktx::Header& header, const ktx::KeyValues& keyValues);
// Serialize a texture into a KTX file
static ktx::KTXUniquePointer serialize(const Texture& texture);

View file

@ -370,7 +370,7 @@ TexturePointer Texture::unserialize(const std::string& ktxfile, const ktx::KTXDe
return tex;
}
Texture* Texture::serializeHeader(const std::string& ktxfile, const ktx::Header& header, const ktx::KeyValues& keyValues) {
TexturePointer Texture::serializeHeader(const std::string& ktxfile, const ktx::Header& header, const ktx::KeyValues& keyValues) {
// Create a memory-backed KTX object
auto ktxBuffer = ktx::KTX::createBare(header, keyValues);

View file

@ -569,7 +569,7 @@ void NetworkTexture::maybeHandleFinishedInitialLoad() {
if (!texture) {
KTXFilePointer ktxFile = textureCache->_ktxCache.getFile(hash);
if (ktxFile) {
texture.reset(gpu::Texture::unserialize(ktxFile->getFilepath()));
texture = gpu::Texture::unserialize(ktxFile->getFilepath());
if (texture) {
texture = textureCache->cacheTextureByHash(hash, texture);
}
@ -603,7 +603,7 @@ void NetworkTexture::maybeHandleFinishedInitialLoad() {
auto newKtxDescriptor = memKtx->toDescriptor();
//auto texture = gpu::Texture::serializeHeader("test.ktx", *header, keyValues);
texture.reset(gpu::Texture::unserialize(_file->getFilepath(), newKtxDescriptor));
texture = gpu::Texture::unserialize(_file->getFilepath(), newKtxDescriptor);
texture->setKtxBacking(file->getFilepath());
texture->setSource(filename);