public SimpleUIPointSpriteStringElement(IUILayoutParam param,
     string content, vec3 position, 
     GLColor color = null, int fontSize = 32, int maxRowWidth = 256, FontResource fontResource = null)
 {
     IUILayout layout = this;
     layout.Param = param;
     this.element = new PointSpriteStringElement(content, position, color, fontSize, maxRowWidth, fontResource);
 }
        private void btnUpdateText_Click(object sender, EventArgs e)
        {
            string text = this.txtText.Text;
            GLColor color = this.lblFontColor.BackColor;
            int fontSize = (int)this.numFontSize.Value;
            int maxRowWidth = (int)this.numMaxRowWidth.Value;
            //if (this.textElement == null)
            {
                var textElement = new PointSpriteStringElement(text, new vec3(0, 1, 0), color, fontSize, maxRowWidth,
                    null);
                textElement.Initialize();
                textElement.BeforeRendering += textElement_BeforeRendering;
                textElement.AfterRendering += textElement_AfterRendering;

                this.textElement = textElement;
            }
            //else
            //{
            //    var textElement = this.textElement;
            //    textElement.UpdateProperties(text, color, fontSize, null);
            //}
        }