protected override void Dispose(bool disposing) { if (this.VAO != null) { this.VAO.Dispose(); this.VAO = (OpenGL.VAO <Vector3, Vector2>)null; } base.Dispose(true); }
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); }