public static RenderableComponent AsTriangleColoredList(CullMode mode) => new RenderableComponent(mode, PrimitiveTopology.TriangleList, RenderTechniques.TriangleColored) { Tag = ElementTag.New(), IsValid = true, HasBlendState = true, RasterizerStateDescription = D3DRasterizerStateDescriptions.Default(mode), BlendStateDescription = D3DBlendStateDescriptions.BlendStateEnabled, };
static RenderableComponent AsTriangleList(CullMode mode, D3DDepthStencilDefinition depth, RenderTechniques technique) => new RenderableComponent(mode, PrimitiveTopology.TriangleList, technique) { Tag = ElementTag.New(), IsValid = true, HasBlendState = true, DepthStencilStateDefinition = depth, RasterizerStateDescription = D3DRasterizerStateDescriptions.Default(mode), BlendStateDescription = D3DBlendStateDescriptions.BlendStateEnabled, };
public static RenderableComponent AsTriangleColored(PrimitiveTopology topology) { var mode = CullMode.Front; return(new RenderableComponent(mode, topology, RenderTechniques.TriangleColored) { Tag = ElementTag.New(), IsValid = true, HasBlendState = true, DepthStencilStateDefinition = D3DDepthStencilDefinition.DepthEnabled, RasterizerStateDescription = D3DRasterizerStateDescriptions.Default(mode), BlendStateDescription = D3DBlendStateDescriptions.BlendStateEnabled, }); }