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/newview/llglsandbox.cpp | 59 ++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 29 deletions(-) (limited to 'linden/indra/newview/llglsandbox.cpp') diff --git a/linden/indra/newview/llglsandbox.cpp b/linden/indra/newview/llglsandbox.cpp index 45f674d..c5a626f 100644 --- a/linden/indra/newview/llglsandbox.cpp +++ b/linden/indra/newview/llglsandbox.cpp @@ -142,7 +142,7 @@ void LLAgent::renderAutoPilotTarget() gGL.pushMatrix(); // not textured - LLGLSNoTexture no_texture; + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); // lovely green glColor4f(0.f, 1.f, 1.f, 1.f); @@ -355,10 +355,11 @@ void LLCompass::draw() if (mBkgndTexture) { - mBkgndTexture->bind(); + gGL.getTexUnit(0)->bind(mBkgndTexture.get()); + gGL.color4f(1.0f, 1.0f, 1.0f, 1.0f); - gGL.begin(LLVertexBuffer::QUADS); + gGL.begin(LLRender::QUADS); gGL.texCoord2f(1.f, 1.f); gGL.vertex2i(width, height); @@ -381,10 +382,10 @@ void LLCompass::draw() if (mTexture) { - mTexture->bind(); + gGL.getTexUnit(0)->bind(mTexture.get()); gGL.color4f(1.0f, 1.0f, 1.0f, 1.0f); - gGL.begin(LLVertexBuffer::QUADS); + gGL.begin(LLRender::QUADS); gGL.texCoord2f(1.f, 1.f); gGL.vertex2i(width, height); @@ -426,9 +427,9 @@ void LLHorizontalCompass::draw() F32 left = center - COMPASS_RANGE; F32 right = center + COMPASS_RANGE; - mTexture->bind(); + gGL.getTexUnit(0)->bind(mTexture.get()); gGL.color4f(1.0f, 1.0f, 1.0f, 1.0f ); - gGL.begin( LLVertexBuffer::QUADS ); + gGL.begin( LLRender::QUADS ); gGL.texCoord2f(right, 1.f); gGL.vertex2i(width, height); @@ -447,7 +448,7 @@ void LLHorizontalCompass::draw() // Draw the focus line { - LLGLSNoTexture gls_no_texture; + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); gGL.color4fv( mFocusColor.mV ); gl_line_2d( half_width, 0, half_width, height ); } @@ -465,7 +466,7 @@ void LLWind::renderVectors() F32 region_width_meters = LLWorld::getInstance()->getRegionWidthInMeters(); - LLGLSNoTexture gls_no_texture; + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); gGL.pushMatrix(); LLVector3 origin_agent; origin_agent = gAgent.getPosAgentFromGlobal(mOriginGlobal); @@ -479,11 +480,11 @@ void LLWind::renderVectors() gGL.pushMatrix(); gGL.translatef((F32)i * region_width_meters/mSize, (F32)j * region_width_meters/mSize, 0.0); gGL.color3f(0,1,0); - gGL.begin(LLVertexBuffer::POINTS); + gGL.begin(LLRender::POINTS); gGL.vertex3f(0,0,0); gGL.end(); gGL.color3f(1,0,0); - gGL.begin(LLVertexBuffer::LINES); + gGL.begin(LLRender::LINES); gGL.vertex3f(x * 0.1f, y * 0.1f ,0.f); gGL.vertex3f(x, y, 0.f); gGL.end(); @@ -501,7 +502,7 @@ void LLViewerParcelMgr::renderRect(const LLVector3d &west_south_bottom_global, const LLVector3d &east_north_top_global ) { LLGLSUIDefault gls_ui; - LLGLSNoTexture gls_no_texture; + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); LLGLDepthTest gls_depth(GL_TRUE); LLVector3 west_south_bottom_agent = gAgent.getPosAgentFromGlobal(west_south_bottom_global); @@ -532,7 +533,7 @@ void LLViewerParcelMgr::renderRect(const LLVector3d &west_south_bottom_global, gGL.color4f(1.f, 1.f, 0.f, 1.f); // Cheat and give this the same pick-name as land - gGL.begin(LLVertexBuffer::LINES); + gGL.begin(LLRender::LINES); gGL.vertex3f(west, north, nw_bottom); gGL.vertex3f(west, north, nw_top); @@ -549,7 +550,7 @@ void LLViewerParcelMgr::renderRect(const LLVector3d &west_south_bottom_global, gGL.end(); gGL.color4f(1.f, 1.f, 0.f, 0.2f); - gGL.begin(LLVertexBuffer::QUADS); + gGL.begin(LLRender::QUADS); gGL.vertex3f(west, north, nw_bottom); gGL.vertex3f(west, north, nw_top); @@ -609,14 +610,14 @@ void LLViewerParcelMgr::renderParcel(LLParcel* parcel ) F32 ne_top = ne_bottom + POST_HEIGHT; F32 nw_top = nw_bottom + POST_HEIGHT; - LLGLSNoTexture gls_no_texture; + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); LLGLDepthTest gls_depth(GL_TRUE); LLUI::setLineWidth(2.f); gGL.color4f(0.f, 1.f, 1.f, 1.f); // Cheat and give this the same pick-name as land - gGL.begin(LLVertexBuffer::LINES); + gGL.begin(LLRender::LINES); gGL.vertex3f(west, north, nw_bottom); gGL.vertex3f(west, north, nw_top); @@ -633,7 +634,7 @@ void LLViewerParcelMgr::renderParcel(LLParcel* parcel ) gGL.end(); gGL.color4f(0.f, 1.f, 1.f, 0.2f); - gGL.begin(LLVertexBuffer::QUADS); + gGL.begin(LLRender::QUADS); gGL.vertex3f(west, north, nw_bottom); gGL.vertex3f(west, north, nw_top); @@ -759,7 +760,7 @@ void LLViewerParcelMgr::renderHighlightSegments(const U8* segments, LLViewerRegi bool has_segments = false; LLGLSUIDefault gls_ui; - LLGLSNoTexture gls_no_texture; + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); LLGLDepthTest gls_depth(GL_TRUE); gGL.color4f(1.f, 1.f, 0.f, 0.2f); @@ -786,7 +787,7 @@ void LLViewerParcelMgr::renderHighlightSegments(const U8* segments, LLViewerRegi if (!has_segments) { has_segments = true; - gGL.begin(LLVertexBuffer::QUADS); + gGL.begin(LLRender::QUADS); } renderOneSegment(x1, y1, x2, y2, PARCEL_POST_HEIGHT, SOUTH_MASK, regionp); } @@ -802,7 +803,7 @@ void LLViewerParcelMgr::renderHighlightSegments(const U8* segments, LLViewerRegi if (!has_segments) { has_segments = true; - gGL.begin(LLVertexBuffer::QUADS); + gGL.begin(LLRender::QUADS); } renderOneSegment(x1, y1, x2, y2, PARCEL_POST_HEIGHT, WEST_MASK, regionp); } @@ -850,14 +851,14 @@ void LLViewerParcelMgr::renderCollisionSegments(U8* segments, BOOL use_pass, LLV if (use_pass && (mCollisionBanned == BA_NOT_ON_LIST)) { - LLViewerImage::bindTexture(mPassImage); + gGL.getTexUnit(0)->bind(mPassImage); } else { - LLViewerImage::bindTexture(mBlockedImage); + gGL.getTexUnit(0)->bind(mBlockedImage); } - gGL.begin(LLVertexBuffer::QUADS); + gGL.begin(LLRender::QUADS); for (y = 0; y < STRIDE; y++) { @@ -1011,10 +1012,10 @@ void LLViewerObjectList::renderObjectBeacons() LLGLSUIDefault gls_ui; { - LLGLSNoTexture gls_ui_no_texture; + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); S32 last_line_width = -1; - // gGL.begin(LLVertexBuffer::LINES); // Always happens in (line_width != last_line_width) + // gGL.begin(LLRender::LINES); // Always happens in (line_width != last_line_width) for (S32 i = 0; i < mDebugBeacons.count(); i++) { @@ -1031,7 +1032,7 @@ void LLViewerObjectList::renderObjectBeacons() } glLineWidth( (F32)line_width ); last_line_width = line_width; - gGL.begin(LLVertexBuffer::LINES); + gGL.begin(LLRender::LINES); } const LLVector3 &thisline = debug_beacon.mPositionAgent; @@ -1049,11 +1050,11 @@ void LLViewerObjectList::renderObjectBeacons() } { - LLGLSNoTexture gls_ui_no_texture; + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); LLGLDepthTest gls_depth(GL_TRUE); S32 last_line_width = -1; - // gGL.begin(LLVertexBuffer::LINES); // Always happens in (line_width != last_line_width) + // gGL.begin(LLRender::LINES); // Always happens in (line_width != last_line_width) for (S32 i = 0; i < mDebugBeacons.count(); i++) { @@ -1069,7 +1070,7 @@ void LLViewerObjectList::renderObjectBeacons() } glLineWidth( (F32)line_width ); last_line_width = line_width; - gGL.begin(LLVertexBuffer::LINES); + gGL.begin(LLRender::LINES); } const LLVector3 &thisline = debug_beacon.mPositionAgent; -- 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/newview/llglsandbox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden/indra/newview/llglsandbox.cpp') diff --git a/linden/indra/newview/llglsandbox.cpp b/linden/indra/newview/llglsandbox.cpp index c5a626f..7506004 100644 --- a/linden/indra/newview/llglsandbox.cpp +++ b/linden/indra/newview/llglsandbox.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2003&license=viewergpl$ * - * Copyright (c) 2003-2008, Linden Research, Inc. + * Copyright (c) 2003-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