20.09.2020
+ Instance Drawing + Text and Font ~ Made "DrawBackground" forced Background for 2D - DrawEmpty
This commit is contained in:
parent
acccf5f0e7
commit
c4a0847567
29 changed files with 365 additions and 85 deletions
25
SMCode/SM2D/Drawing/DrawText.cs
Normal file
25
SMCode/SM2D/Drawing/DrawText.cs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
using SM.Base.Contexts;
|
||||
using SM.Base.Text;
|
||||
using SM2D.Types;
|
||||
|
||||
namespace SM2D.Drawing
|
||||
{
|
||||
public class DrawText : TextDrawingBasis<Transformation>
|
||||
{
|
||||
public DrawText(Font font, string text) : base(font)
|
||||
{
|
||||
_text = text;
|
||||
}
|
||||
|
||||
public override void Draw(DrawContext context)
|
||||
{
|
||||
base.Draw(context);
|
||||
context.Instances = _modelMatrixs;
|
||||
ApplyContext(ref context);
|
||||
|
||||
context.View = Transform.GetMatrix() * context.View;
|
||||
|
||||
_material.Shader.Draw(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue