From 466e4af8f518db5d9b79901aa575db42de91b7e4 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Thu, 7 May 2009 10:38:05 +0000 Subject: [PATCH] Use rgba textures instead of alpha on SavagePro/Twister renderers. Workaround for bug [#833] "TextPrinter problem" (http://www.opentk.com/node/833). --- .../Graphics/Text/GL11TextOutputProvider.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Source/Utilities/Graphics/Text/GL11TextOutputProvider.cs b/Source/Utilities/Graphics/Text/GL11TextOutputProvider.cs index 8cb9c2fa..96d42b8e 100644 --- a/Source/Utilities/Graphics/Text/GL11TextOutputProvider.cs +++ b/Source/Utilities/Graphics/Text/GL11TextOutputProvider.cs @@ -22,8 +22,6 @@ namespace OpenTK.Graphics.Text this.quality = TextQuality.Medium; else this.quality = quality; - - cache = new GlyphCache(); } #endregion @@ -47,7 +45,17 @@ namespace OpenTK.Graphics.Text protected override GlyphCache Cache { - get { return cache; } + get + { + if (cache == null) + { + if (GL.GetString(StringName.Renderer).Contains("ProSavage/Twister")) + cache = new GlyphCache(); + else + cache = new GlyphCache(); + } + return cache; + } } #endregion