Fixed Text rendering
This commit is contained in:
parent
a4cab567b3
commit
f7dc2e24dc
3 changed files with 19 additions and 19 deletions
|
|
@ -1,8 +1,10 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using OpenTK;
|
||||
using SM.Base.Animation;
|
||||
using SM.Base.Controls;
|
||||
using SM.Base.Drawing.Text;
|
||||
using SM.Base.Time;
|
||||
using SM.Base.Window;
|
||||
using SM2D;
|
||||
|
|
@ -22,15 +24,20 @@ namespace SM_TEST
|
|||
private static InterpolationProcess interpolation;
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Font font = new Font(@"C:\Windows\Fonts\Arial.ttf")
|
||||
{
|
||||
FontSize = 20,
|
||||
CharSet = new List<char>(){'H', 'i', 'I', ','}
|
||||
};
|
||||
|
||||
window = new GLWindow(1280, 720, "0ms", WindowFlags.Window, VSyncMode.Off);
|
||||
window.ApplySetup(new Window2DSetup());
|
||||
window.SetRenderPipeline(new TestRenderPipeline());
|
||||
|
||||
window.SetScene(scene = new Scene());
|
||||
|
||||
DrawObject2D testObj = new DrawObject2D();
|
||||
interpolation = testObj.Transform.Position.Interpolate(TimeSpan.FromSeconds(5), new Vector2(300), new BezierCurve(Vector2.Zero,new Vector2(0.43f, 0), new Vector2(.5f, 1.5f), Vector2.One));
|
||||
scene.Objects.Add(testObj);
|
||||
DrawText text = new DrawText(font, "Hi, HI");
|
||||
scene.Objects.Add(text);
|
||||
|
||||
window.UpdateFrame += WindowOnUpdateFrame;
|
||||
window.RenderFrame += Window_RenderFrame;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue