public static ShaderTextureSetCommand Create(String key, TextureResource resource) { if (resource == null) return null; return new ShaderTextureSetCommand { Key = key, ResourceID = resource.ID, }; }
public static RenderTargetsSetCommand Create(TextureResource depthStencil, IEnumerable<TextureResource> rendertargets) { if (!rendertargets.Any()) { return null; } return new RenderTargetsSetCommand { DepthStencil = depthStencil != null ? depthStencil.ID : 0, RenderTargets = rendertargets.Select(r => r.ID).ToArray(), }; }
public RenderTargetClearCommand Create(TextureResource resource, Color4 color) { if (resource == null) { return null; } return new RenderTargetClearCommand { ResourceID = resource.ID, Color = color, }; }