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();
// Load Textures
/*auto textures = SHADE::SHAssetManager::GetAllTextures();
auto textures = SHADE::SHAssetManager::GetAllTextures();
std::vector<Handle<SHTexture>> texHandles;
for (const auto& tex : textures)
{
auto texture = graphicsSystem->Add(tex);
texHandles.push_back(texture);
}*/
}
graphicsSystem->BuildTextures();
// Create Materials

View File

@ -79,7 +79,7 @@ namespace SHADE
}
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()));
asset.numBytes = totalBytes;