Move FreeType handling into the Platform dll.

This commit is contained in:
Paul Chote
2019-03-06 20:16:58 +00:00
committed by reaperrr
parent e2a51676f7
commit 1d4576229a
8 changed files with 139 additions and 49 deletions

View File

@@ -39,6 +39,7 @@ namespace OpenRA
readonly Stack<Rectangle> scissorState = new Stack<Rectangle>();
SheetBuilder fontSheetBuilder;
readonly IPlatform platform;
float depthScale;
float depthOffset;
@@ -51,6 +52,7 @@ namespace OpenRA
public Renderer(IPlatform platform, GraphicSettings graphicSettings)
{
this.platform = platform;
var resolution = GetResolution(graphicSettings);
Window = platform.CreateWindow(new Size(resolution.Width, resolution.Height), graphicSettings.Mode, graphicSettings.BatchSize);
@@ -290,5 +292,10 @@ namespace OpenRA
{
get { return Context.GLVersion; }
}
public IFont CreateFont(byte[] data)
{
return platform.CreateFont(data);
}
}
}