mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 17:39:26 +02:00
Add debug logging for ktx downloads
This commit is contained in:
parent
ce12a216c0
commit
cc7169b754
3 changed files with 5 additions and 5 deletions
|
@ -135,8 +135,8 @@ void KtxStorage::assignMipData(uint16 level, const storage::StoragePointer& stor
|
||||||
|
|
||||||
if (storage->size() != _ktxDescriptor->images[level]._imageSize) {
|
if (storage->size() != _ktxDescriptor->images[level]._imageSize) {
|
||||||
qDebug() << "Invalid image size: " << storage->size() << ", expected: " << _ktxDescriptor->images[level]._imageSize
|
qDebug() << "Invalid image size: " << storage->size() << ", expected: " << _ktxDescriptor->images[level]._imageSize
|
||||||
<< ", filename: " << QString::fromStdString(_filename);
|
<< ", level: " << level << ", filename: " << QString::fromStdString(_filename);
|
||||||
throw std::runtime_error("Invalid image size for level");
|
//throw std::runtime_error("Invalid image size for level");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -364,7 +364,7 @@ void Geometry::setTextures(const QVariantMap& textureMap) {
|
||||||
|
|
||||||
bool Geometry::areTexturesLoaded() const {
|
bool Geometry::areTexturesLoaded() const {
|
||||||
if (!_areTexturesLoaded) {
|
if (!_areTexturesLoaded) {
|
||||||
qDebug() << "Textures not loaded for " << _fbxGeometry->originalURL;
|
//qDebug() << "Textures not loaded for " << _fbxGeometry->originalURL;
|
||||||
for (auto& material : _materials) {
|
for (auto& material : _materials) {
|
||||||
// Check if material textures are loaded
|
// Check if material textures are loaded
|
||||||
bool materialMissingTexture = std::any_of(material->_textures.cbegin(), material->_textures.cend(),
|
bool materialMissingTexture = std::any_of(material->_textures.cbegin(), material->_textures.cend(),
|
||||||
|
|
|
@ -399,7 +399,7 @@ void NetworkTexture::handleMipInterestLevel(int level) {
|
||||||
|
|
||||||
void NetworkTexture::startRequestForNextMipLevel() {
|
void NetworkTexture::startRequestForNextMipLevel() {
|
||||||
if (_lowestKnownPopulatedMip == 0) {
|
if (_lowestKnownPopulatedMip == 0) {
|
||||||
qWarning(networking) << "Requesting next mip level but all have been fulfilled";
|
qWarning(networking) << "Requesting next mip level but all have been fulfilled: " << _url;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -422,7 +422,6 @@ void NetworkTexture::startMipRangeRequest(uint16_t low, uint16_t high) {
|
||||||
bool isHighMipRequest = low == NULL_MIP_LEVEL && high == NULL_MIP_LEVEL;
|
bool isHighMipRequest = low == NULL_MIP_LEVEL && high == NULL_MIP_LEVEL;
|
||||||
|
|
||||||
_ktxMipRequest = ResourceManager::createResourceRequest(this, _activeUrl);
|
_ktxMipRequest = ResourceManager::createResourceRequest(this, _activeUrl);
|
||||||
//qDebug(networking) << ">>> Making request to " << _url << " for " << low << " to " << high;
|
|
||||||
|
|
||||||
_ktxMipLevelRangeInFlight = { low, high };
|
_ktxMipLevelRangeInFlight = { low, high };
|
||||||
if (isHighMipRequest) {
|
if (isHighMipRequest) {
|
||||||
|
@ -431,6 +430,7 @@ void NetworkTexture::startMipRangeRequest(uint16_t low, uint16_t high) {
|
||||||
range.fromInclusive = -15000;
|
range.fromInclusive = -15000;
|
||||||
_ktxMipRequest->setByteRange(range);
|
_ktxMipRequest->setByteRange(range);
|
||||||
} else {
|
} else {
|
||||||
|
qDebug(networking) << ">>> Making request to " << _url << " for " << low << " to " << high;
|
||||||
ByteRange range;
|
ByteRange range;
|
||||||
range.fromInclusive = ktx::KTX_HEADER_SIZE + _originalKtxDescriptor->header.bytesOfKeyValueData
|
range.fromInclusive = ktx::KTX_HEADER_SIZE + _originalKtxDescriptor->header.bytesOfKeyValueData
|
||||||
+ _originalKtxDescriptor->images[low]._imageOffset + 4;
|
+ _originalKtxDescriptor->images[low]._imageOffset + 4;
|
||||||
|
|
Loading…
Reference in a new issue