From d90ca2b6f7e870aafcf74732abffdc53477e375d Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 15 Sep 2005 15:19:00 +0000 Subject: [PATCH] prevent bleeding at font texture edge --- panda/src/text/dynamicTextPage.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/panda/src/text/dynamicTextPage.cxx b/panda/src/text/dynamicTextPage.cxx index 95dd47d632..5bddc4104d 100644 --- a/panda/src/text/dynamicTextPage.cxx +++ b/panda/src/text/dynamicTextPage.cxx @@ -51,10 +51,11 @@ DynamicTextPage(DynamicTextFont *font, int page_number) : set_anisotropic_degree(_font->get_anisotropic_degree()); - // It's slightly better to let the texture clamp, rather than - // wrapping, so we're less likely to get bleeding at the edges. - set_wrap_u(WM_clamp); - set_wrap_v(WM_clamp); + // Clamp to an explicit invisible border, so we don't get bleeding + // at the edges at all. + set_wrap_u(WM_border_color); + set_wrap_v(WM_border_color); + set_border_color(Colorf(0.0f, 0.0f, 0.0f, 0.0f)); } ////////////////////////////////////////////////////////////////////