public static LabelRenderer Create(int maxCharCount = 64, int labelHeight = 32, IFontTexture fontTexture = null)
{
if (fontTexture == null) { fontTexture = FontTexture.Default; }
var model = new TextModel(maxCharCount);
var shaderCodes = new ShaderCode[2];
shaderCodes[0] = new ShaderCode(ManifestResourceLoader.LoadTextFile(
@"Resources\Label.vert"), ShaderType.VertexShader);
shaderCodes[1] = new ShaderCode(ManifestResourceLoader.LoadTextFile(
@"Resources\Label.frag"), ShaderType.FragmentShader);
var map = new AttributeMap();
map.Add("in_Position", TextModel.strPosition);
map.Add("in_UV", TextModel.strUV);
var blendState = new BlendState(BlendingSourceFactor.SourceAlpha, BlendingDestinationFactor.One);
var renderer = new LabelRenderer(model, shaderCodes, map, blendState);
renderer.blendState = blendState;
renderer.fontTexture = fontTexture;
renderer.LabelHeight = labelHeight;
return renderer;
}