fixed text renderer. it's slow, but it works
This commit is contained in:
@@ -124,6 +124,7 @@ namespace OpenRa.Graphics
|
|||||||
Bitmap b = RenderTextToBitmap(text, fDebug, c);
|
Bitmap b = RenderTextToBitmap(text, fDebug, c);
|
||||||
textSheet.Texture.SetData(b);
|
textSheet.Texture.SetData(b);
|
||||||
rgbaRenderer.DrawSprite(textSprite, pos.ToFloat2(), "chrome");
|
rgbaRenderer.DrawSprite(textSprite, pos.ToFloat2(), "chrome");
|
||||||
|
rgbaRenderer.Flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DrawText2(string text, int2 pos, Color c)
|
public void DrawText2(string text, int2 pos, Color c)
|
||||||
@@ -131,6 +132,7 @@ namespace OpenRa.Graphics
|
|||||||
Bitmap b = RenderTextToBitmap(text, fTitle, c);
|
Bitmap b = RenderTextToBitmap(text, fTitle, c);
|
||||||
textSheet.Texture.SetData(b);
|
textSheet.Texture.SetData(b);
|
||||||
rgbaRenderer.DrawSprite(textSprite, pos.ToFloat2(), "chrome");
|
rgbaRenderer.DrawSprite(textSprite, pos.ToFloat2(), "chrome");
|
||||||
|
rgbaRenderer.Flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int2 MeasureText(string text)
|
public int2 MeasureText(string text)
|
||||||
|
|||||||
Reference in New Issue
Block a user