This commit is contained in:
doze-zoze committed 2026-02-22 20:11:22 -06:00
commit 80da199209
1 file changed
+17 -12
@@ -180,23 +180,28 @@ public static class SanePrimitiveRenderer
public static void Initialize()
{
if (_graphicsDevice == null)
throw new ArgumentNullException(nameof(_graphicsDevice));
_effect?.Dispose();
_effect = new BasicEffect(_graphicsDevice)
Main.RunOnMainThread(() =>
{
VertexColorEnabled = true,
TextureEnabled = true,
LightingEnabled = false,
FogEnabled = false,
Texture = TextureAssets.Logo.Value
};
if (_graphicsDevice == null)
throw new ArgumentNullException(nameof(_graphicsDevice));
_effect?.Dispose();
_effect = new BasicEffect(_graphicsDevice)
{
VertexColorEnabled = true,
TextureEnabled = true,
LightingEnabled = false,
FogEnabled = false,
Texture = TextureAssets.Logo.Value
};
});
}
public static void Dispose()
{
_effect?.Dispose();
Main.RunOnMainThread(() =>
_effect?.Dispose()
);
}
/// <summary>