mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Handle loading error and placeholder shaders
This commit is contained in:
@@ -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>());
|
||||
|
||||
@@ -532,7 +532,7 @@ namespace GlitchyEngine.Renderer
|
||||
|
||||
s_quadBatchMaterial.SetVariable("ViewProjection", sceneViewProjection);
|
||||
//s_currentQuadEffect.Get()?.Variables["ViewProjection"].SetData(viewProjection);
|
||||
s_currentCircleEffect.Get()?.Variables["ViewProjection"].SetData(sceneViewProjection);
|
||||
//s_currentCircleEffect.Get()?.Variables["ViewProjection"].SetData(sceneViewProjection);
|
||||
s_currentLineEffect.Get()?.Variables["ViewProjection"].SetData(sceneViewProjection);
|
||||
|
||||
s_drawOrder = drawOrder;
|
||||
@@ -574,7 +574,7 @@ namespace GlitchyEngine.Renderer
|
||||
|
||||
//s_currentQuadEffect.Get()?.Variables["ViewProjection"].SetData(viewProjection);
|
||||
s_quadBatchMaterial.SetVariable("ViewProjection", sceneViewProjection);
|
||||
s_currentCircleEffect.Get()?.Variables["ViewProjection"].SetData(sceneViewProjection);
|
||||
//s_currentCircleEffect.Get()?.Variables["ViewProjection"].SetData(sceneViewProjection);
|
||||
s_currentLineEffect.Get()?.Variables["ViewProjection"].SetData(sceneViewProjection);
|
||||
|
||||
s_drawOrder = drawOrder;
|
||||
|
||||
Reference in New Issue
Block a user