Fixed textures not loading correctly

This commit is contained in:
Kah Wei 2022-09-27 19:52:36 +08:00
parent 14cd0b4be9
commit 055a0a1711
2 changed files with 3 additions and 3 deletions

View File

@ -55,13 +55,13 @@ namespace Sandbox
graphicsSystem->BuildMeshBuffers(); graphicsSystem->BuildMeshBuffers();
// Load Textures // Load Textures
/*auto textures = SHADE::SHAssetManager::GetAllTextures(); auto textures = SHADE::SHAssetManager::GetAllTextures();
std::vector<Handle<SHTexture>> texHandles; std::vector<Handle<SHTexture>> texHandles;
for (const auto& tex : textures) for (const auto& tex : textures)
{ {
auto texture = graphicsSystem->Add(tex); auto texture = graphicsSystem->Add(tex);
texHandles.push_back(texture); texHandles.push_back(texture);
}*/ }
graphicsSystem->BuildTextures(); graphicsSystem->BuildTextures();
// Create Materials // Create Materials

View File

@ -79,7 +79,7 @@ namespace SHADE
} }
SHTexture::PixelChannel* pixel = new SHTexture::PixelChannel[totalBytes]; SHTexture::PixelChannel* pixel = new SHTexture::PixelChannel[totalBytes];
//std::memcpy(pixel, file.GetDDSData(), totalBytes); std::memcpy(pixel, file.GetDDSData(), totalBytes);
//pixel = std::move(reinterpret_cast<SHTexture::PixelChannel const*>(file.GetDDSData())); //pixel = std::move(reinterpret_cast<SHTexture::PixelChannel const*>(file.GetDDSData()));
asset.numBytes = totalBytes; asset.numBytes = totalBytes;