From 7abecb48babe6a6f09bf6692ba55076546cfced9 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Mon, 1 Dec 2008 17:39:58 -0600 Subject: Second Life viewer sources 1.22.0-RC --- linden/indra/llrender/llfontgl.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'linden/indra/llrender/llfontgl.cpp') diff --git a/linden/indra/llrender/llfontgl.cpp b/linden/indra/llrender/llfontgl.cpp index a328196..2705516 100644 --- a/linden/indra/llrender/llfontgl.cpp +++ b/linden/indra/llrender/llfontgl.cpp @@ -148,7 +148,7 @@ void LLFontGL::init() { mImageGLp = new LLImageGL(FALSE); //RN: use nearest mipmap filtering to obviate the need to do pixel-accurate positioning - mImageGLp->bind(); + gGL.getTexUnit(0)->bind(mImageGLp); // we allow bilinear filtering to get sub-pixel positioning for drop shadows //mImageGLp->setMipFilterNearest(TRUE, TRUE); } @@ -533,7 +533,7 @@ BOOL LLFontGL::loadFace(const std::string& filename, return FALSE; } mImageGLp->createGLTexture(0, mRawImageGLp); - mImageGLp->bind(); + gGL.getTexUnit(0)->bind(mImageGLp); mImageGLp->setMipFilterNearest(TRUE, TRUE); return TRUE; } @@ -547,7 +547,7 @@ BOOL LLFontGL::addChar(const llwchar wch) stop_glerror(); mImageGLp->setSubImage(mRawImageGLp, 0, 0, mImageGLp->getWidth(), mImageGLp->getHeight()); - mImageGLp->bind(); + gGL.getTexUnit(0)->bind(mImageGLp); mImageGLp->setMipFilterNearest(TRUE, TRUE); stop_glerror(); return TRUE; @@ -583,7 +583,7 @@ S32 LLFontGL::render(const LLWString &wstr, return wstr.length() ; } - LLGLEnable tex(GL_TEXTURE_2D); + gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE); if (wstr.empty()) { @@ -663,7 +663,7 @@ S32 LLFontGL::render(const LLWString &wstr, // Bind the font texture - mImageGLp->bind(0); + gGL.getTexUnit(0)->bind(mImageGLp); // Not guaranteed to be set correctly gGL.setSceneBlendType(LLRender::BT_ALPHA); @@ -761,7 +761,7 @@ S32 LLFontGL::render(const LLWString &wstr, break; } - ext_image->bind(); + gGL.getTexUnit(0)->bind(ext_image); const F32 ext_x = cur_render_x + (EXT_X_BEARING * sScaleX); const F32 ext_y = cur_render_y + (EXT_Y_BEARING * sScaleY + mAscender - mLineHeight); @@ -795,7 +795,7 @@ S32 LLFontGL::render(const LLWString &wstr, cur_render_x = cur_x; // Bind the font texture - mImageGLp->bind(); + gGL.getTexUnit(0)->bind(mImageGLp); } else { @@ -863,8 +863,8 @@ S32 LLFontGL::render(const LLWString &wstr, if (style & UNDERLINE) { - LLGLSNoTexture no_texture; - gGL.begin(LLVertexBuffer::LINES); + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + gGL.begin(LLRender::LINES); gGL.vertex2f(start_x, cur_y - (mDescender)); gGL.vertex2f(cur_x, cur_y - (mDescender)); gGL.end(); @@ -1359,7 +1359,7 @@ void LLFontGL::drawGlyph(const LLRectf& screen_rect, const LLRectf& uv_rect, con F32 slant_offset; slant_offset = ((style & ITALIC) ? ( -mAscender * 0.2f) : 0.f); - gGL.begin(LLVertexBuffer::QUADS); + gGL.begin(LLRender::QUADS); { //FIXME: bold and drop shadow are mutually exclusive only for convenience //Allow both when we need them. -- cgit v1.1 From a87e38229921b48c32187c672a942516722f1b52 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sun, 11 Jan 2009 16:10:39 -0600 Subject: Second Life viewer sources 1.22.5-RC --- linden/indra/llrender/llfontgl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden/indra/llrender/llfontgl.cpp') diff --git a/linden/indra/llrender/llfontgl.cpp b/linden/indra/llrender/llfontgl.cpp index 2705516..526f1a9 100644 --- a/linden/indra/llrender/llfontgl.cpp +++ b/linden/indra/llrender/llfontgl.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2001&license=viewergpl$ * - * Copyright (c) 2001-2008, Linden Research, Inc. + * Copyright (c) 2001-2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab -- cgit v1.1