Namespace: DeltaEngine.Graphics.Tests
Assembly: DeltaEngine.Graphics.Tests (in DeltaEngine.Graphics.Tests.dll) Version: 1.1.1.0 (1.1.1)
Assembly: DeltaEngine.Graphics.Tests (in DeltaEngine.Graphics.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Examples
[Test, CloseAfterFirstFrame] public void CreateCustomMaterial() { var shader = ContentLoader.Create<Shader>( new ShaderCreationData(ShaderFlags.Position2DTextured)); var image = ContentLoader.Create<Image>(new ImageCreationData(Size.One)); var generatedMaterial = new Material(shader, image); Assert.IsNotNull(generatedMaterial); Assert.AreEqual(shader, generatedMaterial.Shader); Assert.IsNotNull(generatedMaterial.DiffuseMap); Assert.AreEqual(ScreenSpace.Current.FromPixelSpace(Size.One), generatedMaterial.MaterialRenderSize); }
See Also