public void BindText(string text) { TextRender tex; if (texts.TryGetValue(text, out tex)) { tex.BindTexture(); return; } else { tex = new TextRender(text); texts.Add(text, tex); tex.BindTexture(); } }
public void RenderText(string text, Vector3 loc, Vector3 right, Vector3 up) { if (text == null) { text = "(null)"; } TextRender tex; if (texts.TryGetValue(text, out tex)) { tex.Render3D(loc, right, up); return; } else { tex = new TextRender(text); texts.Add(text, tex); tex.Render3D(loc, right, up); } }