private void PrintWithBoundsVBO(QFont font, string text, RectangleF bounds, QFontAlignment alignment, ref float yOffset) { GL.Disable(EnableCap.Texture2D); GL.Color4(1.0f, 0f, 0f, 1.0f); float maxWidth = bounds.Width; float height = font.Measure(text, new SizeF(maxWidth, float.MaxValue), alignment).Height; GL.Begin(BeginMode.LineLoop); GL.Vertex3(bounds.X, bounds.Y, 0f); GL.Vertex3(bounds.X + bounds.Width, bounds.Y, 0f); GL.Vertex3(bounds.X + bounds.Width, bounds.Y + height, 0f); GL.Vertex3(bounds.X, bounds.Y + height, 0f); GL.End(); font.ResetVBOs(); font.PrintToVBO(text, new SizeF(maxWidth, float.MaxValue), alignment, new Vector2(bounds.X, bounds.Y)); font.LoadVBOs(); font.DrawVBOs(); yOffset += height; }