예제 #1
0
 protected override void Dispose(bool disposing)
 {
     if (this.VAO != null)
     {
         this.VAO.Dispose();
         this.VAO = (OpenGL.VAO <Vector3, Vector2>)null;
     }
     base.Dispose(true);
 }
예제 #2
0
 public void UpdateFontSize(Text.FontSize font)
 {
     this.bitmapFont = Text.FontFromSize(font);
     if (string.IsNullOrEmpty(this.String))
     {
         return;
     }
     if (this.VAO != null)
     {
         this.bitmapFont.CreateString(this.VAO, this.String, this.Color, this.Justification, 1f);
     }
     else
     {
         this.VAO = this.bitmapFont.CreateString(this.Program, this.String, this.Color, this.Justification, 1f);
         this.VAO.DisposeChildren = true;
     }
     this.TextSize = new Point(this.bitmapFont.GetWidth(this.text), this.bitmapFont.Height);
 }