From d15062a6f5c3b1e420fbbb81c1e06a644d9bd9b9 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Thu, 13 Mar 2008 09:34:09 +0000 Subject: [PATCH] Push/Pop AttribMask.ColorBufferBit in TextPrinter.Begin/End float[] viewport should have 4 members, not 6. --- Source/Utilities/Fonts/TextPrinter.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Utilities/Fonts/TextPrinter.cs b/Source/Utilities/Fonts/TextPrinter.cs index c7fad20c..83f2b1d5 100644 --- a/Source/Utilities/Fonts/TextPrinter.cs +++ b/Source/Utilities/Fonts/TextPrinter.cs @@ -29,7 +29,7 @@ namespace OpenTK.Graphics //static char[] split_chars = new char[] { ' ', '\n', '\t', ',', '.', '/', '?', '!', ';', '\\', '-', '+', '*', '=' }; static bool functionality_checked = false; static ITextPrinterImplementation printer; - float[] viewport = new float[6]; + float[] viewport = new float[4]; // 8 chars by default Vector2[] vertices = new Vector2[8 * 8]; // Interleaved, vertex, texcoord, vertex, etc... ushort[] indices = new ushort[6 * 8]; @@ -307,6 +307,7 @@ namespace OpenTK.Graphics GL.PushAttrib(AttribMask.TextureBit); GL.PushAttrib(AttribMask.EnableBit); + GL.PushAttrib(AttribMask.ColorBufferBit); GL.Enable(EnableCap.Texture2D); GL.Enable(EnableCap.Blend); @@ -326,6 +327,7 @@ namespace OpenTK.Graphics { GL.PopAttrib(); GL.PopAttrib(); + GL.PopAttrib(); GL.MatrixMode(MatrixMode.Modelview); GL.PopMatrix();