Push/Pop AttribMask.ColorBufferBit in TextPrinter.Begin/End

float[] viewport should have 4 members, not 6.
This commit is contained in:
the_fiddler 2008-03-13 09:34:09 +00:00
parent c79f4abbe9
commit 9d1f1ecc4c

View file

@ -29,7 +29,7 @@ namespace OpenTK.Graphics
//static char[] split_chars = new char[] { ' ', '\n', '\t', ',', '.', '/', '?', '!', ';', '\\', '-', '+', '*', '=' }; //static char[] split_chars = new char[] { ' ', '\n', '\t', ',', '.', '/', '?', '!', ';', '\\', '-', '+', '*', '=' };
static bool functionality_checked = false; static bool functionality_checked = false;
static ITextPrinterImplementation printer; static ITextPrinterImplementation printer;
float[] viewport = new float[6]; float[] viewport = new float[4];
// 8 chars by default // 8 chars by default
Vector2[] vertices = new Vector2[8 * 8]; // Interleaved, vertex, texcoord, vertex, etc... Vector2[] vertices = new Vector2[8 * 8]; // Interleaved, vertex, texcoord, vertex, etc...
ushort[] indices = new ushort[6 * 8]; ushort[] indices = new ushort[6 * 8];
@ -307,6 +307,7 @@ namespace OpenTK.Graphics
GL.PushAttrib(AttribMask.TextureBit); GL.PushAttrib(AttribMask.TextureBit);
GL.PushAttrib(AttribMask.EnableBit); GL.PushAttrib(AttribMask.EnableBit);
GL.PushAttrib(AttribMask.ColorBufferBit);
GL.Enable(EnableCap.Texture2D); GL.Enable(EnableCap.Texture2D);
GL.Enable(EnableCap.Blend); GL.Enable(EnableCap.Blend);
@ -326,6 +327,7 @@ namespace OpenTK.Graphics
{ {
GL.PopAttrib(); GL.PopAttrib();
GL.PopAttrib(); GL.PopAttrib();
GL.PopAttrib();
GL.MatrixMode(MatrixMode.Modelview); GL.MatrixMode(MatrixMode.Modelview);
GL.PopMatrix(); GL.PopMatrix();