Handle loading error and placeholder shaders

This commit is contained in:
Simon Lübeß
2025-07-10 14:59:37 +02:00
parent 1b63c922da
commit c2d330fc8f
8 changed files with 192 additions and 56 deletions
@@ -27,7 +27,10 @@ class MaterialLoader : IProcessedAssetLoader
String textureName = scope String(textureNameLength);
stream.ReadStrSized32(textureNameLength, textureName);
material.SetTexture(textureName, textureHandle);
if (material.SetTexture(textureName, textureHandle) case .Err(let error))
{
Log.EngineLogger.Error($"Failed to set texture slot {textureName}: {error}");
}
}
uint16 bufferCount = Try!(stream.Read<uint16>());