Fixed textures not loading correctly
This commit is contained in:
parent
14cd0b4be9
commit
055a0a1711
|
@ -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
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue