SDF font WIP

This commit is contained in:
2023-06-15 21:32:57 +02:00
parent 06da2c3f7f
commit 9d3a96ba81
6 changed files with 15 additions and 1 deletions

View File

@@ -8,6 +8,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="ImGui.NET" Version="1.89.4" /> <PackageReference Include="ImGui.NET" Version="1.89.4" />
<PackageReference Include="Raylib-cs" Version="4.2.0.1" /> <PackageReference Include="Raylib-cs" Version="4.2.0.1" />
<PackageReference Include="SharpFont" Version="4.0.1" />
<PackageReference Include="Silk.NET" Version="2.17.0" /> <PackageReference Include="Silk.NET" Version="2.17.0" />
<PackageReference Include="Silk.NET.WebGPU" Version="2.17.0" /> <PackageReference Include="Silk.NET.WebGPU" Version="2.17.0" />
<PackageReference Include="StbImageSharp" Version="2.27.13" /> <PackageReference Include="StbImageSharp" Version="2.27.13" />

View File

@@ -120,6 +120,11 @@ namespace DaggerFramework.Rendering
_glfw.SwapBuffers(_windowHandle); _glfw.SwapBuffers(_windowHandle);
} }
public override void DrawSdfText(Vector2 position, string text, int fontSize, Color color)
{
throw new NotImplementedException();
}
private GL _gl; private GL _gl;
private Glfw _glfw; private Glfw _glfw;
private unsafe WindowHandle* _windowHandle; private unsafe WindowHandle* _windowHandle;

View File

@@ -123,6 +123,11 @@ namespace DaggerFramework.Rendering
Raylib.DrawText(text, (int)position.X, (int)position.Y, fontSize, SystemColorToRaylibColor(color)); Raylib.DrawText(text, (int)position.X, (int)position.Y, fontSize, SystemColorToRaylibColor(color));
} }
public override void DrawSdfText(Vector2 position, string text, int fontSize, System.Drawing.Color color)
{
}
public override void Initialize(RendererSettings settings) public override void Initialize(RendererSettings settings)
{ {
ConfigFlags flags = 0; ConfigFlags flags = 0;

View File

@@ -27,6 +27,7 @@ namespace DaggerFramework.Rendering
public abstract void DrawCircle(float radius, Color color); public abstract void DrawCircle(float radius, Color color);
public abstract void DrawRectangle(Vector2 size, Color color); public abstract void DrawRectangle(Vector2 size, Color color);
public abstract void DrawDebugText(Vector2 position, string text, int fontSize, Color color); public abstract void DrawDebugText(Vector2 position, string text, int fontSize, Color color);
public abstract void DrawSdfText(Vector2 position, string text, int fontSize, Color color);
public abstract void DrawTexture(int id, Color tint); public abstract void DrawTexture(int id, Color tint);
} }

View File

@@ -1,9 +1,11 @@
using SharpFont;
namespace DaggerFramework; namespace DaggerFramework;
public class FontLoader : ResourceLoader<Font> public class FontLoader : ResourceLoader<Font>
{ {
public override Font Load(string path) public override Font Load(string path)
{ {
throw new NotImplementedException(); return default;
} }
} }

Binary file not shown.