almost working gl font renderer

This commit is contained in:
Chris Forbes
2010-02-25 20:49:16 +13:00
parent 88423b158a
commit f7656d44a4
13 changed files with 170 additions and 118 deletions

View File

@@ -43,7 +43,7 @@ namespace OpenRa.Graphics
public ITexture PaletteTexture;
public readonly IFont RegularFont, BoldFont;
public readonly SpriteFont RegularFont, BoldFont;
public Size Resolution { get { return device.WindowSize; } }
@@ -56,8 +56,11 @@ namespace OpenRa.Graphics
RgbaSpriteShader = device.CreateShader(FileSystem.Open("shaders/chrome-rgba.fx"));
WorldSpriteShader = device.CreateShader(FileSystem.Open("shaders/chrome-shp.fx"));
RegularFont = device.CreateFont( "FreeSans.ttf" );
BoldFont = device.CreateFont( "FreeSansBold.ttf" );
// RegularFont = device.CreateFont( "FreeSans.ttf" );
// BoldFont = device.CreateFont( "FreeSansBold.ttf" );
RegularFont = new SpriteFont(this, "FreeSans.ttf", 14);
BoldFont = new SpriteFont(this, "FreeSansBold.ttf", 14);
}
IGraphicsDevice CreateDevice( Assembly rendererDll, int width, int height, bool windowed, bool vsync )