CSharpGL.TextModel.SetText C# (CSharp) Method

SetText() public method

public SetText ( string content, IFontTexture fontTextureService ) : void
content string
fontTextureService IFontTexture
return void
        public unsafe void SetText(string content, IFontTexture fontTextureService)
        {
            if (string.IsNullOrEmpty(content))
            {
                if (this.indexBuffer != null)
                { this.indexBuffer.RenderingVertexCount = 0; }
                this.content = string.Empty;
                return;
            }

            this.content = content;

            int count = content.Length;
            if (count > this.maxCharCount)
            { throw new ArgumentException(); }
            //{ count = this.maxCharCount; }

            SetupGlyphPositions(content, fontTextureService);
            SetupGlyphTexCoord(content, fontTextureService);
            this.indexBuffer.RenderingVertexCount = count * 4;
        }