mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +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) {
|
||||
qDebug() << "Invalid image size: " << storage->size() << ", expected: " << _ktxDescriptor->images[level]._imageSize
|
||||
<< ", filename: " << QString::fromStdString(_filename);
|
||||
throw std::runtime_error("Invalid image size for level");
|
||||
<< ", level: " << level << ", filename: " << QString::fromStdString(_filename);
|
||||
//throw std::runtime_error("Invalid image size for level");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -364,7 +364,7 @@ void Geometry::setTextures(const QVariantMap& textureMap) {
|
|||
|
||||
bool Geometry::areTexturesLoaded() const {
|
||||
if (!_areTexturesLoaded) {
|
||||
qDebug() << "Textures not loaded for " << _fbxGeometry->originalURL;
|
||||
//qDebug() << "Textures not loaded for " << _fbxGeometry->originalURL;
|
||||
for (auto& material : _materials) {
|
||||
// Check if material textures are loaded
|
||||
bool materialMissingTexture = std::any_of(material->_textures.cbegin(), material->_textures.cend(),
|
||||
|
|
|
@ -399,7 +399,7 @@ void NetworkTexture::handleMipInterestLevel(int level) {
|
|||
|
||||
void NetworkTexture::startRequestForNextMipLevel() {
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -422,7 +422,6 @@ void NetworkTexture::startMipRangeRequest(uint16_t low, uint16_t high) {
|
|||
bool isHighMipRequest = low == NULL_MIP_LEVEL && high == NULL_MIP_LEVEL;
|
||||
|
||||
_ktxMipRequest = ResourceManager::createResourceRequest(this, _activeUrl);
|
||||
//qDebug(networking) << ">>> Making request to " << _url << " for " << low << " to " << high;
|
||||
|
||||
_ktxMipLevelRangeInFlight = { low, high };
|
||||
if (isHighMipRequest) {
|
||||
|
@ -431,6 +430,7 @@ void NetworkTexture::startMipRangeRequest(uint16_t low, uint16_t high) {
|
|||
range.fromInclusive = -15000;
|
||||
_ktxMipRequest->setByteRange(range);
|
||||
} else {
|
||||
qDebug(networking) << ">>> Making request to " << _url << " for " << low << " to " << high;
|
||||
ByteRange range;
|
||||
range.fromInclusive = ktx::KTX_HEADER_SIZE + _originalKtxDescriptor->header.bytesOfKeyValueData
|
||||
+ _originalKtxDescriptor->images[low]._imageOffset + 4;
|
||||
|
|
Loading…
Reference in a new issue