Reset texture matrix in GL1TextOutputProvider .Begin() and restore in GL1TextOutputProvider .End(). Fixes bug [#810] "Bad texture matrix in TextPrinter" (http://www.opentk.com/node/810)).

This commit is contained in:
the_fiddler 2009-05-05 20:13:21 +00:00
parent 1d80794d6b
commit c62f510927

View file

@ -198,6 +198,10 @@ namespace OpenTK.Graphics.Text
GL.PushMatrix(); GL.PushMatrix();
GL.LoadIdentity(); GL.LoadIdentity();
GL.MatrixMode(MatrixMode.Texture);
GL.PushMatrix();
GL.LoadIdentity();
GL.MatrixMode((MatrixMode)current_matrix); GL.MatrixMode((MatrixMode)current_matrix);
} }
@ -215,6 +219,9 @@ namespace OpenTK.Graphics.Text
int current_matrix; int current_matrix;
GL.GetInteger(GetPName.MatrixMode, out current_matrix); GL.GetInteger(GetPName.MatrixMode, out current_matrix);
GL.MatrixMode(MatrixMode.Texture);
GL.PopMatrix();
GL.MatrixMode(MatrixMode.Modelview); GL.MatrixMode(MatrixMode.Modelview);
GL.PopMatrix(); GL.PopMatrix();