aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerparceloverlay.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llviewerparceloverlay.cpp47
1 files changed, 26 insertions, 21 deletions
diff --git a/linden/indra/newview/llviewerparceloverlay.cpp b/linden/indra/newview/llviewerparceloverlay.cpp
index 7d0b2b4..b50ddb6 100644
--- a/linden/indra/newview/llviewerparceloverlay.cpp
+++ b/linden/indra/newview/llviewerparceloverlay.cpp
@@ -36,7 +36,7 @@
36// indra includes 36// indra includes
37#include "llparcel.h" 37#include "llparcel.h"
38#include "llgl.h" 38#include "llgl.h"
39#include "llglimmediate.h" 39#include "llrender.h"
40#include "v4color.h" 40#include "v4color.h"
41#include "v2math.h" 41#include "v2math.h"
42 42
@@ -48,6 +48,8 @@
48#include "llagent.h" 48#include "llagent.h"
49#include "llviewercamera.h" 49#include "llviewercamera.h"
50#include "llviewerimagelist.h" 50#include "llviewerimagelist.h"
51#include "llselectmgr.h"
52#include "llfloatertools.h"
51#include "llglheaders.h" 53#include "llglheaders.h"
52 54
53const U8 OVERLAY_IMG_COMPONENTS = 4; 55const U8 OVERLAY_IMG_COMPONENTS = 4;
@@ -69,7 +71,7 @@ LLViewerParcelOverlay::LLViewerParcelOverlay(LLViewerRegion* region, F32 region_
69 mTexture = new LLImageGL(FALSE); 71 mTexture = new LLImageGL(FALSE);
70 mImageRaw = new LLImageRaw(mParcelGridsPerEdge, mParcelGridsPerEdge, OVERLAY_IMG_COMPONENTS); 72 mImageRaw = new LLImageRaw(mParcelGridsPerEdge, mParcelGridsPerEdge, OVERLAY_IMG_COMPONENTS);
71 mTexture->createGLTexture(0, mImageRaw); 73 mTexture->createGLTexture(0, mImageRaw);
72 glActiveTextureARB(GL_TEXTURE0_ARB); 74 gGL.getTexUnit(0)->activate();
73 mTexture->bind(0); 75 mTexture->bind(0);
74 mTexture->setClamp(TRUE, TRUE); 76 mTexture->setClamp(TRUE, TRUE);
75 mTexture->setMipFilterNearest(TRUE); 77 mTexture->setMipFilterNearest(TRUE);
@@ -839,31 +841,34 @@ S32 LLViewerParcelOverlay::renderPropertyLines ()
839 841
840 gGL.end(); 842 gGL.end();
841 843
842 LLGLDepthTest depth(GL_TRUE, GL_FALSE, GL_GREATER); 844 if (LLSelectMgr::sRenderHiddenSelections && gFloaterTools && gFloaterTools->getVisible())
843 845 {
844 colorp = mColorArray + BYTES_PER_COLOR * i; 846 LLGLDepthTest depth(GL_TRUE, GL_FALSE, GL_GREATER);
845 vertexp = mVertexArray + FLOATS_PER_VERTEX * i; 847
848 colorp = mColorArray + BYTES_PER_COLOR * i;
849 vertexp = mVertexArray + FLOATS_PER_VERTEX * i;
846 850
847 gGL.begin(LLVertexBuffer::TRIANGLE_STRIP); 851 gGL.begin(LLVertexBuffer::TRIANGLE_STRIP);
848 852
849 for (j = 0; j < vertex_per_edge; j++) 853 for (j = 0; j < vertex_per_edge; j++)
850 { 854 {
851 U8 color[4]; 855 U8 color[4];
852 color[0] = colorp[0]; 856 color[0] = colorp[0];
853 color[1] = colorp[1]; 857 color[1] = colorp[1];
854 color[2] = colorp[2]; 858 color[2] = colorp[2];
855 color[3] = colorp[3]/4; 859 color[3] = colorp[3]/4;
856 860
857 gGL.color4ubv(color); 861 gGL.color4ubv(color);
858 gGL.vertex3fv(vertexp); 862 gGL.vertex3fv(vertexp);
859 863
860 colorp += BYTES_PER_COLOR; 864 colorp += BYTES_PER_COLOR;
861 vertexp += FLOATS_PER_VERTEX; 865 vertexp += FLOATS_PER_VERTEX;
862 } 866 }
863 867
864 drawn += vertex_per_edge; 868 drawn += vertex_per_edge;
865 869
866 gGL.end(); 870 gGL.end();
871 }
867 872
868 } 873 }
869 874