public void Draw(IDrawContext context) { var drawSys = DrawSystem.GetInstance(); Matrix layout = m_initParam.Layout; foreach (char c in m_text) { var tex = DrawSystem.TextureData.Null(); float offset = 0.0f; switch (c) { case '.': tex = m_initParam.Dot; offset = -0.22f; break; default: if ('0' <= c && c <= '9') { int num = (int)c - (int)'0'; tex = m_initParam.Numbers[num]; offset = -0.3f; } break; } Debug.Assert(tex.Resource != null, "invalid character"); context.DrawModel(layout * m_worldTrans, Color4.White, m_plane.NodeList[0].Mesh, StandardMaterial.Create(tex), DrawSystem.RenderMode.Transparency, null); layout *= Matrix.Translation(offset, 0, 0); } }