Use rgba textures instead of alpha on SavagePro/Twister renderers. Workaround for bug [#833] "TextPrinter problem" (http://www.opentk.com/node/833).

This commit is contained in:
the_fiddler 2009-05-07 10:38:05 +00:00
parent 91c36efd6e
commit 3c522d26ee

View file

@ -22,8 +22,6 @@ namespace OpenTK.Graphics.Text
this.quality = TextQuality.Medium; this.quality = TextQuality.Medium;
else else
this.quality = quality; this.quality = quality;
cache = new GlyphCache<AlphaTexture2D>();
} }
#endregion #endregion
@ -47,7 +45,17 @@ namespace OpenTK.Graphics.Text
protected override GlyphCache Cache protected override GlyphCache Cache
{ {
get { return cache; } get
{
if (cache == null)
{
if (GL.GetString(StringName.Renderer).Contains("ProSavage/Twister"))
cache = new GlyphCache<RgbaTexture2D>();
else
cache = new GlyphCache<AlphaTexture2D>();
}
return cache;
}
} }
#endregion #endregion