Fixed all asset related warnings
This commit is contained in:
parent
c1006821f3
commit
61e353164b
|
@ -17,7 +17,8 @@ namespace SHADE
|
|||
SHTexture::PixelChannel const * pixelData;
|
||||
|
||||
SHTextureAsset()
|
||||
: numBytes{ 0 },
|
||||
: compiled{ false },
|
||||
numBytes{ 0 },
|
||||
width{ 0 },
|
||||
height{ 0 },
|
||||
format{ SHTexture::TextureFormat::eUndefined },
|
||||
|
@ -25,7 +26,8 @@ namespace SHADE
|
|||
{}
|
||||
|
||||
SHTextureAsset(SHTextureAsset const& rhs)
|
||||
: numBytes{ rhs.numBytes },
|
||||
: compiled{ false },
|
||||
numBytes{ rhs.numBytes },
|
||||
width{ rhs.width },
|
||||
height{ rhs.height },
|
||||
format{ rhs.format },
|
||||
|
|
|
@ -91,8 +91,8 @@ namespace SHADE
|
|||
}
|
||||
}
|
||||
|
||||
result.header.vertexCount = result.vertexPosition.size();
|
||||
result.header.indexCount = result.indices.size();
|
||||
result.header.vertexCount = static_cast<uint32_t>(result.vertexPosition.size());
|
||||
result.header.indexCount = static_cast<uint32_t>(result.indices.size());
|
||||
result.header.meshName = mesh.mName.C_Str();
|
||||
|
||||
return result;
|
||||
|
|
|
@ -83,10 +83,10 @@ namespace SHADE
|
|||
|
||||
std::vector<uint32_t> mipOff(file.GetMipCount());
|
||||
|
||||
for (auto i{0}; i < file.GetMipCount(); ++i)
|
||||
for (size_t i{0}; i < file.GetMipCount(); ++i)
|
||||
{
|
||||
mipOff[i] = totalBytes;
|
||||
totalBytes += file.GetImageData(i, 0)->m_memSlicePitch;
|
||||
mipOff[i] = static_cast<uint32_t>(totalBytes);
|
||||
totalBytes += file.GetImageData(static_cast<uint32_t>(i), 0)->m_memSlicePitch;
|
||||
}
|
||||
|
||||
SHTexture::PixelChannel* pixel = new SHTexture::PixelChannel[totalBytes];
|
||||
|
@ -94,7 +94,7 @@ namespace SHADE
|
|||
//pixel = std::move(reinterpret_cast<SHTexture::PixelChannel const*>(file.GetDDSData()));
|
||||
|
||||
asset.compiled = false;
|
||||
asset.numBytes = totalBytes;
|
||||
asset.numBytes = static_cast<uint32_t>(totalBytes);
|
||||
asset.width = file.GetWidth();
|
||||
asset.height = file.GetHeight();
|
||||
asset.format = ddsLoaderToVkFormat(file.GetFormat(), true);
|
||||
|
|
|
@ -72,12 +72,13 @@ namespace SHADE
|
|||
|
||||
AssetType type = SHAssetMetaHandler::GetTypeFromExtension(path.extension().string().c_str());
|
||||
std::string folder;
|
||||
switch (type)
|
||||
{
|
||||
default:
|
||||
//TODO:ASSERT UNSUPPORTED FILE TYPE
|
||||
return std::filesystem::path();
|
||||
}
|
||||
//TODO Implement asset type generation
|
||||
//switch (type)
|
||||
//{
|
||||
//default:
|
||||
// //TODO:ASSERT UNSUPPORTED FILE TYPE
|
||||
// return std::filesystem::path();
|
||||
//}
|
||||
|
||||
return std::filesystem::path(ASSET_ROOT + folder + path.filename().string());
|
||||
}
|
||||
|
@ -108,12 +109,13 @@ namespace SHADE
|
|||
meta.type = type;
|
||||
|
||||
std::string folder;
|
||||
switch (type)
|
||||
{
|
||||
default:
|
||||
folder = "";
|
||||
break;
|
||||
}
|
||||
//TODO implement folder choosing
|
||||
//switch (type)
|
||||
//{
|
||||
//default:
|
||||
// folder = "";
|
||||
// break;
|
||||
//}
|
||||
AssetPath path{ ASSET_ROOT + folder + name + SHAssetMetaHandler::GetExtensionFromType(type) };
|
||||
|
||||
SHAssetMetaHandler::WriteMetaData(meta);
|
||||
|
|
|
@ -122,7 +122,7 @@ namespace SHADE
|
|||
break;
|
||||
|
||||
default:
|
||||
void;
|
||||
break;
|
||||
}
|
||||
|
||||
metaFile.close();
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace SHADE
|
|||
class SHVkDescriptorSetLayout;
|
||||
class SHVkDescriptorSetGroup;
|
||||
class SHVkSampler;
|
||||
class SHTextureAsset;
|
||||
struct SHTextureAsset;
|
||||
|
||||
/*---------------------------------------------------------------------------------*/
|
||||
/* Type Definitions */
|
||||
|
|
Loading…
Reference in New Issue