From 18a6ad324745dfc77d08aa40ba40f71208737c43 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Sat, 14 Feb 2009 08:12:14 +0000 Subject: [PATCH] Applied rdrake's patch: * fixes output with TextQuality.High and a non-white current color. * pushes/pops CurrentBit attribute when rendering text. --- Source/Utilities/Graphics/Text/GL12TextOutputProvider.cs | 1 + Source/Utilities/Graphics/Text/GL1TextOutputProvider.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Utilities/Graphics/Text/GL12TextOutputProvider.cs b/Source/Utilities/Graphics/Text/GL12TextOutputProvider.cs index 3942f87c..eb9e8e02 100644 --- a/Source/Utilities/Graphics/Text/GL12TextOutputProvider.cs +++ b/Source/Utilities/Graphics/Text/GL12TextOutputProvider.cs @@ -32,6 +32,7 @@ namespace OpenTK.Graphics.Text protected override void SetColor(Color color) { + GL.Color3(Color.White); GL.BlendColor(color); } diff --git a/Source/Utilities/Graphics/Text/GL1TextOutputProvider.cs b/Source/Utilities/Graphics/Text/GL1TextOutputProvider.cs index 6731f35e..2de453d0 100644 --- a/Source/Utilities/Graphics/Text/GL1TextOutputProvider.cs +++ b/Source/Utilities/Graphics/Text/GL1TextOutputProvider.cs @@ -65,7 +65,7 @@ namespace OpenTK.Graphics.Text public void Print(TextBlock block, Color color, IGlyphRasterizer rasterizer) { - GL.PushAttrib(AttribMask.TextureBit | AttribMask.EnableBit | AttribMask.ColorBufferBit | AttribMask.DepthBufferBit); + GL.PushAttrib(AttribMask.CurrentBit | AttribMask.TextureBit | AttribMask.EnableBit | AttribMask.ColorBufferBit | AttribMask.DepthBufferBit); GL.Enable(EnableCap.Texture2D); GL.Enable(EnableCap.Blend);