private static void FillImage(Image customImage) { var colors = new Color[8 * 8]; for (int i = 0; i < 8 * 8; i++) colors[i] = Color.GetRandomColor(); customImage.Fill(colors); }
public void CreateBuffer() { buffer2D = new MockCircularBuffer(Resolve<Device>(), ContentLoader.Load<ShaderWithFormat>(Shader.Position2DUV), BlendMode.Normal, VerticesMode.Triangles); buffer3D = new MockCircularBuffer(Resolve<Device>(), ContentLoader.Load<ShaderWithFormat>(Shader.Position3DUV), BlendMode.Normal, VerticesMode.Triangles); image = ContentLoader.Load<Image>("DeltaEngineLogo"); Assert.IsTrue(buffer2D.IsCreated); }
public override void SetLightmapTexture(Image texture) { }
public override void SetDiffuseTexture(Image texture) { }
public void CreateAnimationWithEmptyTextures() { var emptyImageList = new Image[0]; Assert.Throws<ImageAnimation.NoImagesGivenNeedAtLeastOne>( () => new ImageAnimation(emptyImageList, 3)); }
public override void SetLightmapTexture(Image texture) { context.PixelShader.SetShaderResource(1, (texture as SharpDXImage).NativeResourceView); }
public override void SetDiffuseTexture(Image image) { context.PixelShader.SetShaderResource(0, (image as SharpDXImage).NativeResourceView); var sampler = GetSamplerState(!image.DisableLinearFiltering, image.AllowTiling); context.PixelShader.SetSampler(0, sampler); }
public override void SetDiffuseTexture(Image texture) { device.SetDiffuseTexture(texture); }
public SpriteSheetAnimationCreationData(Image image, float duration, Size subImageSize) { Image = image; DefaultDuration = duration; SubImageSize = subImageSize; }
public ColoredSprite(Image image) : base(image) {}
protected Sprite(Image image) { Material = new Material(ContentLoader.Create<Shader>( new ShaderCreationData(ShaderFlags.Position2DColoredTextured)), image); OnDraw<DrawSprite>(); }
public SolidSprite(Image image) : base(image) {}
public override void SetLightmapTexture(Image texture) { Core.Logger.Info("Lightmaps are not supported yet in XNA"); }
public Sprite(Image image) { material = new Material(ContentLoader.Load<Shader>(Shader.Position2DColorUV), image, image.PixelSize); OnDraw<DrawSprite>(); }
public abstract void SetLightmapTexture(Image texture);
public abstract void SetDiffuseTexture(Image texture);