public void HardPerformanceTest() { SceneConfig.Framerate = 1000; for (int i = 0; i < 30; i++) { _rootBody.Add(new Core.Box { XSize = 10, YSize = 20, ZSize = 30, DefaultColor = Color.Yellow, Top = PlaneImageBrush.FromResource(() => Properties.Resources.untitled), Bottom = PlaneImageBrush.FromResource(() => Properties.Resources.untitled), Location = GetRandomFrame() }); _rootBody.Add(new Body { Model = Model.FromResource(() => Properties.Resources.totem), Location = GetRandomFrame() }); _rootBody.Add(new Cylinder { RTop = 20, RBottom = 30, Height = 10, DefaultColor = Color.Red, Location = GetRandomFrame() }); } CreateDrawer(); Thread.Sleep(TimeSpan.FromSeconds(20)); }
public void PlaneImageBrushTest() { var brush = PlaneImageBrush.FromResource(() => CVARC.Engine.KR.Properties.Resources.testtexture); Texture texture; var res = _converter.TryConvert(brush, out texture); try { CheckMaterial(DirectXBrushConverter.DefaultColor, res.MaterialD3D); Assert.NotNull(texture); } finally { texture.Dispose(); } _converter.TryConvert(new SolidColorBrush(), out texture); Assert.Null(texture); }