mirror of
https://github.com/overte-org/overte.git
synced 2025-04-10 08:56:57 +02:00
Fix build errors due to TexturePointer change
This commit is contained in:
parent
cc7169b754
commit
841d301dec
3 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue