aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llrender/llfontgl.cpp4
-rw-r--r--linden/indra/llrender/llglimmediate.cpp117
-rw-r--r--linden/indra/llrender/llglimmediate.h11
-rw-r--r--linden/indra/llrender/llvertexbuffer.cpp65
-rw-r--r--linden/indra/llrender/llvertexbuffer.h8
-rw-r--r--linden/indra/llui/llui.cpp56
-rw-r--r--linden/indra/llui/llview.cpp2
-rw-r--r--linden/indra/llui/llviewborder.cpp2
-rw-r--r--linden/indra/llwindow/llgl.h15
-rw-r--r--linden/indra/lscript/lscript_compile/indra.l6
-rw-r--r--linden/indra/lscript/lscript_compile/lscript_compile.vcproj6
-rw-r--r--linden/indra/lscript/lscript_compile/lscript_compile_vc8.vcproj6
-rw-r--r--linden/indra/lscript/lscript_compile/lscript_compile_vc9.vcproj6
-rw-r--r--linden/indra/newview/llbox.cpp2
-rw-r--r--linden/indra/newview/lldrawpoolavatar.cpp8
-rw-r--r--linden/indra/newview/lldynamictexture.cpp9
-rw-r--r--linden/indra/newview/llface.cpp2
-rw-r--r--linden/indra/newview/llfasttimerview.cpp4
-rw-r--r--linden/indra/newview/llfloateranimpreview.cpp11
-rw-r--r--linden/indra/newview/llfloatercolorpicker.cpp2
-rw-r--r--linden/indra/newview/llfloaterimagepreview.cpp17
-rw-r--r--linden/indra/newview/llfloatersnapshot.cpp8
-rw-r--r--linden/indra/newview/llglsandbox.cpp32
-rw-r--r--linden/indra/newview/llhudeffectlookat.cpp2
-rw-r--r--linden/indra/newview/llhudeffectpointat.cpp2
-rw-r--r--linden/indra/newview/llhudicon.cpp2
-rw-r--r--linden/indra/newview/llhudobject.cpp2
-rw-r--r--linden/indra/newview/llhudtext.cpp2
-rw-r--r--linden/indra/newview/lljoystickbutton.cpp2
-rw-r--r--linden/indra/newview/llmanip.cpp6
-rw-r--r--linden/indra/newview/llmaniprotate.cpp10
-rw-r--r--linden/indra/newview/llmanipscale.cpp10
-rw-r--r--linden/indra/newview/llmaniptranslate.cpp26
-rw-r--r--linden/indra/newview/llnetmap.cpp10
-rw-r--r--linden/indra/newview/llselectmgr.cpp4
-rw-r--r--linden/indra/newview/llspatialpartition.cpp18
-rw-r--r--linden/indra/newview/lltexlayer.cpp4
-rw-r--r--linden/indra/newview/lltexturectrl.cpp2
-rw-r--r--linden/indra/newview/lltoolbrush.cpp2
-rw-r--r--linden/indra/newview/lltoolmorph.cpp8
-rw-r--r--linden/indra/newview/lltracker.cpp4
-rw-r--r--linden/indra/newview/llviewerdisplay.cpp31
-rw-r--r--linden/indra/newview/llviewerjoint.cpp6
-rw-r--r--linden/indra/newview/llviewerjointattachment.cpp2
-rw-r--r--linden/indra/newview/llviewermessage.cpp6
-rw-r--r--linden/indra/newview/llviewerobjectlist.cpp4
-rw-r--r--linden/indra/newview/llviewerparceloverlay.cpp4
-rw-r--r--linden/indra/newview/llviewerwindow.cpp8
-rw-r--r--linden/indra/newview/llvoavatar.cpp8
-rw-r--r--linden/indra/newview/llvoicevisualizer.cpp8
-rw-r--r--linden/indra/newview/llwebbrowserctrl.cpp8
-rw-r--r--linden/indra/newview/llworldmapview.cpp18
-rw-r--r--linden/indra/newview/pipeline.cpp47
-rw-r--r--linden/indra/newview/skins/xui/de/floater_gesture.xml2
-rw-r--r--linden/indra/newview/skins/xui/de/floater_joystick.xml7
-rw-r--r--linden/indra/newview/skins/xui/de/panel_preferences_graphics1.xml9
-rw-r--r--linden/indra/newview/skins/xui/en-us/floater_tools.xml22
-rw-r--r--linden/indra/newview/skins/xui/ja/floater_gesture.xml4
-rw-r--r--linden/indra/newview/skins/xui/ja/floater_joystick.xml3
-rw-r--r--linden/indra/newview/skins/xui/ja/panel_group_invite.xml16
-rw-r--r--linden/indra/newview/skins/xui/ja/panel_place.xml8
-rw-r--r--linden/indra/newview/skins/xui/ja/panel_place_small.xml10
-rw-r--r--linden/indra/newview/skins/xui/ko/floater_joystick.xml3
63 files changed, 367 insertions, 382 deletions
diff --git a/linden/indra/llrender/llfontgl.cpp b/linden/indra/llrender/llfontgl.cpp
index 53e8c2b..938dd73 100644
--- a/linden/indra/llrender/llfontgl.cpp
+++ b/linden/indra/llrender/llfontgl.cpp
@@ -845,7 +845,7 @@ S32 LLFontGL::render(const LLWString &wstr,
845 if (style & UNDERLINE) 845 if (style & UNDERLINE)
846 { 846 {
847 LLGLSNoTexture no_texture; 847 LLGLSNoTexture no_texture;
848 gGL.begin(GL_LINES); 848 gGL.begin(LLVertexBuffer::LINES);
849 gGL.vertex2f(start_x, cur_y - (mDescender)); 849 gGL.vertex2f(start_x, cur_y - (mDescender));
850 gGL.vertex2f(cur_x, cur_y - (mDescender)); 850 gGL.vertex2f(cur_x, cur_y - (mDescender));
851 gGL.end(); 851 gGL.end();
@@ -1340,7 +1340,7 @@ void LLFontGL::drawGlyph(const LLRectf& screen_rect, const LLRectf& uv_rect, con
1340 F32 slant_offset; 1340 F32 slant_offset;
1341 slant_offset = ((style & ITALIC) ? ( -mAscender * 0.2f) : 0.f); 1341 slant_offset = ((style & ITALIC) ? ( -mAscender * 0.2f) : 0.f);
1342 1342
1343 gGL.begin(GL_QUADS); 1343 gGL.begin(LLVertexBuffer::QUADS);
1344 { 1344 {
1345 //FIXME: bold and drop shadow are mutually exclusive only for convenience 1345 //FIXME: bold and drop shadow are mutually exclusive only for convenience
1346 //Allow both when we need them. 1346 //Allow both when we need them.
diff --git a/linden/indra/llrender/llglimmediate.cpp b/linden/indra/llrender/llglimmediate.cpp
index da9239d..edc694a 100644
--- a/linden/indra/llrender/llglimmediate.cpp
+++ b/linden/indra/llrender/llglimmediate.cpp
@@ -36,64 +36,19 @@
36 36
37LLGLImmediate gGL; 37LLGLImmediate gGL;
38 38
39#ifdef LL_RELEASE_FOR_DOWNLOAD
40#define IMM_ERRS llwarns
41#else
42#define IMM_ERRS llerrs
43#endif
44
45bool LLGLImmediate::sClever = false; 39bool LLGLImmediate::sClever = false;
46BOOL LLGLImmediate::sStarted = FALSE; 40
41const U32 immediate_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_COLOR | LLVertexBuffer::MAP_TEXCOORD;
47 42
48LLGLImmediate::LLGLImmediate() 43LLGLImmediate::LLGLImmediate()
49{ 44{
50 mCount = 0; 45 mCount = 0;
51 mMode = GL_TRIANGLES; 46 mMode = LLVertexBuffer::TRIANGLES;
52 memset(mBuffer, 0, sizeof(Vertex)*4096); 47 mBuffer = new LLVertexBuffer(immediate_mask, 0);
53} 48 mBuffer->allocateBuffer(4096, 0, TRUE);
54 49 mBuffer->getVertexStrider(mVerticesp);
55void LLGLImmediate::start() 50 mBuffer->getTexCoordStrider(mTexcoordsp);
56{ 51 mBuffer->getColorStrider(mColorsp);
57 if(sClever)
58 {
59 if (sStarted)
60 {
61 llerrs << "Redundant start." << llendl;
62 }
63
64 LLVertexBuffer::unbind();
65 sStarted = TRUE;
66
67 glEnableClientState(GL_VERTEX_ARRAY);
68 glEnableClientState(GL_TEXTURE_COORD_ARRAY);
69 glEnableClientState(GL_COLOR_ARRAY);
70
71 const U32 stride = sizeof(Vertex);
72
73 glVertexPointer(3, GL_FLOAT, stride, &(mBuffer[0].v));
74 glTexCoordPointer(2, GL_FLOAT, stride, &(mBuffer[0].uv));
75 glColorPointer(4, GL_UNSIGNED_BYTE, stride, &(mBuffer[0].c));
76
77 color4f(1,1,1,1);
78 }
79}
80
81void LLGLImmediate::stop()
82{
83 if (sClever)
84 {
85 if (!sStarted)
86 {
87 llerrs << "Redundant stop." << llendl;
88 }
89
90 flush();
91
92 sStarted = FALSE;
93
94 glDisableClientState(GL_TEXTURE_COORD_ARRAY);
95 glDisableClientState(GL_COLOR_ARRAY);
96 }
97} 52}
98 53
99void LLGLImmediate::translatef(const GLfloat& x, const GLfloat& y, const GLfloat& z) 54void LLGLImmediate::translatef(const GLfloat& x, const GLfloat& y, const GLfloat& z)
@@ -116,10 +71,7 @@ void LLGLImmediate::popMatrix()
116 71
117void LLGLImmediate::blendFunc(GLenum sfactor, GLenum dfactor) 72void LLGLImmediate::blendFunc(GLenum sfactor, GLenum dfactor)
118{ 73{
119 if (sStarted) 74 flush();
120 {
121 flush();
122 }
123 glBlendFunc(sfactor, dfactor); 75 glBlendFunc(sfactor, dfactor);
124} 76}
125 77
@@ -129,10 +81,10 @@ void LLGLImmediate::begin(const GLuint& mode)
129 { 81 {
130 if (mode != mMode) 82 if (mode != mMode)
131 { 83 {
132 if (mMode == GL_QUADS || 84 if (mMode == LLVertexBuffer::QUADS ||
133 mMode == GL_LINES || 85 mMode == LLVertexBuffer::LINES ||
134 mMode == GL_TRIANGLES || 86 mMode == LLVertexBuffer::TRIANGLES ||
135 mMode == GL_POINTS) 87 mMode == LLVertexBuffer::POINTS)
136 { 88 {
137 flush(); 89 flush();
138 } 90 }
@@ -146,7 +98,7 @@ void LLGLImmediate::begin(const GLuint& mode)
146 } 98 }
147 else 99 else
148 { 100 {
149 glBegin(mode); 101 glBegin(LLVertexBuffer::sGLMode[mode]);
150 } 102 }
151} 103}
152 104
@@ -156,13 +108,14 @@ void LLGLImmediate::end()
156 { 108 {
157 if (mCount == 0) 109 if (mCount == 0)
158 { 110 {
159 IMM_ERRS << "GL begin and end called with no vertices specified." << llendl; 111 return;
112 //IMM_ERRS << "GL begin and end called with no vertices specified." << llendl;
160 } 113 }
161 114
162 if ((mMode != GL_QUADS && 115 if ((mMode != LLVertexBuffer::QUADS &&
163 mMode != GL_LINES && 116 mMode != LLVertexBuffer::LINES &&
164 mMode != GL_TRIANGLES && 117 mMode != LLVertexBuffer::TRIANGLES &&
165 mMode != GL_POINTS) || 118 mMode != LLVertexBuffer::POINTS) ||
166 mCount > 2048) 119 mCount > 2048)
167 { 120 {
168 flush(); 121 flush();
@@ -221,12 +174,13 @@ void LLGLImmediate::flush()
221 llerrs << "foo 6" << llendl; 174 llerrs << "foo 6" << llendl;
222 } 175 }
223#endif 176#endif
224 if (!sStarted) 177
225 { 178 mBuffer->setBuffer(immediate_mask);
226 llerrs << "Drawing call issued outside start/stop." << llendl; 179 mBuffer->drawArrays(mMode, 0, mCount);
227 } 180
228 glDrawArrays(mMode, 0, mCount); 181 mVerticesp[0] = mVerticesp[mCount];
229 mBuffer[0] = mBuffer[mCount]; 182 mTexcoordsp[0] = mTexcoordsp[mCount];
183 mColorsp[0] = mColorsp[mCount];
230 mCount = 0; 184 mCount = 0;
231 } 185 }
232 } 186 }
@@ -242,13 +196,13 @@ void LLGLImmediate::vertex3f(const GLfloat& x, const GLfloat& y, const GLfloat&
242 return; 196 return;
243 } 197 }
244 198
245 mBuffer[mCount].v[0] = x; 199 mVerticesp[mCount] = LLVector3(x,y,z);
246 mBuffer[mCount].v[1] = y;
247 mBuffer[mCount].v[2] = z;
248 mCount++; 200 mCount++;
249 if (mCount < 4096) 201 if (mCount < 4096)
250 { 202 {
251 mBuffer[mCount] = mBuffer[mCount-1]; 203 mVerticesp[mCount] = mVerticesp[mCount-1];
204 mColorsp[mCount] = mColorsp[mCount-1];
205 mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
252 } 206 }
253 } 207 }
254 else 208 else
@@ -281,8 +235,7 @@ void LLGLImmediate::texCoord2f(const GLfloat& x, const GLfloat& y)
281{ 235{
282 if (sClever) 236 if (sClever)
283 { 237 {
284 mBuffer[mCount].uv[0] = x; 238 mTexcoordsp[mCount] = LLVector2(x,y);
285 mBuffer[mCount].uv[1] = y;
286 } 239 }
287 else 240 else
288 { 241 {
@@ -304,10 +257,7 @@ void LLGLImmediate::color4ub(const GLubyte& r, const GLubyte& g, const GLubyte&
304{ 257{
305 if (sClever) 258 if (sClever)
306 { 259 {
307 mBuffer[mCount].c[0] = r; 260 mColorsp[mCount] = LLColor4U(r,g,b,a);
308 mBuffer[mCount].c[1] = g;
309 mBuffer[mCount].c[2] = b;
310 mBuffer[mCount].c[3] = a;
311 } 261 }
312 else 262 else
313 { 263 {
@@ -345,7 +295,6 @@ void LLGLImmediate::color3fv(const GLfloat* c)
345 295
346void LLGLImmediate::setClever(bool do_clever) 296void LLGLImmediate::setClever(bool do_clever)
347{ 297{
348 llassert(!sStarted);
349 llassert(mCount == 0); 298 llassert(mCount == 0);
350 299
351 sClever = do_clever; 300 sClever = do_clever;
diff --git a/linden/indra/llrender/llglimmediate.h b/linden/indra/llrender/llglimmediate.h
index cf4dc4f..e0cddff 100644
--- a/linden/indra/llrender/llglimmediate.h
+++ b/linden/indra/llrender/llglimmediate.h
@@ -40,6 +40,7 @@
40#include "stdtypes.h" 40#include "stdtypes.h"
41#include "llgltypes.h" 41#include "llgltypes.h"
42#include "llglheaders.h" 42#include "llglheaders.h"
43#include "llvertexbuffer.h"
43 44
44class LLGLImmediate 45class LLGLImmediate
45{ 46{
@@ -50,8 +51,6 @@ public:
50 void pushMatrix(); 51 void pushMatrix();
51 void popMatrix(); 52 void popMatrix();
52 void blendFunc(GLenum sfactor, GLenum dfactor); 53 void blendFunc(GLenum sfactor, GLenum dfactor);
53 void start();
54 void stop();
55 void flush(); 54 void flush();
56 55
57 void begin(const GLuint& mode); 56 void begin(const GLuint& mode);
@@ -91,15 +90,15 @@ public:
91 GLfloat uv[2]; 90 GLfloat uv[2];
92 }; 91 };
93 92
94public:
95 static BOOL sStarted;
96
97private: 93private:
98 static bool sClever; 94 static bool sClever;
99 95
100 U32 mCount; 96 U32 mCount;
101 U32 mMode; 97 U32 mMode;
102 Vertex mBuffer[4096]; 98 LLPointer<LLVertexBuffer> mBuffer;
99 LLStrider<LLVector3> mVerticesp;
100 LLStrider<LLVector2> mTexcoordsp;
101 LLStrider<LLColor4U> mColorsp;
103}; 102};
104 103
105extern LLGLImmediate gGL; 104extern LLGLImmediate gGL;
diff --git a/linden/indra/llrender/llvertexbuffer.cpp b/linden/indra/llrender/llvertexbuffer.cpp
index ce80343..4c663e2 100644
--- a/linden/indra/llrender/llvertexbuffer.cpp
+++ b/linden/indra/llrender/llvertexbuffer.cpp
@@ -60,7 +60,6 @@ U32 LLVertexBuffer::sLastMask = 0;
60BOOL LLVertexBuffer::sVBOActive = FALSE; 60BOOL LLVertexBuffer::sVBOActive = FALSE;
61BOOL LLVertexBuffer::sIBOActive = FALSE; 61BOOL LLVertexBuffer::sIBOActive = FALSE;
62U32 LLVertexBuffer::sAllocatedBytes = 0; 62U32 LLVertexBuffer::sAllocatedBytes = 0;
63BOOL LLVertexBuffer::sRenderActive = FALSE;
64BOOL LLVertexBuffer::sMapped = FALSE; 63BOOL LLVertexBuffer::sMapped = FALSE;
65 64
66std::vector<U32> LLVertexBuffer::sDeleteList; 65std::vector<U32> LLVertexBuffer::sDeleteList;
@@ -84,16 +83,18 @@ U32 LLVertexBuffer::sGLMode[LLVertexBuffer::NUM_MODES] =
84 GL_TRIANGLE_FAN, 83 GL_TRIANGLE_FAN,
85 GL_POINTS, 84 GL_POINTS,
86 GL_LINES, 85 GL_LINES,
87 GL_LINE_STRIP 86 GL_LINE_STRIP,
87 GL_QUADS,
88 GL_LINE_LOOP,
88}; 89};
89 90
90//static 91//static
91void LLVertexBuffer::setupClientArrays(U32 data_mask) 92void LLVertexBuffer::setupClientArrays(U32 data_mask)
92{ 93{
93 if (LLGLImmediate::sStarted) 94 /*if (LLGLImmediate::sStarted)
94 { 95 {
95 llerrs << "Cannot use LLGLImmediate and LLVertexBuffer simultaneously!" << llendl; 96 llerrs << "Cannot use LLGLImmediate and LLVertexBuffer simultaneously!" << llendl;
96 } 97 }*/
97 98
98 if (sLastMask != data_mask) 99 if (sLastMask != data_mask)
99 { 100 {
@@ -186,6 +187,11 @@ void LLVertexBuffer::drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indi
186 llerrs << "Wrong vertex buffer bound." << llendl; 187 llerrs << "Wrong vertex buffer bound." << llendl;
187 } 188 }
188 189
190 if (mode > NUM_MODES)
191 {
192 llerrs << "Invalid draw mode: " << mode << llendl;
193 }
194
189 glDrawRangeElements(sGLMode[mode], start, end, count, GL_UNSIGNED_SHORT, 195 glDrawRangeElements(sGLMode[mode], start, end, count, GL_UNSIGNED_SHORT,
190 ((U16*) getIndicesPointer()) + indices_offset); 196 ((U16*) getIndicesPointer()) + indices_offset);
191} 197}
@@ -208,10 +214,37 @@ void LLVertexBuffer::draw(U32 mode, U32 count, U32 indices_offset) const
208 llerrs << "Wrong vertex buffer bound." << llendl; 214 llerrs << "Wrong vertex buffer bound." << llendl;
209 } 215 }
210 216
217 if (mode > NUM_MODES)
218 {
219 llerrs << "Invalid draw mode: " << mode << llendl;
220 }
221
211 glDrawElements(sGLMode[mode], count, GL_UNSIGNED_SHORT, 222 glDrawElements(sGLMode[mode], count, GL_UNSIGNED_SHORT,
212 ((U16*) getIndicesPointer()) + indices_offset); 223 ((U16*) getIndicesPointer()) + indices_offset);
213} 224}
214 225
226void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const
227{
228
229 if (first >= (U32) mRequestedNumVerts ||
230 first + count > (U32) mRequestedNumVerts)
231 {
232 llerrs << "Bad vertex buffer draw range: [" << first << ", " << first+count << "]" << llendl;
233 }
234
235 if (mGLBuffer != sGLRenderBuffer)
236 {
237 llerrs << "Wrong vertex buffer bound." << llendl;
238 }
239
240 if (mode > NUM_MODES)
241 {
242 llerrs << "Invalid draw mode: " << mode << llendl;
243 }
244
245 glDrawArrays(sGLMode[mode], first, count);
246}
247
215//static 248//static
216void LLVertexBuffer::initClass(bool use_vbo) 249void LLVertexBuffer::initClass(bool use_vbo)
217{ 250{
@@ -246,24 +279,8 @@ void LLVertexBuffer::unbind()
246void LLVertexBuffer::cleanupClass() 279void LLVertexBuffer::cleanupClass()
247{ 280{
248 LLMemType mt(LLMemType::MTYPE_VERTEX_DATA); 281 LLMemType mt(LLMemType::MTYPE_VERTEX_DATA);
249 startRender();
250 stopRender();
251 clientCopy(); // deletes GL buffers
252}
253
254//static, call before rendering VBOs
255void LLVertexBuffer::startRender()
256{
257 LLMemType mt(LLMemType::MTYPE_VERTEX_DATA);
258
259 unbind();
260 sRenderActive = TRUE;
261}
262
263void LLVertexBuffer::stopRender()
264{
265 unbind(); 282 unbind();
266 sRenderActive = FALSE; 283 clientCopy(); // deletes GL buffers
267} 284}
268 285
269void LLVertexBuffer::clientCopy(F64 max_time) 286void LLVertexBuffer::clientCopy(F64 max_time)
@@ -717,7 +734,7 @@ BOOL LLVertexBuffer::useVBOs() const
717 return FALSE; 734 return FALSE;
718 } 735 }
719#endif 736#endif
720 return sEnableVBOs; // && (!sRenderActive || !mLocked); 737 return sEnableVBOs;
721} 738}
722 739
723//---------------------------------------------------------------------------- 740//----------------------------------------------------------------------------
@@ -1000,10 +1017,6 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
1000 sGLRenderBuffer = mGLBuffer; 1017 sGLRenderBuffer = mGLBuffer;
1001 if (data_mask && setup) 1018 if (data_mask && setup)
1002 { 1019 {
1003 if (!sRenderActive)
1004 {
1005 llwarns << "Vertex buffer set for rendering outside of render frame." << llendl;
1006 }
1007 setupVertexBuffer(data_mask); // subclass specific setup (virtual function) 1020 setupVertexBuffer(data_mask); // subclass specific setup (virtual function)
1008 sSetCount++; 1021 sSetCount++;
1009 } 1022 }
diff --git a/linden/indra/llrender/llvertexbuffer.h b/linden/indra/llrender/llvertexbuffer.h
index 453f3ac..64a6f60 100644
--- a/linden/indra/llrender/llvertexbuffer.h
+++ b/linden/indra/llrender/llvertexbuffer.h
@@ -85,9 +85,7 @@ public:
85 static void initClass(bool use_vbo); 85 static void initClass(bool use_vbo);
86 static void cleanupClass(); 86 static void cleanupClass();
87 static void setupClientArrays(U32 data_mask); 87 static void setupClientArrays(U32 data_mask);
88 static void startRender(); //between start and stop render, no client copies will occur 88 static void clientCopy(F64 max_time = 0.005); //copy data from client to GL
89 static void stopRender(); //any buffer not copied to GL will be rendered from client memory
90 static void clientCopy(F64 max_time = 0.005); //copy data from client to GL
91 static void unbind(); //unbind any bound vertex buffer 89 static void unbind(); //unbind any bound vertex buffer
92 90
93 //get the size of a vertex with the given typemask 91 //get the size of a vertex with the given typemask
@@ -131,6 +129,8 @@ public:
131 POINTS, 129 POINTS,
132 LINES, 130 LINES,
133 LINE_STRIP, 131 LINE_STRIP,
132 QUADS,
133 LINE_LOOP,
134 NUM_MODES 134 NUM_MODES
135 }; 135 };
136protected: 136protected:
@@ -205,6 +205,7 @@ public:
205 void markDirty(U32 vert_index, U32 vert_count, U32 indices_index, U32 indices_count); 205 void markDirty(U32 vert_index, U32 vert_count, U32 indices_index, U32 indices_count);
206 206
207 void draw(U32 mode, U32 count, U32 indices_offset) const; 207 void draw(U32 mode, U32 count, U32 indices_offset) const;
208 void drawArrays(U32 mode, U32 offset, U32 count) const;
208 void drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indices_offset) const; 209 void drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indices_offset) const;
209 210
210protected: 211protected:
@@ -244,7 +245,6 @@ protected:
244 std::vector<DirtyRegion> mDirtyRegions; //vector of dirty regions to rebuild 245 std::vector<DirtyRegion> mDirtyRegions; //vector of dirty regions to rebuild
245 246
246public: 247public:
247 static BOOL sRenderActive;
248 static S32 sCount; 248 static S32 sCount;
249 static S32 sGLCount; 249 static S32 sGLCount;
250 static S32 sMappedCount; 250 static S32 sMappedCount;
diff --git a/linden/indra/llui/llui.cpp b/linden/indra/llui/llui.cpp
index aafd3af..45b1175 100644
--- a/linden/indra/llui/llui.cpp
+++ b/linden/indra/llui/llui.cpp
@@ -152,7 +152,7 @@ void gl_draw_x(const LLRect& rect, const LLColor4& color)
152 152
153 gGL.color4fv( color.mV ); 153 gGL.color4fv( color.mV );
154 154
155 gGL.begin( GL_LINES ); 155 gGL.begin( LLVertexBuffer::LINES );
156 gGL.vertex2i( rect.mLeft, rect.mTop ); 156 gGL.vertex2i( rect.mLeft, rect.mTop );
157 gGL.vertex2i( rect.mRight, rect.mBottom ); 157 gGL.vertex2i( rect.mRight, rect.mBottom );
158 gGL.vertex2i( rect.mLeft, rect.mBottom ); 158 gGL.vertex2i( rect.mLeft, rect.mBottom );
@@ -193,7 +193,7 @@ void gl_rect_2d(S32 left, S32 top, S32 right, S32 bottom, BOOL filled )
193 // Counterclockwise quad will face the viewer 193 // Counterclockwise quad will face the viewer
194 if( filled ) 194 if( filled )
195 { 195 {
196 gGL.begin( GL_QUADS ); 196 gGL.begin( LLVertexBuffer::QUADS );
197 gGL.vertex2i(left, top); 197 gGL.vertex2i(left, top);
198 gGL.vertex2i(left, bottom); 198 gGL.vertex2i(left, bottom);
199 gGL.vertex2i(right, bottom); 199 gGL.vertex2i(right, bottom);
@@ -205,7 +205,7 @@ void gl_rect_2d(S32 left, S32 top, S32 right, S32 bottom, BOOL filled )
205 if( gGLManager.mATIOffsetVerticalLines ) 205 if( gGLManager.mATIOffsetVerticalLines )
206 { 206 {
207 // Work around bug in ATI driver: vertical lines are offset by (-1,-1) 207 // Work around bug in ATI driver: vertical lines are offset by (-1,-1)
208 gGL.begin( GL_LINES ); 208 gGL.begin( LLVertexBuffer::LINES );
209 209
210 // Verticals 210 // Verticals
211 gGL.vertex2i(left + 1, top); 211 gGL.vertex2i(left + 1, top);
@@ -228,7 +228,7 @@ void gl_rect_2d(S32 left, S32 top, S32 right, S32 bottom, BOOL filled )
228 { 228 {
229 top--; 229 top--;
230 right--; 230 right--;
231 gGL.begin( GL_LINE_STRIP ); 231 gGL.begin( LLVertexBuffer::LINE_STRIP );
232 gGL.vertex2i(left, top); 232 gGL.vertex2i(left, top);
233 gGL.vertex2i(left, bottom); 233 gGL.vertex2i(left, bottom);
234 gGL.vertex2i(right, bottom); 234 gGL.vertex2i(right, bottom);
@@ -269,7 +269,7 @@ void gl_drop_shadow(S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &st
269 LLColor4 end_color = start_color; 269 LLColor4 end_color = start_color;
270 end_color.mV[VALPHA] = 0.f; 270 end_color.mV[VALPHA] = 0.f;
271 271
272 gGL.begin(GL_QUADS); 272 gGL.begin(LLVertexBuffer::QUADS);
273 273
274 // Right edge, CCW faces screen 274 // Right edge, CCW faces screen
275 gGL.color4fv(start_color.mV); 275 gGL.color4fv(start_color.mV);
@@ -331,7 +331,7 @@ void gl_line_2d(S32 x1, S32 y1, S32 x2, S32 y2 )
331 331
332 LLGLSNoTexture no_texture; 332 LLGLSNoTexture no_texture;
333 333
334 gGL.begin(GL_LINES); 334 gGL.begin(LLVertexBuffer::LINES);
335 gGL.vertex2i(x1, y1); 335 gGL.vertex2i(x1, y1);
336 gGL.vertex2i(x2, y2); 336 gGL.vertex2i(x2, y2);
337 gGL.end(); 337 gGL.end();
@@ -352,7 +352,7 @@ void gl_line_2d(S32 x1, S32 y1, S32 x2, S32 y2, const LLColor4 &color )
352 352
353 gGL.color4fv( color.mV ); 353 gGL.color4fv( color.mV );
354 354
355 gGL.begin(GL_LINES); 355 gGL.begin(LLVertexBuffer::LINES);
356 gGL.vertex2i(x1, y1); 356 gGL.vertex2i(x1, y1);
357 gGL.vertex2i(x2, y2); 357 gGL.vertex2i(x2, y2);
358 gGL.end(); 358 gGL.end();
@@ -366,11 +366,11 @@ void gl_triangle_2d(S32 x1, S32 y1, S32 x2, S32 y2, S32 x3, S32 y3, const LLColo
366 366
367 if (filled) 367 if (filled)
368 { 368 {
369 gGL.begin(GL_TRIANGLES); 369 gGL.begin(LLVertexBuffer::TRIANGLES);
370 } 370 }
371 else 371 else
372 { 372 {
373 gGL.begin(GL_LINE_LOOP); 373 gGL.begin(LLVertexBuffer::LINE_LOOP);
374 } 374 }
375 gGL.vertex2i(x1, y1); 375 gGL.vertex2i(x1, y1);
376 gGL.vertex2i(x2, y2); 376 gGL.vertex2i(x2, y2);
@@ -384,7 +384,7 @@ void gl_corners_2d(S32 left, S32 top, S32 right, S32 bottom, S32 length, F32 max
384 384
385 length = llmin((S32)(max_frac*(right - left)), length); 385 length = llmin((S32)(max_frac*(right - left)), length);
386 length = llmin((S32)(max_frac*(top - bottom)), length); 386 length = llmin((S32)(max_frac*(top - bottom)), length);
387 gGL.begin(GL_LINES); 387 gGL.begin(LLVertexBuffer::LINES);
388 gGL.vertex2i(left, top); 388 gGL.vertex2i(left, top);
389 gGL.vertex2i(left + length, top); 389 gGL.vertex2i(left + length, top);
390 390
@@ -515,7 +515,7 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLIma
515 515
516 gGL.color4fv(color.mV); 516 gGL.color4fv(color.mV);
517 517
518 gGL.begin(GL_QUADS); 518 gGL.begin(LLVertexBuffer::QUADS);
519 { 519 {
520 // draw bottom left 520 // draw bottom left
521 gGL.texCoord2f(uv_rect.mLeft, uv_rect.mBottom); 521 gGL.texCoord2f(uv_rect.mLeft, uv_rect.mBottom);
@@ -675,7 +675,7 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre
675 675
676 gGL.color4fv(color.mV); 676 gGL.color4fv(color.mV);
677 677
678 gGL.begin(GL_QUADS); 678 gGL.begin(LLVertexBuffer::QUADS);
679 { 679 {
680 gGL.texCoord2f(uv_rect.mRight, uv_rect.mTop); 680 gGL.texCoord2f(uv_rect.mRight, uv_rect.mTop);
681 gGL.vertex2i(width, height ); 681 gGL.vertex2i(width, height );
@@ -713,7 +713,7 @@ void gl_draw_scaled_image_inverted(S32 x, S32 y, S32 width, S32 height, LLImageG
713 713
714 gGL.color4fv(color.mV); 714 gGL.color4fv(color.mV);
715 715
716 gGL.begin(GL_QUADS); 716 gGL.begin(LLVertexBuffer::QUADS);
717 { 717 {
718 gGL.texCoord2f(uv_rect.mRight, uv_rect.mBottom); 718 gGL.texCoord2f(uv_rect.mRight, uv_rect.mBottom);
719 gGL.vertex2i(width, height ); 719 gGL.vertex2i(width, height );
@@ -748,7 +748,7 @@ void gl_stippled_line_3d( const LLVector3& start, const LLVector3& end, const LL
748 glLineWidth(2.5f); 748 glLineWidth(2.5f);
749 glLineStipple(2, 0x3333 << shift); 749 glLineStipple(2, 0x3333 << shift);
750 750
751 gGL.begin(GL_LINES); 751 gGL.begin(LLVertexBuffer::LINES);
752 { 752 {
753 gGL.vertex3fv( start.mV ); 753 gGL.vertex3fv( start.mV );
754 gGL.vertex3fv( end.mV ); 754 gGL.vertex3fv( end.mV );
@@ -765,7 +765,7 @@ void gl_rect_2d_xor(S32 left, S32 top, S32 right, S32 bottom)
765 glLogicOp( GL_XOR ); 765 glLogicOp( GL_XOR );
766 stop_glerror(); 766 stop_glerror();
767 767
768 gGL.begin(GL_QUADS); 768 gGL.begin(LLVertexBuffer::QUADS);
769 gGL.vertex2i(left, top); 769 gGL.vertex2i(left, top);
770 gGL.vertex2i(left, bottom); 770 gGL.vertex2i(left, bottom);
771 gGL.vertex2i(right, bottom); 771 gGL.vertex2i(right, bottom);
@@ -797,14 +797,14 @@ void gl_arc_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, BOOL filled, F
797 797
798 if (filled) 798 if (filled)
799 { 799 {
800 gGL.begin(GL_TRIANGLE_FAN); 800 gGL.begin(LLVertexBuffer::TRIANGLE_FAN);
801 gGL.vertex2f(0.f, 0.f); 801 gGL.vertex2f(0.f, 0.f);
802 // make sure circle is complete 802 // make sure circle is complete
803 steps += 1; 803 steps += 1;
804 } 804 }
805 else 805 else
806 { 806 {
807 gGL.begin(GL_LINE_STRIP); 807 gGL.begin(LLVertexBuffer::LINE_STRIP);
808 } 808 }
809 809
810 while( steps-- ) 810 while( steps-- )
@@ -836,14 +836,14 @@ void gl_circle_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, BOOL filled
836 836
837 if (filled) 837 if (filled)
838 { 838 {
839 gGL.begin(GL_TRIANGLE_FAN); 839 gGL.begin(LLVertexBuffer::TRIANGLE_FAN);
840 gGL.vertex2f(0.f, 0.f); 840 gGL.vertex2f(0.f, 0.f);
841 // make sure circle is complete 841 // make sure circle is complete
842 steps += 1; 842 steps += 1;
843 } 843 }
844 else 844 else
845 { 845 {
846 gGL.begin(GL_LINE_LOOP); 846 gGL.begin(LLVertexBuffer::LINE_LOOP);
847 } 847 }
848 848
849 while( steps-- ) 849 while( steps-- )
@@ -865,7 +865,7 @@ void gl_deep_circle( F32 radius, F32 depth, S32 steps )
865 F32 x = radius; 865 F32 x = radius;
866 F32 y = 0.f; 866 F32 y = 0.f;
867 F32 angle_delta = F_TWO_PI / (F32)steps; 867 F32 angle_delta = F_TWO_PI / (F32)steps;
868 gGL.begin( GL_TRIANGLE_STRIP ); 868 gGL.begin( LLVertexBuffer::TRIANGLE_STRIP );
869 { 869 {
870 S32 step = steps + 1; // An extra step to close the circle. 870 S32 step = steps + 1; // An extra step to close the circle.
871 while( step-- ) 871 while( step-- )
@@ -952,7 +952,7 @@ void gl_washer_2d(F32 outer_radius, F32 inner_radius, S32 steps, const LLColor4&
952 952
953 LLGLSNoTexture gls_no_texture; 953 LLGLSNoTexture gls_no_texture;
954 954
955 gGL.begin( GL_TRIANGLE_STRIP ); 955 gGL.begin( LLVertexBuffer::TRIANGLE_STRIP );
956 { 956 {
957 steps += 1; // An extra step to close the circle. 957 steps += 1; // An extra step to close the circle.
958 while( steps-- ) 958 while( steps-- )
@@ -988,7 +988,7 @@ void gl_washer_segment_2d(F32 outer_radius, F32 inner_radius, F32 start_radians,
988 F32 y2 = inner_radius * sin( start_radians ); 988 F32 y2 = inner_radius * sin( start_radians );
989 989
990 LLGLSNoTexture gls_no_texture; 990 LLGLSNoTexture gls_no_texture;
991 gGL.begin( GL_TRIANGLE_STRIP ); 991 gGL.begin( LLVertexBuffer::TRIANGLE_STRIP );
992 { 992 {
993 steps += 1; // An extra step to close the circle. 993 steps += 1; // An extra step to close the circle.
994 while( steps-- ) 994 while( steps-- )
@@ -1025,7 +1025,7 @@ void gl_washer_spokes_2d(F32 outer_radius, F32 inner_radius, S32 count, const LL
1025 1025
1026 LLGLSNoTexture gls_no_texture; 1026 LLGLSNoTexture gls_no_texture;
1027 1027
1028 gGL.begin( GL_LINES ); 1028 gGL.begin( LLVertexBuffer::LINES );
1029 { 1029 {
1030 while( count-- ) 1030 while( count-- )
1031 { 1031 {
@@ -1048,7 +1048,7 @@ void gl_washer_spokes_2d(F32 outer_radius, F32 inner_radius, S32 count, const LL
1048 1048
1049void gl_rect_2d_simple_tex( S32 width, S32 height ) 1049void gl_rect_2d_simple_tex( S32 width, S32 height )
1050{ 1050{
1051 gGL.begin( GL_QUADS ); 1051 gGL.begin( LLVertexBuffer::QUADS );
1052 1052
1053 gGL.texCoord2f(1.f, 1.f); 1053 gGL.texCoord2f(1.f, 1.f);
1054 gGL.vertex2i(width, height); 1054 gGL.vertex2i(width, height);
@@ -1067,7 +1067,7 @@ void gl_rect_2d_simple_tex( S32 width, S32 height )
1067 1067
1068void gl_rect_2d_simple( S32 width, S32 height ) 1068void gl_rect_2d_simple( S32 width, S32 height )
1069{ 1069{
1070 gGL.begin( GL_QUADS ); 1070 gGL.begin( LLVertexBuffer::QUADS );
1071 gGL.vertex2i(width, height); 1071 gGL.vertex2i(width, height);
1072 gGL.vertex2i(0, height); 1072 gGL.vertex2i(0, height);
1073 gGL.vertex2i(0, 0); 1073 gGL.vertex2i(0, 0);
@@ -1109,7 +1109,7 @@ void gl_segmented_rect_2d_tex(const S32 left,
1109 LLVector2 width_vec((F32)width, 0.f); 1109 LLVector2 width_vec((F32)width, 0.f);
1110 LLVector2 height_vec(0.f, (F32)height); 1110 LLVector2 height_vec(0.f, (F32)height);
1111 1111
1112 gGL.begin(GL_QUADS); 1112 gGL.begin(LLVertexBuffer::QUADS);
1113 { 1113 {
1114 // draw bottom left 1114 // draw bottom left
1115 gGL.texCoord2f(0.f, 0.f); 1115 gGL.texCoord2f(0.f, 0.f);
@@ -1277,7 +1277,7 @@ void gl_segmented_rect_2d_fragment_tex(const S32 left,
1277 LLVector2 x_min; 1277 LLVector2 x_min;
1278 LLVector2 x_max; 1278 LLVector2 x_max;
1279 1279
1280 gGL.begin(GL_QUADS); 1280 gGL.begin(LLVertexBuffer::QUADS);
1281 { 1281 {
1282 if (start_fragment < middle_start) 1282 if (start_fragment < middle_start)
1283 { 1283 {
@@ -1434,7 +1434,7 @@ void gl_segmented_rect_3d_tex(const LLVector2& border_scale, const LLVector3& bo
1434 LLVector3 bottom_border_height = ((edges & (~(U32)ROUNDED_RECT_TOP)) != 0) ? border_height : LLVector3::zero; 1434 LLVector3 bottom_border_height = ((edges & (~(U32)ROUNDED_RECT_TOP)) != 0) ? border_height : LLVector3::zero;
1435 1435
1436 1436
1437 gGL.begin(GL_QUADS); 1437 gGL.begin(LLVertexBuffer::QUADS);
1438 { 1438 {
1439 // draw bottom left 1439 // draw bottom left
1440 gGL.texCoord2f(0.f, 0.f); 1440 gGL.texCoord2f(0.f, 0.f);
diff --git a/linden/indra/llui/llview.cpp b/linden/indra/llui/llview.cpp
index c9828dd..750821c 100644
--- a/linden/indra/llui/llview.cpp
+++ b/linden/indra/llui/llview.cpp
@@ -1306,7 +1306,7 @@ void LLView::drawDebugRect()
1306 1306
1307 gGL.color4fv( border_color.mV ); 1307 gGL.color4fv( border_color.mV );
1308 1308
1309 gGL.begin(GL_LINES); 1309 gGL.begin(LLVertexBuffer::LINES);
1310 gGL.vertex2i(0, debug_rect.getHeight() - 1); 1310 gGL.vertex2i(0, debug_rect.getHeight() - 1);
1311 gGL.vertex2i(0, 0); 1311 gGL.vertex2i(0, 0);
1312 1312
diff --git a/linden/indra/llui/llviewborder.cpp b/linden/indra/llui/llviewborder.cpp
index e8cff7b..e9b7ca5 100644
--- a/linden/indra/llui/llviewborder.cpp
+++ b/linden/indra/llui/llviewborder.cpp
@@ -248,7 +248,7 @@ void LLViewBorder::drawTextureTrapezoid( F32 degrees, S32 width, S32 length, F32
248 gGL.translatef(start_x, start_y, 0.f); 248 gGL.translatef(start_x, start_y, 0.f);
249 glRotatef( degrees, 0, 0, 1 ); 249 glRotatef( degrees, 0, 0, 1 );
250 250
251 gGL.begin(GL_QUADS); 251 gGL.begin(LLVertexBuffer::QUADS);
252 { 252 {
253 // width, width /---------\ length-width, width // 253 // width, width /---------\ length-width, width //
254 // / \ // 254 // / \ //
diff --git a/linden/indra/llwindow/llgl.h b/linden/indra/llwindow/llgl.h
index 25ad0d6..e8f17bf 100644
--- a/linden/indra/llwindow/llgl.h
+++ b/linden/indra/llwindow/llgl.h
@@ -252,12 +252,27 @@ protected:
252 BOOL mIsEnabled; 252 BOOL mIsEnabled;
253}; 253};
254 254
255// New LLGLState class wrappers that don't depend on actual GL flags.
256class LLGLEnableBlending : public LLGLState
257{
258public:
259 LLGLEnableBlending(bool enable);
260};
261
262class LLGLEnableAlphaReject : public LLGLState
263{
264public:
265 LLGLEnableAlphaReject(bool enable);
266};
267
268/// TODO: Being deprecated.
255class LLGLEnable : public LLGLState 269class LLGLEnable : public LLGLState
256{ 270{
257public: 271public:
258 LLGLEnable(LLGLenum state) : LLGLState(state, TRUE) {} 272 LLGLEnable(LLGLenum state) : LLGLState(state, TRUE) {}
259}; 273};
260 274
275/// TODO: Being deprecated.
261class LLGLDisable : public LLGLState 276class LLGLDisable : public LLGLState
262{ 277{
263public: 278public:
diff --git a/linden/indra/lscript/lscript_compile/indra.l b/linden/indra/lscript/lscript_compile/indra.l
index 8bb26ab..03c8321 100644
--- a/linden/indra/lscript/lscript_compile/indra.l
+++ b/linden/indra/lscript/lscript_compile/indra.l
@@ -12,6 +12,7 @@ FS (f|F)
12#include "linden_common.h" 12#include "linden_common.h"
13// Deal with the fact that lex/yacc generates unreachable code 13// Deal with the fact that lex/yacc generates unreachable code
14#ifdef LL_WINDOWS 14#ifdef LL_WINDOWS
15#pragma warning (disable : 4018) // warning C4018: signed/unsigned mismatch
15#pragma warning (disable : 4702) // warning C4702: unreachable code 16#pragma warning (disable : 4702) // warning C4702: unreachable code
16#endif // LL_WINDOWS 17#endif // LL_WINDOWS
17#include "llmath.h" 18#include "llmath.h"
@@ -44,7 +45,10 @@ void parse_string();
44 45
45#define YYLMAX 16384 46#define YYLMAX 16384
46#define YY_NEVER_INTERACTIVE 1 /* stops flex from calling isatty() */ 47#define YY_NEVER_INTERACTIVE 1 /* stops flex from calling isatty() */
47 48#ifdef LL_WINDOWS
49#define isatty(x) 0 /* hack for bug in cygwin flex 2.5.35 */
50#endif
51
48#ifdef ECHO 52#ifdef ECHO
49#undef ECHO 53#undef ECHO
50#endif 54#endif
diff --git a/linden/indra/lscript/lscript_compile/lscript_compile.vcproj b/linden/indra/lscript/lscript_compile/lscript_compile.vcproj
index f2c75c5..a95c05e 100644
--- a/linden/indra/lscript/lscript_compile/lscript_compile.vcproj
+++ b/linden/indra/lscript/lscript_compile/lscript_compile.vcproj
@@ -20,7 +20,7 @@
20 Name="VCCLCompilerTool" 20 Name="VCCLCompilerTool"
21 Optimization="0" 21 Optimization="0"
22 AdditionalIncludeDirectories="..;..\..\llcommon;..\..\llmath;..\..\llvfs;..\..\llmessage;..\..\llinventory;&quot;..\..\..\libraries\i686-win32\include&quot;;..\..\..\libraries\include" 22 AdditionalIncludeDirectories="..;..\..\llcommon;..\..\llmath;..\..\llvfs;..\..\llmessage;..\..\llinventory;&quot;..\..\..\libraries\i686-win32\include&quot;;..\..\..\libraries\include"
23 PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;LL_DEBUG" 23 PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;LL_DEBUG;YY_NO_UNISTD_H"
24 MinimalRebuild="TRUE" 24 MinimalRebuild="TRUE"
25 BasicRuntimeChecks="3" 25 BasicRuntimeChecks="3"
26 RuntimeLibrary="1" 26 RuntimeLibrary="1"
@@ -66,7 +66,7 @@
66 Name="VCCLCompilerTool" 66 Name="VCCLCompilerTool"
67 AdditionalOptions="/Oy-" 67 AdditionalOptions="/Oy-"
68 AdditionalIncludeDirectories="..;..\..\llcommon;..\..\llmath;..\..\llvfs;..\..\llmessage;..\..\llinventory;&quot;..\..\..\libraries\i686-win32\include&quot;;..\..\..\libraries\include" 68 AdditionalIncludeDirectories="..;..\..\llcommon;..\..\llmath;..\..\llvfs;..\..\llmessage;..\..\llinventory;&quot;..\..\..\libraries\i686-win32\include&quot;;..\..\..\libraries\include"
69 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;LL_RELEASE" 69 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;LL_RELEASE;YY_NO_UNISTD_H"
70 RuntimeLibrary="0" 70 RuntimeLibrary="0"
71 StructMemberAlignment="0" 71 StructMemberAlignment="0"
72 ForceConformanceInForLoopScope="TRUE" 72 ForceConformanceInForLoopScope="TRUE"
@@ -111,7 +111,7 @@
111 AdditionalOptions="/Oy-" 111 AdditionalOptions="/Oy-"
112 Optimization="0" 112 Optimization="0"
113 AdditionalIncludeDirectories="..;..\..\llcommon;..\..\llmath;..\..\llvfs;..\..\llmessage;..\..\llinventory;&quot;..\..\..\libraries\i686-win32\include&quot;;..\..\..\libraries\include" 113 AdditionalIncludeDirectories="..;..\..\llcommon;..\..\llmath;..\..\llvfs;..\..\llmessage;..\..\llinventory;&quot;..\..\..\libraries\i686-win32\include&quot;;..\..\..\libraries\include"
114 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;LL_RELEASE" 114 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;LL_RELEASE;YY_NO_UNISTD_H"
115 RuntimeLibrary="0" 115 RuntimeLibrary="0"
116 StructMemberAlignment="0" 116 StructMemberAlignment="0"
117 ForceConformanceInForLoopScope="TRUE" 117 ForceConformanceInForLoopScope="TRUE"
diff --git a/linden/indra/lscript/lscript_compile/lscript_compile_vc8.vcproj b/linden/indra/lscript/lscript_compile/lscript_compile_vc8.vcproj
index 0622c32..9972c52 100644
--- a/linden/indra/lscript/lscript_compile/lscript_compile_vc8.vcproj
+++ b/linden/indra/lscript/lscript_compile/lscript_compile_vc8.vcproj
@@ -42,7 +42,7 @@
42 Name="VCCLCompilerTool" 42 Name="VCCLCompilerTool"
43 Optimization="0" 43 Optimization="0"
44 AdditionalIncludeDirectories="..;..\..\llcommon;..\..\llmath;..\..\llvfs;..\..\llmessage;..\..\llinventory;&quot;..\..\..\libraries\i686-win32\include&quot;;..\..\..\libraries\include" 44 AdditionalIncludeDirectories="..;..\..\llcommon;..\..\llmath;..\..\llvfs;..\..\llmessage;..\..\llinventory;&quot;..\..\..\libraries\i686-win32\include&quot;;..\..\..\libraries\include"
45 PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG" 45 PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG;YY_NO_UNISTD_H"
46 MinimalRebuild="true" 46 MinimalRebuild="true"
47 BasicRuntimeChecks="3" 47 BasicRuntimeChecks="3"
48 RuntimeLibrary="1" 48 RuntimeLibrary="1"
@@ -111,7 +111,7 @@
111 Name="VCCLCompilerTool" 111 Name="VCCLCompilerTool"
112 AdditionalOptions="/Oy-" 112 AdditionalOptions="/Oy-"
113 AdditionalIncludeDirectories="..;..\..\llcommon;..\..\llmath;..\..\llvfs;..\..\llmessage;..\..\llinventory;&quot;..\..\..\libraries\i686-win32\include&quot;;..\..\..\libraries\include" 113 AdditionalIncludeDirectories="..;..\..\llcommon;..\..\llmath;..\..\llvfs;..\..\llmessage;..\..\llinventory;&quot;..\..\..\libraries\i686-win32\include&quot;;..\..\..\libraries\include"
114 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE" 114 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE;YY_NO_UNISTD_H"
115 RuntimeLibrary="0" 115 RuntimeLibrary="0"
116 StructMemberAlignment="0" 116 StructMemberAlignment="0"
117 TreatWChar_tAsBuiltInType="false" 117 TreatWChar_tAsBuiltInType="false"
@@ -179,7 +179,7 @@
179 AdditionalOptions="/Oy-" 179 AdditionalOptions="/Oy-"
180 Optimization="0" 180 Optimization="0"
181 AdditionalIncludeDirectories="..;..\..\llcommon;..\..\llmath;..\..\llvfs;..\..\llmessage;..\..\llinventory;&quot;..\..\..\libraries\i686-win32\include&quot;;..\..\..\libraries\include" 181 AdditionalIncludeDirectories="..;..\..\llcommon;..\..\llmath;..\..\llvfs;..\..\llmessage;..\..\llinventory;&quot;..\..\..\libraries\i686-win32\include&quot;;..\..\..\libraries\include"
182 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE" 182 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE;YY_NO_UNISTD_H"
183 RuntimeLibrary="0" 183 RuntimeLibrary="0"
184 StructMemberAlignment="0" 184 StructMemberAlignment="0"
185 TreatWChar_tAsBuiltInType="false" 185 TreatWChar_tAsBuiltInType="false"
diff --git a/linden/indra/lscript/lscript_compile/lscript_compile_vc9.vcproj b/linden/indra/lscript/lscript_compile/lscript_compile_vc9.vcproj
index 581c99e..6167895 100644
--- a/linden/indra/lscript/lscript_compile/lscript_compile_vc9.vcproj
+++ b/linden/indra/lscript/lscript_compile/lscript_compile_vc9.vcproj
@@ -43,7 +43,7 @@
43 Name="VCCLCompilerTool" 43 Name="VCCLCompilerTool"
44 Optimization="0" 44 Optimization="0"
45 AdditionalIncludeDirectories="..;..\..\llcommon;..\..\llmath;..\..\llvfs;..\..\llmessage;..\..\llinventory;&quot;..\..\..\libraries\i686-win32\include&quot;;..\..\..\libraries\include" 45 AdditionalIncludeDirectories="..;..\..\llcommon;..\..\llmath;..\..\llvfs;..\..\llmessage;..\..\llinventory;&quot;..\..\..\libraries\i686-win32\include&quot;;..\..\..\libraries\include"
46 PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG" 46 PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG;YY_NO_UNISTD_H"
47 MinimalRebuild="true" 47 MinimalRebuild="true"
48 BasicRuntimeChecks="3" 48 BasicRuntimeChecks="3"
49 RuntimeLibrary="1" 49 RuntimeLibrary="1"
@@ -112,7 +112,7 @@
112 Name="VCCLCompilerTool" 112 Name="VCCLCompilerTool"
113 AdditionalOptions="/Oy-" 113 AdditionalOptions="/Oy-"
114 AdditionalIncludeDirectories="..;..\..\llcommon;..\..\llmath;..\..\llvfs;..\..\llmessage;..\..\llinventory;&quot;..\..\..\libraries\i686-win32\include&quot;;..\..\..\libraries\include" 114 AdditionalIncludeDirectories="..;..\..\llcommon;..\..\llmath;..\..\llvfs;..\..\llmessage;..\..\llinventory;&quot;..\..\..\libraries\i686-win32\include&quot;;..\..\..\libraries\include"
115 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE" 115 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE;YY_NO_UNISTD_H"
116 RuntimeLibrary="0" 116 RuntimeLibrary="0"
117 StructMemberAlignment="0" 117 StructMemberAlignment="0"
118 TreatWChar_tAsBuiltInType="false" 118 TreatWChar_tAsBuiltInType="false"
@@ -180,7 +180,7 @@
180 AdditionalOptions="/Oy-" 180 AdditionalOptions="/Oy-"
181 Optimization="0" 181 Optimization="0"
182 AdditionalIncludeDirectories="..;..\..\llcommon;..\..\llmath;..\..\llvfs;..\..\llmessage;..\..\llinventory;&quot;..\..\..\libraries\i686-win32\include&quot;;..\..\..\libraries\include" 182 AdditionalIncludeDirectories="..;..\..\llcommon;..\..\llmath;..\..\llvfs;..\..\llmessage;..\..\llinventory;&quot;..\..\..\libraries\i686-win32\include&quot;;..\..\..\libraries\include"
183 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE" 183 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE;YY_NO_UNISTD_H"
184 RuntimeLibrary="0" 184 RuntimeLibrary="0"
185 StructMemberAlignment="0" 185 StructMemberAlignment="0"
186 TreatWChar_tAsBuiltInType="false" 186 TreatWChar_tAsBuiltInType="false"
diff --git a/linden/indra/newview/llbox.cpp b/linden/indra/newview/llbox.cpp
index 49dacc1..984d15b 100644
--- a/linden/indra/newview/llbox.cpp
+++ b/linden/indra/newview/llbox.cpp
@@ -81,7 +81,7 @@ void LLBox::renderface(S32 which_face)
81 {7, 4, 0, 3} 81 {7, 4, 0, 3}
82 }; 82 };
83 83
84 gGL.begin(GL_QUADS); 84 gGL.begin(LLVertexBuffer::QUADS);
85 //gGL.normal3fv(&normals[which_face][0]); 85 //gGL.normal3fv(&normals[which_face][0]);
86 gGL.texCoord2f(1,0); 86 gGL.texCoord2f(1,0);
87 gGL.vertex3fv(&mVertex[ faces[which_face][0] ][0]); 87 gGL.vertex3fv(&mVertex[ faces[which_face][0] ][0]);
diff --git a/linden/indra/newview/lldrawpoolavatar.cpp b/linden/indra/newview/lldrawpoolavatar.cpp
index 8e3341a..6cfd131 100644
--- a/linden/indra/newview/lldrawpoolavatar.cpp
+++ b/linden/indra/newview/lldrawpoolavatar.cpp
@@ -483,7 +483,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
483 LLVector3 pos = avatarp->getPositionAgent(); 483 LLVector3 pos = avatarp->getPositionAgent();
484 484
485 gGL.color4f(1.0f, 0.0f, 0.0f, 0.8f); 485 gGL.color4f(1.0f, 0.0f, 0.0f, 0.8f);
486 gGL.begin(GL_LINES); 486 gGL.begin(LLVertexBuffer::LINES);
487 { 487 {
488 gGL.vertex3fv((pos - LLVector3(0.2f, 0.f, 0.f)).mV); 488 gGL.vertex3fv((pos - LLVector3(0.2f, 0.f, 0.f)).mV);
489 gGL.vertex3fv((pos + LLVector3(0.2f, 0.f, 0.f)).mV); 489 gGL.vertex3fv((pos + LLVector3(0.2f, 0.f, 0.f)).mV);
@@ -495,7 +495,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
495 495
496 pos = avatarp->mDrawable->getPositionAgent(); 496 pos = avatarp->mDrawable->getPositionAgent();
497 gGL.color4f(1.0f, 0.0f, 0.0f, 0.8f); 497 gGL.color4f(1.0f, 0.0f, 0.0f, 0.8f);
498 gGL.begin(GL_LINES); 498 gGL.begin(LLVertexBuffer::LINES);
499 { 499 {
500 gGL.vertex3fv((pos - LLVector3(0.2f, 0.f, 0.f)).mV); 500 gGL.vertex3fv((pos - LLVector3(0.2f, 0.f, 0.f)).mV);
501 gGL.vertex3fv((pos + LLVector3(0.2f, 0.f, 0.f)).mV); 501 gGL.vertex3fv((pos + LLVector3(0.2f, 0.f, 0.f)).mV);
@@ -507,7 +507,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
507 507
508 pos = avatarp->mRoot.getWorldPosition(); 508 pos = avatarp->mRoot.getWorldPosition();
509 gGL.color4f(1.0f, 1.0f, 1.0f, 0.8f); 509 gGL.color4f(1.0f, 1.0f, 1.0f, 0.8f);
510 gGL.begin(GL_LINES); 510 gGL.begin(LLVertexBuffer::LINES);
511 { 511 {
512 gGL.vertex3fv((pos - LLVector3(0.2f, 0.f, 0.f)).mV); 512 gGL.vertex3fv((pos - LLVector3(0.2f, 0.f, 0.f)).mV);
513 gGL.vertex3fv((pos + LLVector3(0.2f, 0.f, 0.f)).mV); 513 gGL.vertex3fv((pos + LLVector3(0.2f, 0.f, 0.f)).mV);
@@ -519,7 +519,7 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
519 519
520 pos = avatarp->mPelvisp->getWorldPosition(); 520 pos = avatarp->mPelvisp->getWorldPosition();
521 gGL.color4f(0.0f, 0.0f, 1.0f, 0.8f); 521 gGL.color4f(0.0f, 0.0f, 1.0f, 0.8f);
522 gGL.begin(GL_LINES); 522 gGL.begin(LLVertexBuffer::LINES);
523 { 523 {
524 gGL.vertex3fv((pos - LLVector3(0.2f, 0.f, 0.f)).mV); 524 gGL.vertex3fv((pos - LLVector3(0.2f, 0.f, 0.f)).mV);
525 gGL.vertex3fv((pos + LLVector3(0.2f, 0.f, 0.f)).mV); 525 gGL.vertex3fv((pos + LLVector3(0.2f, 0.f, 0.f)).mV);
diff --git a/linden/indra/newview/lldynamictexture.cpp b/linden/indra/newview/lldynamictexture.cpp
index 6bcf140..ce7f1ec 100644
--- a/linden/indra/newview/lldynamictexture.cpp
+++ b/linden/indra/newview/lldynamictexture.cpp
@@ -223,17 +223,18 @@ BOOL LLDynamicTexture::updateAllInstances()
223 glClear(GL_DEPTH_BUFFER_BIT); 223 glClear(GL_DEPTH_BUFFER_BIT);
224 gDisplaySwapBuffers = FALSE; 224 gDisplaySwapBuffers = FALSE;
225 225
226
227 gGL.color4f(1,1,1,1);
226 dynamicTexture->preRender(); // Must be called outside of startRender() 228 dynamicTexture->preRender(); // Must be called outside of startRender()
227 229
228 LLVertexBuffer::startRender();
229
230 if (dynamicTexture->render()) 230 if (dynamicTexture->render())
231 { 231 {
232 result = TRUE; 232 result = TRUE;
233 sNumRenders++; 233 sNumRenders++;
234 } 234 }
235 LLVertexBuffer::stopRender(); 235 gGL.flush();
236 236 LLVertexBuffer::unbind();
237
237 dynamicTexture->postRender(result); 238 dynamicTexture->postRender(result);
238 } 239 }
239 } 240 }
diff --git a/linden/indra/newview/llface.cpp b/linden/indra/newview/llface.cpp
index 1f1febb..4a5e532 100644
--- a/linden/indra/newview/llface.cpp
+++ b/linden/indra/newview/llface.cpp
@@ -493,7 +493,7 @@ void LLFace::renderSelectedUV(const S32 offset, const S32 count)
493 glPolygonOffset(factor, bias); 493 glPolygonOffset(factor, bias);
494 if (sSafeRenderSelect) 494 if (sSafeRenderSelect)
495 { 495 {
496 gGL.begin(GL_TRIANGLES); 496 gGL.begin(LLVertexBuffer::TRIANGLES);
497 if (count) 497 if (count)
498 { 498 {
499 for (S32 i = offset; i < offset + count; i++) 499 for (S32 i = offset; i < offset + count; i++)
diff --git a/linden/indra/newview/llfasttimerview.cpp b/linden/indra/newview/llfasttimerview.cpp
index 372d8fa..047016f 100644
--- a/linden/indra/newview/llfasttimerview.cpp
+++ b/linden/indra/newview/llfasttimerview.cpp
@@ -978,7 +978,7 @@ void LLFastTimerView::draw()
978 978
979 gGL.color4f(0.5f,0.5f,0.5f,1); 979 gGL.color4f(0.5f,0.5f,0.5f,1);
980 980
981 gGL.begin(GL_LINES); 981 gGL.begin(LLVertexBuffer::LINES);
982 gGL.vertex2i((S32)bar, graph_rect.mBottom); 982 gGL.vertex2i((S32)bar, graph_rect.mBottom);
983 gGL.vertex2i((S32)bar, graph_rect.mTop); 983 gGL.vertex2i((S32)bar, graph_rect.mTop);
984 gGL.end(); 984 gGL.end();
@@ -1014,7 +1014,7 @@ void LLFastTimerView::draw()
1014 } 1014 }
1015 1015
1016 gGL.color4f(col[0], col[1], col[2], alpha); 1016 gGL.color4f(col[0], col[1], col[2], alpha);
1017 gGL.begin(GL_LINE_STRIP); 1017 gGL.begin(LLVertexBuffer::LINE_STRIP);
1018 for (U32 j = 0; j < LLFastTimer::FTM_HISTORY_NUM; j++) 1018 for (U32 j = 0; j < LLFastTimer::FTM_HISTORY_NUM; j++)
1019 { 1019 {
1020 U64 ticks = ticks_sum[j+1][idx]; 1020 U64 ticks = ticks_sum[j+1][idx];
diff --git a/linden/indra/newview/llfloateranimpreview.cpp b/linden/indra/newview/llfloateranimpreview.cpp
index 253e5b0..890cfd2 100644
--- a/linden/indra/newview/llfloateranimpreview.cpp
+++ b/linden/indra/newview/llfloateranimpreview.cpp
@@ -382,7 +382,7 @@ void LLFloaterAnimPreview::draw()
382 gGL.color3f(1.f, 1.f, 1.f); 382 gGL.color3f(1.f, 1.f, 1.f);
383 mAnimPreview->bindTexture(); 383 mAnimPreview->bindTexture();
384 384
385 gGL.begin( GL_QUADS ); 385 gGL.begin( LLVertexBuffer::QUADS );
386 { 386 {
387 gGL.texCoord2f(0.f, 1.f); 387 gGL.texCoord2f(0.f, 1.f);
388 gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT); 388 gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
@@ -1068,8 +1068,6 @@ BOOL LLPreviewAnimation::render()
1068{ 1068{
1069 mNeedsUpdate = FALSE; 1069 mNeedsUpdate = FALSE;
1070 LLVOAvatar* avatarp = mDummyAvatar; 1070 LLVOAvatar* avatarp = mDummyAvatar;
1071
1072 gGL.start();
1073 1071
1074 glMatrixMode(GL_PROJECTION); 1072 glMatrixMode(GL_PROJECTION);
1075 gGL.pushMatrix(); 1073 gGL.pushMatrix();
@@ -1092,7 +1090,7 @@ BOOL LLPreviewAnimation::render()
1092 glMatrixMode(GL_MODELVIEW); 1090 glMatrixMode(GL_MODELVIEW);
1093 gGL.popMatrix(); 1091 gGL.popMatrix();
1094 1092
1095 gGL.stop(); 1093 gGL.flush();
1096 1094
1097 LLVector3 target_pos = avatarp->mRoot.getWorldPosition(); 1095 LLVector3 target_pos = avatarp->mRoot.getWorldPosition();
1098 1096
@@ -1124,9 +1122,9 @@ BOOL LLPreviewAnimation::render()
1124 avatarp->updateMotion(); 1122 avatarp->updateMotion();
1125 } 1123 }
1126 1124
1127 LLVertexBuffer::stopRender(); 1125 LLVertexBuffer::unbind();
1128 avatarp->updateLOD(); 1126 avatarp->updateLOD();
1129 LLVertexBuffer::startRender(); 1127
1130 1128
1131 avatarp->mRoot.updateWorldMatrixChildren(); 1129 avatarp->mRoot.updateWorldMatrixChildren();
1132 1130
@@ -1140,6 +1138,7 @@ BOOL LLPreviewAnimation::render()
1140 avatarPoolp->renderAvatars(avatarp); // renders only one avatar 1138 avatarPoolp->renderAvatars(avatarp); // renders only one avatar
1141 } 1139 }
1142 1140
1141 gGL.color4f(1,1,1,1);
1143 return TRUE; 1142 return TRUE;
1144} 1143}
1145 1144
diff --git a/linden/indra/newview/llfloatercolorpicker.cpp b/linden/indra/newview/llfloatercolorpicker.cpp
index 1a56597..e72cb1a 100644
--- a/linden/indra/newview/llfloatercolorpicker.cpp
+++ b/linden/indra/newview/llfloatercolorpicker.cpp
@@ -545,7 +545,7 @@ void LLFloaterColorPicker::draw()
545 { 545 {
546 LLGLSNoTexture no_texture; 546 LLGLSNoTexture no_texture;
547 LLGLEnable(GL_CULL_FACE); 547 LLGLEnable(GL_CULL_FACE);
548 gGL.begin(GL_QUADS); 548 gGL.begin(LLVertexBuffer::QUADS);
549 { 549 {
550 gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity); 550 gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
551 gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mTop); 551 gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mTop);
diff --git a/linden/indra/newview/llfloaterimagepreview.cpp b/linden/indra/newview/llfloaterimagepreview.cpp
index f1f7ff6..a228587 100644
--- a/linden/indra/newview/llfloaterimagepreview.cpp
+++ b/linden/indra/newview/llfloaterimagepreview.cpp
@@ -260,7 +260,7 @@ void LLFloaterImagePreview::draw()
260 } 260 }
261 261
262 gGL.color3f(1.f, 1.f, 1.f); 262 gGL.color3f(1.f, 1.f, 1.f);
263 gGL.begin( GL_QUADS ); 263 gGL.begin( LLVertexBuffer::QUADS );
264 { 264 {
265 gGL.texCoord2f(mPreviewImageRect.mLeft, mPreviewImageRect.mTop); 265 gGL.texCoord2f(mPreviewImageRect.mLeft, mPreviewImageRect.mTop);
266 gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT); 266 gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
@@ -288,7 +288,7 @@ void LLFloaterImagePreview::draw()
288 else 288 else
289 mAvatarPreview->bindTexture(); 289 mAvatarPreview->bindTexture();
290 290
291 gGL.begin( GL_QUADS ); 291 gGL.begin( LLVertexBuffer::QUADS );
292 { 292 {
293 gGL.texCoord2f(0.f, 1.f); 293 gGL.texCoord2f(0.f, 1.f);
294 gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT); 294 gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
@@ -667,8 +667,6 @@ void LLImagePreviewAvatar::setPreviewTarget(const char* joint_name, const char*
667//----------------------------------------------------------------------------- 667//-----------------------------------------------------------------------------
668BOOL LLImagePreviewAvatar::render() 668BOOL LLImagePreviewAvatar::render()
669{ 669{
670 gGL.start();
671
672 mNeedsUpdate = FALSE; 670 mNeedsUpdate = FALSE;
673 LLVOAvatar* avatarp = mDummyAvatar; 671 LLVOAvatar* avatarp = mDummyAvatar;
674 672
@@ -692,7 +690,7 @@ BOOL LLImagePreviewAvatar::render()
692 glMatrixMode(GL_MODELVIEW); 690 glMatrixMode(GL_MODELVIEW);
693 gGL.popMatrix(); 691 gGL.popMatrix();
694 692
695 gGL.stop(); 693 gGL.flush();
696 LLVector3 target_pos = mTargetJoint->getWorldPosition(); 694 LLVector3 target_pos = mTargetJoint->getWorldPosition();
697 695
698 LLQuaternion camera_rot = LLQuaternion(mCameraPitch, LLVector3::y_axis) * 696 LLQuaternion camera_rot = LLQuaternion(mCameraPitch, LLVector3::y_axis) *
@@ -710,9 +708,9 @@ BOOL LLImagePreviewAvatar::render()
710 LLViewerCamera::getInstance()->setView(LLViewerCamera::getInstance()->getDefaultFOV() / mCameraZoom); 708 LLViewerCamera::getInstance()->setView(LLViewerCamera::getInstance()->getDefaultFOV() / mCameraZoom);
711 LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mWidth, mHeight, FALSE); 709 LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mWidth, mHeight, FALSE);
712 710
713 LLVertexBuffer::stopRender(); 711 LLVertexBuffer::unbind();
714 avatarp->updateLOD(); 712 avatarp->updateLOD();
715 LLVertexBuffer::startRender(); 713
716 714
717 if (avatarp->mDrawable.notNull()) 715 if (avatarp->mDrawable.notNull())
718 { 716 {
@@ -725,6 +723,7 @@ BOOL LLImagePreviewAvatar::render()
725 avatarPoolp->renderAvatars(avatarp); // renders only one avatar 723 avatarPoolp->renderAvatars(avatarp); // renders only one avatar
726 } 724 }
727 725
726 gGL.color4f(1,1,1,1);
728 return TRUE; 727 return TRUE;
729} 728}
730 729
@@ -823,8 +822,6 @@ void LLImagePreviewSculpted::setPreviewTarget(LLImageRaw* imagep, F32 distance)
823//----------------------------------------------------------------------------- 822//-----------------------------------------------------------------------------
824BOOL LLImagePreviewSculpted::render() 823BOOL LLImagePreviewSculpted::render()
825{ 824{
826 gGL.start();
827
828 mNeedsUpdate = FALSE; 825 mNeedsUpdate = FALSE;
829 826
830 LLGLSUIDefault def; 827 LLGLSUIDefault def;
@@ -919,8 +916,6 @@ BOOL LLImagePreviewSculpted::render()
919 delete [] normals; 916 delete [] normals;
920 } 917 }
921 918
922 gGL.stop();
923
924 return TRUE; 919 return TRUE;
925} 920}
926 921
diff --git a/linden/indra/newview/llfloatersnapshot.cpp b/linden/indra/newview/llfloatersnapshot.cpp
index 20b4510..c36c54d 100644
--- a/linden/indra/newview/llfloatersnapshot.cpp
+++ b/linden/indra/newview/llfloatersnapshot.cpp
@@ -413,7 +413,7 @@ void LLSnapshotLivePreview::draw()
413 glPushMatrix(); 413 glPushMatrix();
414 { 414 {
415 glTranslatef((F32)rect.mLeft, (F32)rect.mBottom, 0.f); 415 glTranslatef((F32)rect.mLeft, (F32)rect.mBottom, 0.f);
416 gGL.begin(GL_QUADS); 416 gGL.begin(LLVertexBuffer::QUADS);
417 { 417 {
418 gGL.texCoord2f(uv_width, uv_height); 418 gGL.texCoord2f(uv_width, uv_height);
419 gGL.vertex2i(rect.getWidth(), rect.getHeight() ); 419 gGL.vertex2i(rect.getWidth(), rect.getHeight() );
@@ -476,7 +476,7 @@ void LLSnapshotLivePreview::draw()
476 S32 y2 = gViewerWindow->getWindowHeight(); 476 S32 y2 = gViewerWindow->getWindowHeight();
477 477
478 LLGLSNoTexture no_texture; 478 LLGLSNoTexture no_texture;
479 gGL.begin(GL_QUADS); 479 gGL.begin(LLVertexBuffer::QUADS);
480 { 480 {
481 gGL.color4f(1.f, 1.f, 1.f, 0.f); 481 gGL.color4f(1.f, 1.f, 1.f, 0.f);
482 gGL.vertex2i(x1, y1); 482 gGL.vertex2i(x1, y1);
@@ -507,7 +507,7 @@ void LLSnapshotLivePreview::draw()
507 LLGLSNoTexture no_texture; 507 LLGLSNoTexture no_texture;
508 gGL.color4f(1.f, 1.f, 1.f, 1.f); 508 gGL.color4f(1.f, 1.f, 1.f, 1.f);
509 LLRect outline_rect = mImageRect[mCurImageIndex]; 509 LLRect outline_rect = mImageRect[mCurImageIndex];
510 gGL.begin(GL_QUADS); 510 gGL.begin(LLVertexBuffer::QUADS);
511 { 511 {
512 gGL.vertex2i(outline_rect.mLeft - BORDER_WIDTH, outline_rect.mTop + BORDER_WIDTH); 512 gGL.vertex2i(outline_rect.mLeft - BORDER_WIDTH, outline_rect.mTop + BORDER_WIDTH);
513 gGL.vertex2i(outline_rect.mRight + BORDER_WIDTH, outline_rect.mTop + BORDER_WIDTH); 513 gGL.vertex2i(outline_rect.mRight + BORDER_WIDTH, outline_rect.mTop + BORDER_WIDTH);
@@ -553,7 +553,7 @@ void LLSnapshotLivePreview::draw()
553 LLRect& rect = mImageRect[old_image_index]; 553 LLRect& rect = mImageRect[old_image_index];
554 glTranslatef((F32)rect.mLeft, (F32)rect.mBottom - llround(getRect().getHeight() * 2.f * (fall_interp * fall_interp)), 0.f); 554 glTranslatef((F32)rect.mLeft, (F32)rect.mBottom - llround(getRect().getHeight() * 2.f * (fall_interp * fall_interp)), 0.f);
555 glRotatef(-45.f * fall_interp, 0.f, 0.f, 1.f); 555 glRotatef(-45.f * fall_interp, 0.f, 0.f, 1.f);
556 gGL.begin(GL_QUADS); 556 gGL.begin(LLVertexBuffer::QUADS);
557 { 557 {
558 gGL.texCoord2f(uv_width, uv_height); 558 gGL.texCoord2f(uv_width, uv_height);
559 gGL.vertex2i(rect.getWidth(), rect.getHeight() ); 559 gGL.vertex2i(rect.getWidth(), rect.getHeight() );
diff --git a/linden/indra/newview/llglsandbox.cpp b/linden/indra/newview/llglsandbox.cpp
index f63eaf3..4ea38aa 100644
--- a/linden/indra/newview/llglsandbox.cpp
+++ b/linden/indra/newview/llglsandbox.cpp
@@ -358,7 +358,7 @@ void LLCompass::draw()
358 mBkgndTexture->bind(); 358 mBkgndTexture->bind();
359 gGL.color4f(1.0f, 1.0f, 1.0f, 1.0f); 359 gGL.color4f(1.0f, 1.0f, 1.0f, 1.0f);
360 360
361 gGL.begin(GL_QUADS); 361 gGL.begin(LLVertexBuffer::QUADS);
362 362
363 gGL.texCoord2f(1.f, 1.f); 363 gGL.texCoord2f(1.f, 1.f);
364 gGL.vertex2i(width, height); 364 gGL.vertex2i(width, height);
@@ -384,7 +384,7 @@ void LLCompass::draw()
384 mTexture->bind(); 384 mTexture->bind();
385 gGL.color4f(1.0f, 1.0f, 1.0f, 1.0f); 385 gGL.color4f(1.0f, 1.0f, 1.0f, 1.0f);
386 386
387 gGL.begin(GL_QUADS); 387 gGL.begin(LLVertexBuffer::QUADS);
388 388
389 gGL.texCoord2f(1.f, 1.f); 389 gGL.texCoord2f(1.f, 1.f);
390 gGL.vertex2i(width, height); 390 gGL.vertex2i(width, height);
@@ -428,7 +428,7 @@ void LLHorizontalCompass::draw()
428 428
429 mTexture->bind(); 429 mTexture->bind();
430 gGL.color4f(1.0f, 1.0f, 1.0f, 1.0f ); 430 gGL.color4f(1.0f, 1.0f, 1.0f, 1.0f );
431 gGL.begin( GL_QUADS ); 431 gGL.begin( LLVertexBuffer::QUADS );
432 432
433 gGL.texCoord2f(right, 1.f); 433 gGL.texCoord2f(right, 1.f);
434 gGL.vertex2i(width, height); 434 gGL.vertex2i(width, height);
@@ -479,11 +479,11 @@ void LLWind::renderVectors()
479 gGL.pushMatrix(); 479 gGL.pushMatrix();
480 gGL.translatef((F32)i * region_width_meters/mSize, (F32)j * region_width_meters/mSize, 0.0); 480 gGL.translatef((F32)i * region_width_meters/mSize, (F32)j * region_width_meters/mSize, 0.0);
481 gGL.color3f(0,1,0); 481 gGL.color3f(0,1,0);
482 gGL.begin(GL_POINTS); 482 gGL.begin(LLVertexBuffer::POINTS);
483 gGL.vertex3f(0,0,0); 483 gGL.vertex3f(0,0,0);
484 gGL.end(); 484 gGL.end();
485 gGL.color3f(1,0,0); 485 gGL.color3f(1,0,0);
486 gGL.begin(GL_LINES); 486 gGL.begin(LLVertexBuffer::LINES);
487 gGL.vertex3f(x * 0.1f, y * 0.1f ,0.f); 487 gGL.vertex3f(x * 0.1f, y * 0.1f ,0.f);
488 gGL.vertex3f(x, y, 0.f); 488 gGL.vertex3f(x, y, 0.f);
489 gGL.end(); 489 gGL.end();
@@ -532,7 +532,7 @@ void LLViewerParcelMgr::renderRect(const LLVector3d &west_south_bottom_global,
532 gGL.color4f(1.f, 1.f, 0.f, 1.f); 532 gGL.color4f(1.f, 1.f, 0.f, 1.f);
533 533
534 // Cheat and give this the same pick-name as land 534 // Cheat and give this the same pick-name as land
535 gGL.begin(GL_LINES); 535 gGL.begin(LLVertexBuffer::LINES);
536 536
537 gGL.vertex3f(west, north, nw_bottom); 537 gGL.vertex3f(west, north, nw_bottom);
538 gGL.vertex3f(west, north, nw_top); 538 gGL.vertex3f(west, north, nw_top);
@@ -549,7 +549,7 @@ void LLViewerParcelMgr::renderRect(const LLVector3d &west_south_bottom_global,
549 gGL.end(); 549 gGL.end();
550 550
551 gGL.color4f(1.f, 1.f, 0.f, 0.2f); 551 gGL.color4f(1.f, 1.f, 0.f, 0.2f);
552 gGL.begin(GL_QUADS); 552 gGL.begin(LLVertexBuffer::QUADS);
553 553
554 gGL.vertex3f(west, north, nw_bottom); 554 gGL.vertex3f(west, north, nw_bottom);
555 gGL.vertex3f(west, north, nw_top); 555 gGL.vertex3f(west, north, nw_top);
@@ -616,7 +616,7 @@ void LLViewerParcelMgr::renderParcel(LLParcel* parcel )
616 gGL.color4f(0.f, 1.f, 1.f, 1.f); 616 gGL.color4f(0.f, 1.f, 1.f, 1.f);
617 617
618 // Cheat and give this the same pick-name as land 618 // Cheat and give this the same pick-name as land
619 gGL.begin(GL_LINES); 619 gGL.begin(LLVertexBuffer::LINES);
620 620
621 gGL.vertex3f(west, north, nw_bottom); 621 gGL.vertex3f(west, north, nw_bottom);
622 gGL.vertex3f(west, north, nw_top); 622 gGL.vertex3f(west, north, nw_top);
@@ -633,7 +633,7 @@ void LLViewerParcelMgr::renderParcel(LLParcel* parcel )
633 gGL.end(); 633 gGL.end();
634 634
635 gGL.color4f(0.f, 1.f, 1.f, 0.2f); 635 gGL.color4f(0.f, 1.f, 1.f, 0.2f);
636 gGL.begin(GL_QUADS); 636 gGL.begin(LLVertexBuffer::QUADS);
637 637
638 gGL.vertex3f(west, north, nw_bottom); 638 gGL.vertex3f(west, north, nw_bottom);
639 gGL.vertex3f(west, north, nw_top); 639 gGL.vertex3f(west, north, nw_top);
@@ -786,7 +786,7 @@ void LLViewerParcelMgr::renderHighlightSegments(const U8* segments, LLViewerRegi
786 if (!has_segments) 786 if (!has_segments)
787 { 787 {
788 has_segments = true; 788 has_segments = true;
789 gGL.begin(GL_QUADS); 789 gGL.begin(LLVertexBuffer::QUADS);
790 } 790 }
791 renderOneSegment(x1, y1, x2, y2, PARCEL_POST_HEIGHT, SOUTH_MASK, regionp); 791 renderOneSegment(x1, y1, x2, y2, PARCEL_POST_HEIGHT, SOUTH_MASK, regionp);
792 } 792 }
@@ -802,7 +802,7 @@ void LLViewerParcelMgr::renderHighlightSegments(const U8* segments, LLViewerRegi
802 if (!has_segments) 802 if (!has_segments)
803 { 803 {
804 has_segments = true; 804 has_segments = true;
805 gGL.begin(GL_QUADS); 805 gGL.begin(LLVertexBuffer::QUADS);
806 } 806 }
807 renderOneSegment(x1, y1, x2, y2, PARCEL_POST_HEIGHT, WEST_MASK, regionp); 807 renderOneSegment(x1, y1, x2, y2, PARCEL_POST_HEIGHT, WEST_MASK, regionp);
808 } 808 }
@@ -857,7 +857,7 @@ void LLViewerParcelMgr::renderCollisionSegments(U8* segments, BOOL use_pass, LLV
857 LLViewerImage::bindTexture(mBlockedImage); 857 LLViewerImage::bindTexture(mBlockedImage);
858 } 858 }
859 859
860 gGL.begin(GL_QUADS); 860 gGL.begin(LLVertexBuffer::QUADS);
861 861
862 for (y = 0; y < STRIDE; y++) 862 for (y = 0; y < STRIDE; y++)
863 { 863 {
@@ -1014,7 +1014,7 @@ void LLViewerObjectList::renderObjectBeacons()
1014 LLGLSNoTexture gls_ui_no_texture; 1014 LLGLSNoTexture gls_ui_no_texture;
1015 1015
1016 S32 last_line_width = -1; 1016 S32 last_line_width = -1;
1017 // gGL.begin(GL_LINES); // Always happens in (line_width != last_line_width) 1017 // gGL.begin(LLVertexBuffer::LINES); // Always happens in (line_width != last_line_width)
1018 1018
1019 for (S32 i = 0; i < mDebugBeacons.count(); i++) 1019 for (S32 i = 0; i < mDebugBeacons.count(); i++)
1020 { 1020 {
@@ -1031,7 +1031,7 @@ void LLViewerObjectList::renderObjectBeacons()
1031 } 1031 }
1032 glLineWidth( (F32)line_width ); 1032 glLineWidth( (F32)line_width );
1033 last_line_width = line_width; 1033 last_line_width = line_width;
1034 gGL.begin(GL_LINES); 1034 gGL.begin(LLVertexBuffer::LINES);
1035 } 1035 }
1036 1036
1037 const LLVector3 &thisline = debug_beacon.mPositionAgent; 1037 const LLVector3 &thisline = debug_beacon.mPositionAgent;
@@ -1053,7 +1053,7 @@ void LLViewerObjectList::renderObjectBeacons()
1053 LLGLDepthTest gls_depth(GL_TRUE); 1053 LLGLDepthTest gls_depth(GL_TRUE);
1054 1054
1055 S32 last_line_width = -1; 1055 S32 last_line_width = -1;
1056 // gGL.begin(GL_LINES); // Always happens in (line_width != last_line_width) 1056 // gGL.begin(LLVertexBuffer::LINES); // Always happens in (line_width != last_line_width)
1057 1057
1058 for (S32 i = 0; i < mDebugBeacons.count(); i++) 1058 for (S32 i = 0; i < mDebugBeacons.count(); i++)
1059 { 1059 {
@@ -1069,7 +1069,7 @@ void LLViewerObjectList::renderObjectBeacons()
1069 } 1069 }
1070 glLineWidth( (F32)line_width ); 1070 glLineWidth( (F32)line_width );
1071 last_line_width = line_width; 1071 last_line_width = line_width;
1072 gGL.begin(GL_LINES); 1072 gGL.begin(LLVertexBuffer::LINES);
1073 } 1073 }
1074 1074
1075 const LLVector3 &thisline = debug_beacon.mPositionAgent; 1075 const LLVector3 &thisline = debug_beacon.mPositionAgent;
diff --git a/linden/indra/newview/llhudeffectlookat.cpp b/linden/indra/newview/llhudeffectlookat.cpp
index abe2a66..92e7fdf 100644
--- a/linden/indra/newview/llhudeffectlookat.cpp
+++ b/linden/indra/newview/llhudeffectlookat.cpp
@@ -504,7 +504,7 @@ void LLHUDEffectLookAt::render()
504 glPushMatrix(); 504 glPushMatrix();
505 glTranslatef(target.mV[VX], target.mV[VY], target.mV[VZ]); 505 glTranslatef(target.mV[VX], target.mV[VY], target.mV[VZ]);
506 glScalef(0.3f, 0.3f, 0.3f); 506 glScalef(0.3f, 0.3f, 0.3f);
507 gGL.begin(GL_LINES); 507 gGL.begin(LLVertexBuffer::LINES);
508 { 508 {
509 LLColor3 color = (*mAttentions)[mTargetType].mColor; 509 LLColor3 color = (*mAttentions)[mTargetType].mColor;
510 gGL.color3f(color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE]); 510 gGL.color3f(color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE]);
diff --git a/linden/indra/newview/llhudeffectpointat.cpp b/linden/indra/newview/llhudeffectpointat.cpp
index 97e3bd7..d42eeb5 100644
--- a/linden/indra/newview/llhudeffectpointat.cpp
+++ b/linden/indra/newview/llhudeffectpointat.cpp
@@ -334,7 +334,7 @@ void LLHUDEffectPointAt::render()
334 glPushMatrix(); 334 glPushMatrix();
335 glTranslatef(target.mV[VX], target.mV[VY], target.mV[VZ]); 335 glTranslatef(target.mV[VX], target.mV[VY], target.mV[VZ]);
336 glScalef(0.3f, 0.3f, 0.3f); 336 glScalef(0.3f, 0.3f, 0.3f);
337 gGL.begin(GL_LINES); 337 gGL.begin(LLVertexBuffer::LINES);
338 { 338 {
339 gGL.color3f(1.f, 0.f, 0.f); 339 gGL.color3f(1.f, 0.f, 0.f);
340 gGL.vertex3f(-1.f, 0.f, 0.f); 340 gGL.vertex3f(-1.f, 0.f, 0.f);
diff --git a/linden/indra/newview/llhudicon.cpp b/linden/indra/newview/llhudicon.cpp
index 22d157c..010e85f 100644
--- a/linden/indra/newview/llhudicon.cpp
+++ b/linden/indra/newview/llhudicon.cpp
@@ -166,7 +166,7 @@ void LLHUDIcon::renderIcon(BOOL for_select)
166 LLViewerImage::bindTexture(mImagep); 166 LLViewerImage::bindTexture(mImagep);
167 } 167 }
168 168
169 gGL.begin(GL_QUADS); 169 gGL.begin(LLVertexBuffer::QUADS);
170 { 170 {
171 gGL.texCoord2f(0.f, 1.f); 171 gGL.texCoord2f(0.f, 1.f);
172 gGL.vertex3fv(upper_left.mV); 172 gGL.vertex3fv(upper_left.mV);
diff --git a/linden/indra/newview/llhudobject.cpp b/linden/indra/newview/llhudobject.cpp
index c2525eb..f66501c 100644
--- a/linden/indra/newview/llhudobject.cpp
+++ b/linden/indra/newview/llhudobject.cpp
@@ -281,6 +281,8 @@ void LLHUDObject::renderAll()
281 hud_objp->render(); 281 hud_objp->render();
282 } 282 }
283 } 283 }
284
285 LLVertexBuffer::unbind();
284} 286}
285 287
286// static 288// static
diff --git a/linden/indra/newview/llhudtext.cpp b/linden/indra/newview/llhudtext.cpp
index 92caf8e..f8eddc7 100644
--- a/linden/indra/newview/llhudtext.cpp
+++ b/linden/indra/newview/llhudtext.cpp
@@ -317,7 +317,7 @@ void LLHUDText::renderText(BOOL for_select)
317 LLUI::translate(box_center_offset.mV[VX], box_center_offset.mV[VY], box_center_offset.mV[VZ]); 317 LLUI::translate(box_center_offset.mV[VX], box_center_offset.mV[VY], box_center_offset.mV[VZ]);
318 gGL.color4fv(bg_color.mV); 318 gGL.color4fv(bg_color.mV);
319 LLUI::setLineWidth(2.0); 319 LLUI::setLineWidth(2.0);
320 gGL.begin(GL_LINES); 320 gGL.begin(LLVertexBuffer::LINES);
321 { 321 {
322 if (outside_width) 322 if (outside_width)
323 { 323 {
diff --git a/linden/indra/newview/lljoystickbutton.cpp b/linden/indra/newview/lljoystickbutton.cpp
index 548da07..1978b78 100644
--- a/linden/indra/newview/lljoystickbutton.cpp
+++ b/linden/indra/newview/lljoystickbutton.cpp
@@ -655,7 +655,7 @@ void LLJoystickCameraRotate::drawRotatedImage( const LLImageGL* image, S32 rotat
655 655
656 gGL.color4fv(UI_VERTEX_COLOR.mV); 656 gGL.color4fv(UI_VERTEX_COLOR.mV);
657 657
658 gGL.begin(GL_QUADS); 658 gGL.begin(LLVertexBuffer::QUADS);
659 { 659 {
660 gGL.texCoord2fv( uv[ (rotations + 0) % 4]); 660 gGL.texCoord2fv( uv[ (rotations + 0) % 4]);
661 gGL.vertex2i(width, height ); 661 gGL.vertex2i(width, height );
diff --git a/linden/indra/newview/llmanip.cpp b/linden/indra/newview/llmanip.cpp
index 8934266..e0621a3 100644
--- a/linden/indra/newview/llmanip.cpp
+++ b/linden/indra/newview/llmanip.cpp
@@ -391,7 +391,7 @@ void LLManip::renderGuidelines(BOOL draw_x, BOOL draw_y, BOOL draw_z)
391 if (draw_x) 391 if (draw_x)
392 { 392 {
393 gGL.color4f(1.f, 0.f, 0.f, LINE_ALPHA); 393 gGL.color4f(1.f, 0.f, 0.f, LINE_ALPHA);
394 gGL.begin(GL_LINES); 394 gGL.begin(LLVertexBuffer::LINES);
395 gGL.vertex3f( -region_size, 0.f, 0.f ); 395 gGL.vertex3f( -region_size, 0.f, 0.f );
396 gGL.vertex3f( region_size, 0.f, 0.f ); 396 gGL.vertex3f( region_size, 0.f, 0.f );
397 gGL.end(); 397 gGL.end();
@@ -400,7 +400,7 @@ void LLManip::renderGuidelines(BOOL draw_x, BOOL draw_y, BOOL draw_z)
400 if (draw_y) 400 if (draw_y)
401 { 401 {
402 gGL.color4f(0.f, 1.f, 0.f, LINE_ALPHA); 402 gGL.color4f(0.f, 1.f, 0.f, LINE_ALPHA);
403 gGL.begin(GL_LINES); 403 gGL.begin(LLVertexBuffer::LINES);
404 gGL.vertex3f( 0.f, -region_size, 0.f ); 404 gGL.vertex3f( 0.f, -region_size, 0.f );
405 gGL.vertex3f( 0.f, region_size, 0.f ); 405 gGL.vertex3f( 0.f, region_size, 0.f );
406 gGL.end(); 406 gGL.end();
@@ -409,7 +409,7 @@ void LLManip::renderGuidelines(BOOL draw_x, BOOL draw_y, BOOL draw_z)
409 if (draw_z) 409 if (draw_z)
410 { 410 {
411 gGL.color4f(0.f, 0.f, 1.f, LINE_ALPHA); 411 gGL.color4f(0.f, 0.f, 1.f, LINE_ALPHA);
412 gGL.begin(GL_LINES); 412 gGL.begin(LLVertexBuffer::LINES);
413 gGL.vertex3f( 0.f, 0.f, -region_size ); 413 gGL.vertex3f( 0.f, 0.f, -region_size );
414 gGL.vertex3f( 0.f, 0.f, region_size ); 414 gGL.vertex3f( 0.f, 0.f, region_size );
415 gGL.end(); 415 gGL.end();
diff --git a/linden/indra/newview/llmaniprotate.cpp b/linden/indra/newview/llmaniprotate.cpp
index 94bbe7d..43a22e5 100644
--- a/linden/indra/newview/llmaniprotate.cpp
+++ b/linden/indra/newview/llmaniprotate.cpp
@@ -868,7 +868,7 @@ void LLManipRotate::renderSnapGuides()
868 LLVector3 outer_point; 868 LLVector3 outer_point;
869 LLVector3 text_point; 869 LLVector3 text_point;
870 LLQuaternion rot(deg * DEG_TO_RAD, constraint_axis); 870 LLQuaternion rot(deg * DEG_TO_RAD, constraint_axis);
871 gGL.begin(GL_LINES); 871 gGL.begin(LLVertexBuffer::LINES);
872 { 872 {
873 inner_point = (projected_snap_axis * mRadiusMeters * SNAP_GUIDE_INNER_RADIUS * rot) + center; 873 inner_point = (projected_snap_axis * mRadiusMeters * SNAP_GUIDE_INNER_RADIUS * rot) + center;
874 F32 tick_length = 0.f; 874 F32 tick_length = 0.f;
@@ -1046,7 +1046,7 @@ void LLManipRotate::renderSnapGuides()
1046 object_axis = object_axis * SNAP_GUIDE_INNER_RADIUS * mRadiusMeters + center; 1046 object_axis = object_axis * SNAP_GUIDE_INNER_RADIUS * mRadiusMeters + center;
1047 LLVector3 line_start = center; 1047 LLVector3 line_start = center;
1048 1048
1049 gGL.begin(GL_LINES); 1049 gGL.begin(LLVertexBuffer::LINES);
1050 { 1050 {
1051 gGL.vertex3fv(line_start.mV); 1051 gGL.vertex3fv(line_start.mV);
1052 gGL.vertex3fv(object_axis.mV); 1052 gGL.vertex3fv(object_axis.mV);
@@ -1054,7 +1054,7 @@ void LLManipRotate::renderSnapGuides()
1054 gGL.end(); 1054 gGL.end();
1055 1055
1056 // draw snap guide arrow 1056 // draw snap guide arrow
1057 gGL.begin(GL_TRIANGLES); 1057 gGL.begin(LLVertexBuffer::TRIANGLES);
1058 { 1058 {
1059 LLVector3 arrow_dir; 1059 LLVector3 arrow_dir;
1060 LLVector3 arrow_span = (object_axis - line_start) % getConstraintAxis(); 1060 LLVector3 arrow_span = (object_axis - line_start) % getConstraintAxis();
@@ -1074,7 +1074,7 @@ void LLManipRotate::renderSnapGuides()
1074 1074
1075 { 1075 {
1076 LLGLDepthTest gls_depth(GL_TRUE); 1076 LLGLDepthTest gls_depth(GL_TRUE);
1077 gGL.begin(GL_LINES); 1077 gGL.begin(LLVertexBuffer::LINES);
1078 { 1078 {
1079 gGL.vertex3fv(line_start.mV); 1079 gGL.vertex3fv(line_start.mV);
1080 gGL.vertex3fv(object_axis.mV); 1080 gGL.vertex3fv(object_axis.mV);
@@ -1082,7 +1082,7 @@ void LLManipRotate::renderSnapGuides()
1082 gGL.end(); 1082 gGL.end();
1083 1083
1084 // draw snap guide arrow 1084 // draw snap guide arrow
1085 gGL.begin(GL_TRIANGLES); 1085 gGL.begin(LLVertexBuffer::TRIANGLES);
1086 { 1086 {
1087 LLVector3 arrow_dir; 1087 LLVector3 arrow_dir;
1088 LLVector3 arrow_span = (object_axis - line_start) % getConstraintAxis(); 1088 LLVector3 arrow_span = (object_axis - line_start) % getConstraintAxis();
diff --git a/linden/indra/newview/llmanipscale.cpp b/linden/indra/newview/llmanipscale.cpp
index 86bfba9..bb26484 100644
--- a/linden/indra/newview/llmanipscale.cpp
+++ b/linden/indra/newview/llmanipscale.cpp
@@ -600,7 +600,7 @@ void LLManipScale::renderFaces( const LLBBox& bbox )
600 { 600 {
601 gGL.color4fv( default_normal_color.mV ); 601 gGL.color4fv( default_normal_color.mV );
602 LLGLDepthTest gls_depth(GL_FALSE); 602 LLGLDepthTest gls_depth(GL_FALSE);
603 gGL.begin(GL_QUADS); 603 gGL.begin(LLVertexBuffer::QUADS);
604 { 604 {
605 // Face 0 605 // Face 0
606 gGL.vertex3f(min.mV[VX], max.mV[VY], max.mV[VZ]); 606 gGL.vertex3f(min.mV[VX], max.mV[VY], max.mV[VZ]);
@@ -1534,7 +1534,7 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox)
1534 { 1534 {
1535 LLColor4 tick_color = setupSnapGuideRenderPass(pass); 1535 LLColor4 tick_color = setupSnapGuideRenderPass(pass);
1536 1536
1537 gGL.begin(GL_LINES); 1537 gGL.begin(LLVertexBuffer::LINES);
1538 LLVector3 line_mid = mScaleCenter + (mScaleSnapValue * mScaleDir) + (mSnapGuideDir1 * mSnapRegimeOffset); 1538 LLVector3 line_mid = mScaleCenter + (mScaleSnapValue * mScaleDir) + (mSnapGuideDir1 * mSnapRegimeOffset);
1539 LLVector3 line_start = line_mid - (mScaleDir * (llmin(mScaleSnapValue, mSnapGuideLength * 0.5f))); 1539 LLVector3 line_start = line_mid - (mScaleDir * (llmin(mScaleSnapValue, mSnapGuideLength * 0.5f)));
1540 LLVector3 line_end = line_mid + (mScaleDir * llmin(max_point_on_scale_line - mScaleSnapValue, mSnapGuideLength * 0.5f)); 1540 LLVector3 line_end = line_mid + (mScaleDir * llmin(max_point_on_scale_line - mScaleSnapValue, mSnapGuideLength * 0.5f));
@@ -1585,7 +1585,7 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox)
1585 if (mInSnapRegime) 1585 if (mInSnapRegime)
1586 { 1586 {
1587 // draw snap guide line 1587 // draw snap guide line
1588 gGL.begin(GL_LINES); 1588 gGL.begin(LLVertexBuffer::LINES);
1589 LLVector3 snap_line_center = mScaleCenter + (mScaleSnapValue * mScaleDir); 1589 LLVector3 snap_line_center = mScaleCenter + (mScaleSnapValue * mScaleDir);
1590 1590
1591 LLVector3 snap_line_start = snap_line_center + (mSnapGuideDir1 * mSnapRegimeOffset); 1591 LLVector3 snap_line_start = snap_line_center + (mSnapGuideDir1 * mSnapRegimeOffset);
@@ -1599,7 +1599,7 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox)
1599 gGL.end(); 1599 gGL.end();
1600 1600
1601 // draw snap guide arrow 1601 // draw snap guide arrow
1602 gGL.begin(GL_TRIANGLES); 1602 gGL.begin(LLVertexBuffer::TRIANGLES);
1603 { 1603 {
1604 //gGLSNoCullFaces.set(); 1604 //gGLSNoCullFaces.set();
1605 gGL.color4f(1.f, 1.f, 1.f, grid_alpha); 1605 gGL.color4f(1.f, 1.f, 1.f, grid_alpha);
@@ -1634,7 +1634,7 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox)
1634 start_tick = -(llmin(ticks_from_scale_center_1, num_ticks_per_side1)); 1634 start_tick = -(llmin(ticks_from_scale_center_1, num_ticks_per_side1));
1635 stop_tick = llmin(max_ticks1, num_ticks_per_side1); 1635 stop_tick = llmin(max_ticks1, num_ticks_per_side1);
1636 1636
1637 gGL.begin(GL_LINES); 1637 gGL.begin(LLVertexBuffer::LINES);
1638 // draw first row of ticks 1638 // draw first row of ticks
1639 for (S32 i = start_tick; i <= stop_tick; i++) 1639 for (S32 i = start_tick; i <= stop_tick; i++)
1640 { 1640 {
diff --git a/linden/indra/newview/llmaniptranslate.cpp b/linden/indra/newview/llmaniptranslate.cpp
index 7d729a6..ac41068 100644
--- a/linden/indra/newview/llmaniptranslate.cpp
+++ b/linden/indra/newview/llmaniptranslate.cpp
@@ -1253,7 +1253,7 @@ void LLManipTranslate::renderSnapGuides()
1253 { 1253 {
1254 LLColor4 line_color = setupSnapGuideRenderPass(pass); 1254 LLColor4 line_color = setupSnapGuideRenderPass(pass);
1255 1255
1256 gGL.begin(GL_LINES); 1256 gGL.begin(LLVertexBuffer::LINES);
1257 { 1257 {
1258 LLVector3 line_start = selection_center + (mSnapOffsetMeters * mSnapOffsetAxis) + (translate_axis * (guide_size_meters * 0.5f + offset_nearest_grid_unit)); 1258 LLVector3 line_start = selection_center + (mSnapOffsetMeters * mSnapOffsetAxis) + (translate_axis * (guide_size_meters * 0.5f + offset_nearest_grid_unit));
1259 LLVector3 line_end = selection_center + (mSnapOffsetMeters * mSnapOffsetAxis) - (translate_axis * (guide_size_meters * 0.5f + offset_nearest_grid_unit)); 1259 LLVector3 line_end = selection_center + (mSnapOffsetMeters * mSnapOffsetAxis) - (translate_axis * (guide_size_meters * 0.5f + offset_nearest_grid_unit));
@@ -1329,7 +1329,7 @@ void LLManipTranslate::renderSnapGuides()
1329 LLVector3 line_start = selection_center - mSnapOffsetAxis * mSnapOffsetMeters; 1329 LLVector3 line_start = selection_center - mSnapOffsetAxis * mSnapOffsetMeters;
1330 LLVector3 line_end = selection_center + mSnapOffsetAxis * mSnapOffsetMeters; 1330 LLVector3 line_end = selection_center + mSnapOffsetAxis * mSnapOffsetMeters;
1331 1331
1332 gGL.begin(GL_LINES); 1332 gGL.begin(LLVertexBuffer::LINES);
1333 { 1333 {
1334 gGL.color4f(line_color.mV[VX], line_color.mV[VY], line_color.mV[VZ], line_color.mV[VW]); 1334 gGL.color4f(line_color.mV[VX], line_color.mV[VY], line_color.mV[VZ], line_color.mV[VW]);
1335 1335
@@ -1339,7 +1339,7 @@ void LLManipTranslate::renderSnapGuides()
1339 gGL.end(); 1339 gGL.end();
1340 1340
1341 // draw snap guide arrow 1341 // draw snap guide arrow
1342 gGL.begin(GL_TRIANGLES); 1342 gGL.begin(LLVertexBuffer::TRIANGLES);
1343 { 1343 {
1344 gGL.color4f(line_color.mV[VX], line_color.mV[VY], line_color.mV[VZ], line_color.mV[VW]); 1344 gGL.color4f(line_color.mV[VX], line_color.mV[VY], line_color.mV[VZ], line_color.mV[VW]);
1345 1345
@@ -1594,7 +1594,7 @@ void LLManipTranslate::renderGrid(F32 x, F32 y, F32 size, F32 r, F32 g, F32 b, F
1594 1594
1595 for (F32 xx = -size-d; xx < size+d; xx += d) 1595 for (F32 xx = -size-d; xx < size+d; xx += d)
1596 { 1596 {
1597 gGL.begin(GL_TRIANGLE_STRIP); 1597 gGL.begin(LLVertexBuffer::TRIANGLE_STRIP);
1598 for (F32 yy = -size-d; yy < size+d; yy += d) 1598 for (F32 yy = -size-d; yy < size+d; yy += d)
1599 { 1599 {
1600 float dx, dy, da; 1600 float dx, dy, da;
@@ -1640,7 +1640,7 @@ void LLManipTranslate::highlightIntersection(LLVector3 normal,
1640 1640
1641 GLuint stencil_mask = 0xFFFFFFFF; 1641 GLuint stencil_mask = 0xFFFFFFFF;
1642 //stencil in volumes 1642 //stencil in volumes
1643 gGL.stop(); 1643 gGL.flush();
1644 { 1644 {
1645 glStencilMask(stencil_mask); 1645 glStencilMask(stencil_mask);
1646 glClearStencil(1); 1646 glClearStencil(1);
@@ -1702,7 +1702,7 @@ void LLManipTranslate::highlightIntersection(LLVector3 normal,
1702 1702
1703 glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE); 1703 glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE);
1704 } 1704 }
1705 gGL.start(); 1705 gGL.color4f(1,1,1,1);
1706 1706
1707 gGL.pushMatrix(); 1707 gGL.pushMatrix();
1708 1708
@@ -1907,7 +1907,7 @@ void LLManipTranslate::renderTranslationHandles()
1907 color1.setVec(0.f, 1.f, 0.f, 0.6f); 1907 color1.setVec(0.f, 1.f, 0.f, 0.6f);
1908 color2.setVec(0.f, 0.f, 1.f, 0.6f); 1908 color2.setVec(0.f, 0.f, 1.f, 0.6f);
1909 } 1909 }
1910 gGL.begin(GL_TRIANGLES); 1910 gGL.begin(LLVertexBuffer::TRIANGLES);
1911 { 1911 {
1912 gGL.color4fv(color1.mV); 1912 gGL.color4fv(color1.mV);
1913 gGL.vertex3f(0.f, mPlaneManipOffsetMeters * (-PLANE_TICK_SIZE * 0.25f), mPlaneManipOffsetMeters * (-PLANE_TICK_SIZE * 0.25f)); 1913 gGL.vertex3f(0.f, mPlaneManipOffsetMeters * (-PLANE_TICK_SIZE * 0.25f), mPlaneManipOffsetMeters * (-PLANE_TICK_SIZE * 0.25f));
@@ -1922,7 +1922,7 @@ void LLManipTranslate::renderTranslationHandles()
1922 gGL.end(); 1922 gGL.end();
1923 1923
1924 LLUI::setLineWidth(3.0f); 1924 LLUI::setLineWidth(3.0f);
1925 gGL.begin(GL_LINES); 1925 gGL.begin(LLVertexBuffer::LINES);
1926 { 1926 {
1927 gGL.color4f(0.f, 0.f, 0.f, 0.3f); 1927 gGL.color4f(0.f, 0.f, 0.f, 0.3f);
1928 gGL.vertex3f(0.f, mPlaneManipOffsetMeters * -PLANE_TICK_SIZE * 0.25f, mPlaneManipOffsetMeters * -PLANE_TICK_SIZE * 0.25f); 1928 gGL.vertex3f(0.f, mPlaneManipOffsetMeters * -PLANE_TICK_SIZE * 0.25f, mPlaneManipOffsetMeters * -PLANE_TICK_SIZE * 0.25f);
@@ -1962,7 +1962,7 @@ void LLManipTranslate::renderTranslationHandles()
1962 color2.setVec(1.f, 0.f, 0.f, 0.6f); 1962 color2.setVec(1.f, 0.f, 0.f, 0.6f);
1963 } 1963 }
1964 1964
1965 gGL.begin(GL_TRIANGLES); 1965 gGL.begin(LLVertexBuffer::TRIANGLES);
1966 { 1966 {
1967 gGL.color4fv(color1.mV); 1967 gGL.color4fv(color1.mV);
1968 gGL.vertex3f(mPlaneManipOffsetMeters * (PLANE_TICK_SIZE * 0.25f), 0.f, mPlaneManipOffsetMeters * (PLANE_TICK_SIZE * 0.25f)); 1968 gGL.vertex3f(mPlaneManipOffsetMeters * (PLANE_TICK_SIZE * 0.25f), 0.f, mPlaneManipOffsetMeters * (PLANE_TICK_SIZE * 0.25f));
@@ -1977,7 +1977,7 @@ void LLManipTranslate::renderTranslationHandles()
1977 gGL.end(); 1977 gGL.end();
1978 1978
1979 LLUI::setLineWidth(3.0f); 1979 LLUI::setLineWidth(3.0f);
1980 gGL.begin(GL_LINES); 1980 gGL.begin(LLVertexBuffer::LINES);
1981 { 1981 {
1982 gGL.color4f(0.f, 0.f, 0.f, 0.3f); 1982 gGL.color4f(0.f, 0.f, 0.f, 0.3f);
1983 gGL.vertex3f(mPlaneManipOffsetMeters * -PLANE_TICK_SIZE * 0.25f, 0.f, mPlaneManipOffsetMeters * -PLANE_TICK_SIZE * 0.25f); 1983 gGL.vertex3f(mPlaneManipOffsetMeters * -PLANE_TICK_SIZE * 0.25f, 0.f, mPlaneManipOffsetMeters * -PLANE_TICK_SIZE * 0.25f);
@@ -2041,7 +2041,7 @@ void LLManipTranslate::renderTranslationHandles()
2041 color2.setVec(0.f, 0.8f, 0.f, 0.6f); 2041 color2.setVec(0.f, 0.8f, 0.f, 0.6f);
2042 } 2042 }
2043 2043
2044 gGL.begin(GL_TRIANGLES); 2044 gGL.begin(LLVertexBuffer::TRIANGLES);
2045 { 2045 {
2046 gGL.color4fv(color1.mV); 2046 gGL.color4fv(color1.mV);
2047 gGL.vertex3fv(v0.mV); 2047 gGL.vertex3fv(v0.mV);
@@ -2056,7 +2056,7 @@ void LLManipTranslate::renderTranslationHandles()
2056 gGL.end(); 2056 gGL.end();
2057 2057
2058 LLUI::setLineWidth(3.0f); 2058 LLUI::setLineWidth(3.0f);
2059 gGL.begin(GL_LINES); 2059 gGL.begin(LLVertexBuffer::LINES);
2060 { 2060 {
2061 gGL.color4f(0.f, 0.f, 0.f, 0.3f); 2061 gGL.color4f(0.f, 0.f, 0.f, 0.3f);
2062 LLVector3 v12 = (v1 + v2) * .5f; 2062 LLVector3 v12 = (v1 + v2) * .5f;
@@ -2190,7 +2190,7 @@ void LLManipTranslate::renderArrow(S32 which_arrow, S32 selected_arrow, F32 box_
2190 2190
2191 { 2191 {
2192 LLUI::setLineWidth(2.0f); 2192 LLUI::setLineWidth(2.0f);
2193 gGL.begin(GL_LINES); 2193 gGL.begin(LLVertexBuffer::LINES);
2194 vec.mV[index] = box_size; 2194 vec.mV[index] = box_size;
2195 gGL.vertex3f(vec.mV[0], vec.mV[1], vec.mV[2]); 2195 gGL.vertex3f(vec.mV[0], vec.mV[1], vec.mV[2]);
2196 2196
diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp
index 9226fac..b6e22d8 100644
--- a/linden/indra/newview/llnetmap.cpp
+++ b/linden/indra/newview/llnetmap.cpp
@@ -287,7 +287,7 @@ void LLNetMap::draw()
287 287
288 // Draw using texture. 288 // Draw using texture.
289 LLViewerImage::bindTexture(regionp->getLand().getSTexture()); 289 LLViewerImage::bindTexture(regionp->getLand().getSTexture());
290 gGL.begin(GL_QUADS); 290 gGL.begin(LLVertexBuffer::QUADS);
291 gGL.texCoord2f(0.f, 1.f); 291 gGL.texCoord2f(0.f, 1.f);
292 gGL.vertex2f(left, top); 292 gGL.vertex2f(left, top);
293 gGL.texCoord2f(0.f, 0.f); 293 gGL.texCoord2f(0.f, 0.f);
@@ -304,7 +304,7 @@ void LLNetMap::draw()
304 if (regionp->getLand().getWaterTexture()) 304 if (regionp->getLand().getWaterTexture())
305 { 305 {
306 LLViewerImage::bindTexture(regionp->getLand().getWaterTexture()); 306 LLViewerImage::bindTexture(regionp->getLand().getWaterTexture());
307 gGL.begin(GL_QUADS); 307 gGL.begin(LLVertexBuffer::QUADS);
308 gGL.texCoord2f(0.f, 1.f); 308 gGL.texCoord2f(0.f, 1.f);
309 gGL.vertex2f(left, top); 309 gGL.vertex2f(left, top);
310 gGL.texCoord2f(0.f, 0.f); 310 gGL.texCoord2f(0.f, 0.f);
@@ -354,7 +354,7 @@ void LLNetMap::draw()
354 F32 image_half_width = 0.5f*mObjectMapPixels; 354 F32 image_half_width = 0.5f*mObjectMapPixels;
355 F32 image_half_height = 0.5f*mObjectMapPixels; 355 F32 image_half_height = 0.5f*mObjectMapPixels;
356 356
357 gGL.begin(GL_QUADS); 357 gGL.begin(LLVertexBuffer::QUADS);
358 gGL.texCoord2f(0.f, 1.f); 358 gGL.texCoord2f(0.f, 1.f);
359 gGL.vertex2f(map_center_agent.mV[VX] - image_half_width, image_half_height + map_center_agent.mV[VY]); 359 gGL.vertex2f(map_center_agent.mV[VX] - image_half_width, image_half_height + map_center_agent.mV[VY]);
360 gGL.texCoord2f(0.f, 0.f); 360 gGL.texCoord2f(0.f, 0.f);
@@ -463,7 +463,7 @@ void LLNetMap::draw()
463 { 463 {
464 gGL.color4fv(gFrustumMapColor.mV); 464 gGL.color4fv(gFrustumMapColor.mV);
465 465
466 gGL.begin( GL_TRIANGLES ); 466 gGL.begin( LLVertexBuffer::TRIANGLES );
467 gGL.vertex2f( ctr_x, ctr_y ); 467 gGL.vertex2f( ctr_x, ctr_y );
468 gGL.vertex2f( ctr_x - half_width_pixels, ctr_y + far_clip_pixels ); 468 gGL.vertex2f( ctr_x - half_width_pixels, ctr_y + far_clip_pixels );
469 gGL.vertex2f( ctr_x + half_width_pixels, ctr_y + far_clip_pixels ); 469 gGL.vertex2f( ctr_x + half_width_pixels, ctr_y + far_clip_pixels );
@@ -477,7 +477,7 @@ void LLNetMap::draw()
477 gGL.pushMatrix(); 477 gGL.pushMatrix();
478 gGL.translatef( ctr_x, ctr_y, 0 ); 478 gGL.translatef( ctr_x, ctr_y, 0 );
479 glRotatef( atan2( LLViewerCamera::getInstance()->getAtAxis().mV[VX], LLViewerCamera::getInstance()->getAtAxis().mV[VY] ) * RAD_TO_DEG, 0.f, 0.f, -1.f); 479 glRotatef( atan2( LLViewerCamera::getInstance()->getAtAxis().mV[VX], LLViewerCamera::getInstance()->getAtAxis().mV[VY] ) * RAD_TO_DEG, 0.f, 0.f, -1.f);
480 gGL.begin( GL_TRIANGLES ); 480 gGL.begin( LLVertexBuffer::TRIANGLES );
481 gGL.vertex2f( 0, 0 ); 481 gGL.vertex2f( 0, 0 );
482 gGL.vertex2f( -half_width_pixels, far_clip_pixels ); 482 gGL.vertex2f( -half_width_pixels, far_clip_pixels );
483 gGL.vertex2f( half_width_pixels, far_clip_pixels ); 483 gGL.vertex2f( half_width_pixels, far_clip_pixels );
diff --git a/linden/indra/newview/llselectmgr.cpp b/linden/indra/newview/llselectmgr.cpp
index f7dd150..7d26f06 100644
--- a/linden/indra/newview/llselectmgr.cpp
+++ b/linden/indra/newview/llselectmgr.cpp
@@ -5274,7 +5274,7 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color)
5274 5274
5275 LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE, GL_GEQUAL); 5275 LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE, GL_GEQUAL);
5276 glAlphaFunc(GL_GREATER, 0.01f); 5276 glAlphaFunc(GL_GREATER, 0.01f);
5277 gGL.begin(GL_LINES); 5277 gGL.begin(LLVertexBuffer::LINES);
5278 { 5278 {
5279 S32 i = 0; 5279 S32 i = 0;
5280 for (S32 seg_num = 0; seg_num < (S32)mSilhouetteSegments.size(); seg_num++) 5280 for (S32 seg_num = 0; seg_num < (S32)mSilhouetteSegments.size(); seg_num++)
@@ -5295,7 +5295,7 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color)
5295 5295
5296 gGL.flush(); 5296 gGL.flush();
5297 gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 5297 gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
5298 gGL.begin(GL_TRIANGLES); 5298 gGL.begin(LLVertexBuffer::TRIANGLES);
5299 { 5299 {
5300 S32 i = 0; 5300 S32 i = 0;
5301 for (S32 seg_num = 0; seg_num < (S32)mSilhouetteSegments.size(); seg_num++) 5301 for (S32 seg_num = 0; seg_num < (S32)mSilhouetteSegments.size(); seg_num++)
diff --git a/linden/indra/newview/llspatialpartition.cpp b/linden/indra/newview/llspatialpartition.cpp
index e91e108..cb115ff 100644
--- a/linden/indra/newview/llspatialpartition.cpp
+++ b/linden/indra/newview/llspatialpartition.cpp
@@ -1646,7 +1646,7 @@ public:
1646 1646
1647void drawBox(const LLVector3& c, const LLVector3& r) 1647void drawBox(const LLVector3& c, const LLVector3& r)
1648{ 1648{
1649 gGL.begin(GL_TRIANGLE_STRIP); 1649 gGL.begin(LLVertexBuffer::TRIANGLE_STRIP);
1650 //left front 1650 //left front
1651 gGL.vertex3fv((c+r.scaledVec(LLVector3(-1,1,-1))).mV); 1651 gGL.vertex3fv((c+r.scaledVec(LLVector3(-1,1,-1))).mV);
1652 gGL.vertex3fv((c+r.scaledVec(LLVector3(-1,1,1))).mV); 1652 gGL.vertex3fv((c+r.scaledVec(LLVector3(-1,1,1))).mV);
@@ -1665,7 +1665,7 @@ void drawBox(const LLVector3& c, const LLVector3& r)
1665 gGL.end(); 1665 gGL.end();
1666 1666
1667 //bottom 1667 //bottom
1668 gGL.begin(GL_TRIANGLE_STRIP); 1668 gGL.begin(LLVertexBuffer::TRIANGLE_STRIP);
1669 gGL.vertex3fv((c+r.scaledVec(LLVector3(1,1,-1))).mV); 1669 gGL.vertex3fv((c+r.scaledVec(LLVector3(1,1,-1))).mV);
1670 gGL.vertex3fv((c+r.scaledVec(LLVector3(1,-1,-1))).mV); 1670 gGL.vertex3fv((c+r.scaledVec(LLVector3(1,-1,-1))).mV);
1671 gGL.vertex3fv((c+r.scaledVec(LLVector3(-1,1,-1))).mV); 1671 gGL.vertex3fv((c+r.scaledVec(LLVector3(-1,1,-1))).mV);
@@ -1673,7 +1673,7 @@ void drawBox(const LLVector3& c, const LLVector3& r)
1673 gGL.end(); 1673 gGL.end();
1674 1674
1675 //top 1675 //top
1676 gGL.begin(GL_TRIANGLE_STRIP); 1676 gGL.begin(LLVertexBuffer::TRIANGLE_STRIP);
1677 gGL.vertex3fv((c+r.scaledVec(LLVector3(1,1,1))).mV); 1677 gGL.vertex3fv((c+r.scaledVec(LLVector3(1,1,1))).mV);
1678 gGL.vertex3fv((c+r.scaledVec(LLVector3(-1,1,1))).mV); 1678 gGL.vertex3fv((c+r.scaledVec(LLVector3(-1,1,1))).mV);
1679 gGL.vertex3fv((c+r.scaledVec(LLVector3(1,-1,1))).mV); 1679 gGL.vertex3fv((c+r.scaledVec(LLVector3(1,-1,1))).mV);
@@ -1688,7 +1688,7 @@ void drawBoxOutline(const LLVector3& pos, const LLVector3& size)
1688 LLVector3 v3 = size.scaledVec(LLVector3(-1,-1,1)); 1688 LLVector3 v3 = size.scaledVec(LLVector3(-1,-1,1));
1689 LLVector3 v4 = size.scaledVec(LLVector3( 1,-1,1)); 1689 LLVector3 v4 = size.scaledVec(LLVector3( 1,-1,1));
1690 1690
1691 gGL.begin(GL_LINES); 1691 gGL.begin(LLVertexBuffer::LINES);
1692 1692
1693 //top 1693 //top
1694 gGL.vertex3fv((pos+v1).mV); 1694 gGL.vertex3fv((pos+v1).mV);
@@ -2032,7 +2032,7 @@ void renderOctree(LLSpatialGroup* group)
2032 drawBoxOutline(group->mObjectBounds[0], group->mObjectBounds[1]); 2032 drawBoxOutline(group->mObjectBounds[0], group->mObjectBounds[1]);
2033 gGL.flush(); 2033 gGL.flush();
2034 glLineWidth(1.f); 2034 glLineWidth(1.f);
2035 gGL.stop(); 2035 gGL.flush();
2036 for (LLSpatialGroup::element_iter i = group->getData().begin(); i != group->getData().end(); ++i) 2036 for (LLSpatialGroup::element_iter i = group->getData().begin(); i != group->getData().end(); ++i)
2037 { 2037 {
2038 LLDrawable* drawable = *i; 2038 LLDrawable* drawable = *i;
@@ -2074,7 +2074,7 @@ void renderOctree(LLSpatialGroup* group)
2074 } 2074 }
2075 } 2075 }
2076 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); 2076 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
2077 gGL.start(); 2077 gGL.color4f(1,1,1,1);
2078 } 2078 }
2079 } 2079 }
2080 else 2080 else
@@ -2313,7 +2313,7 @@ void renderPoints(LLDrawable* drawablep)
2313 LLGLDepthTest depth(GL_FALSE, GL_FALSE); 2313 LLGLDepthTest depth(GL_FALSE, GL_FALSE);
2314 if (drawablep->getNumFaces()) 2314 if (drawablep->getNumFaces())
2315 { 2315 {
2316 gGL.begin(GL_POINTS); 2316 gGL.begin(LLVertexBuffer::POINTS);
2317 gGL.color3f(1,1,1); 2317 gGL.color3f(1,1,1);
2318 LLVector3 center(drawablep->getPositionGroup()); 2318 LLVector3 center(drawablep->getPositionGroup());
2319 for (S32 i = 0; i < drawablep->getNumFaces(); i++) 2319 for (S32 i = 0; i < drawablep->getNumFaces(); i++)
@@ -2405,14 +2405,14 @@ public:
2405 if (group->mSpatialPartition->mRenderByGroup && 2405 if (group->mSpatialPartition->mRenderByGroup &&
2406 gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_OCCLUSION)) 2406 gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_OCCLUSION))
2407 { 2407 {
2408 gGL.stop(); 2408 gGL.flush();
2409 glPushMatrix(); 2409 glPushMatrix();
2410 gGLLastMatrix = NULL; 2410 gGLLastMatrix = NULL;
2411 glLoadMatrixd(gGLModelView); 2411 glLoadMatrixd(gGLModelView);
2412 renderVisibility(group, mCamera); 2412 renderVisibility(group, mCamera);
2413 gGLLastMatrix = NULL; 2413 gGLLastMatrix = NULL;
2414 glPopMatrix(); 2414 glPopMatrix();
2415 gGL.start(); 2415 gGL.color4f(1,1,1,1);
2416 } 2416 }
2417 } 2417 }
2418 } 2418 }
diff --git a/linden/indra/newview/lltexlayer.cpp b/linden/indra/newview/lltexlayer.cpp
index 5a0a843..66d9a33 100644
--- a/linden/indra/newview/lltexlayer.cpp
+++ b/linden/indra/newview/lltexlayer.cpp
@@ -244,8 +244,6 @@ BOOL LLTexLayerSetBuffer::render()
244 BOOL upload_now = (gAgent.mNumPendingQueries == 0 && mNeedsUpload && mTexLayerSet->isLocalTextureDataFinal()); 244 BOOL upload_now = (gAgent.mNumPendingQueries == 0 && mNeedsUpload && mTexLayerSet->isLocalTextureDataFinal());
245 BOOL success = TRUE; 245 BOOL success = TRUE;
246 246
247 gGL.start();
248
249 // Composite bump 247 // Composite bump
250 if( mBumpTexName ) 248 if( mBumpTexName )
251 { 249 {
@@ -297,8 +295,6 @@ BOOL LLTexLayerSetBuffer::render()
297 glColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE ); 295 glColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE );
298 gGL.blendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); 296 gGL.blendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
299 297
300 gGL.stop();
301
302 // we have valid texture data now 298 // we have valid texture data now
303 mInitialized = TRUE; 299 mInitialized = TRUE;
304 mNeedsUpdate = FALSE; 300 mNeedsUpdate = FALSE;
diff --git a/linden/indra/newview/lltexturectrl.cpp b/linden/indra/newview/lltexturectrl.cpp
index acf4a10..2be75c7 100644
--- a/linden/indra/newview/lltexturectrl.cpp
+++ b/linden/indra/newview/lltexturectrl.cpp
@@ -484,7 +484,7 @@ void LLFloaterTexturePicker::draw()
484 { 484 {
485 LLGLSNoTexture no_texture; 485 LLGLSNoTexture no_texture;
486 LLGLEnable(GL_CULL_FACE); 486 LLGLEnable(GL_CULL_FACE);
487 gGL.begin(GL_QUADS); 487 gGL.begin(LLVertexBuffer::QUADS);
488 { 488 {
489 gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity); 489 gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
490 gGL.vertex2i(owner_rect.mLeft, owner_rect.mTop); 490 gGL.vertex2i(owner_rect.mLeft, owner_rect.mTop);
diff --git a/linden/indra/newview/lltoolbrush.cpp b/linden/indra/newview/lltoolbrush.cpp
index 9572440..319a5fd 100644
--- a/linden/indra/newview/lltoolbrush.cpp
+++ b/linden/indra/newview/lltoolbrush.cpp
@@ -482,7 +482,7 @@ void LLToolBrushLand::renderOverlay(LLSurface& land, const LLVector3& pos_region
482 S32 j = (S32) pos_region.mV[VY]; 482 S32 j = (S32) pos_region.mV[VY];
483 S32 half_edge = llfloor(LAND_BRUSH_SIZE[mBrushIndex]); 483 S32 half_edge = llfloor(LAND_BRUSH_SIZE[mBrushIndex]);
484 484
485 gGL.begin(GL_POINTS); 485 gGL.begin(LLVertexBuffer::POINTS);
486 for(S32 di = -half_edge; di <= half_edge; di++) 486 for(S32 di = -half_edge; di <= half_edge; di++)
487 { 487 {
488 if((i+di) < 0 || (i+di) >= (S32)land.mGridsPerEdge) continue; 488 if((i+di) < 0 || (i+di) >= (S32)land.mGridsPerEdge) continue;
diff --git a/linden/indra/newview/lltoolmorph.cpp b/linden/indra/newview/lltoolmorph.cpp
index 9acf3a0..a18321a 100644
--- a/linden/indra/newview/lltoolmorph.cpp
+++ b/linden/indra/newview/lltoolmorph.cpp
@@ -163,8 +163,6 @@ void LLVisualParamHint::preRender(BOOL clear_depth)
163//----------------------------------------------------------------------------- 163//-----------------------------------------------------------------------------
164BOOL LLVisualParamHint::render() 164BOOL LLVisualParamHint::render()
165{ 165{
166 gGL.start();
167
168 LLVisualParamReset::sDirty = TRUE; 166 LLVisualParamReset::sDirty = TRUE;
169 LLVOAvatar* avatarp = gAgent.getAvatarObject(); 167 LLVOAvatar* avatarp = gAgent.getAvatarObject();
170 168
@@ -224,7 +222,7 @@ BOOL LLVisualParamHint::render()
224 mVisualParam->getCameraElevation() ); 222 mVisualParam->getCameraElevation() );
225 LLVector3 camera_pos = target_joint_pos + (camera_snapshot_offset * avatar_rotation); 223 LLVector3 camera_pos = target_joint_pos + (camera_snapshot_offset * avatar_rotation);
226 224
227 gGL.stop(); 225 gGL.flush();
228 226
229 LLViewerCamera::getInstance()->setAspect((F32)mWidth / (F32)mHeight); 227 LLViewerCamera::getInstance()->setAspect((F32)mWidth / (F32)mHeight);
230 LLViewerCamera::getInstance()->setOriginAndLookAt( 228 LLViewerCamera::getInstance()->setOriginAndLookAt(
@@ -241,7 +239,7 @@ BOOL LLVisualParamHint::render()
241 avatarPoolp->renderAvatars(avatarp); // renders only one avatar 239 avatarPoolp->renderAvatars(avatarp); // renders only one avatar
242 } 240 }
243 avatarp->setVisualParamWeight(mVisualParam, mLastParamWeight); 241 avatarp->setVisualParamWeight(mVisualParam, mLastParamWeight);
244 242 gGL.color4f(1,1,1,1);
245 return TRUE; 243 return TRUE;
246} 244}
247 245
@@ -258,7 +256,7 @@ void LLVisualParamHint::draw()
258 gGL.color4f(1.f, 1.f, 1.f, 1.f); 256 gGL.color4f(1.f, 1.f, 1.f, 1.f);
259 257
260 LLGLSUIDefault gls_ui; 258 LLGLSUIDefault gls_ui;
261 gGL.begin(GL_QUADS); 259 gGL.begin(LLVertexBuffer::QUADS);
262 { 260 {
263 gGL.texCoord2i(0, 1); 261 gGL.texCoord2i(0, 1);
264 gGL.vertex2i(0, mHeight); 262 gGL.vertex2i(0, mHeight);
diff --git a/linden/indra/newview/lltracker.cpp b/linden/indra/newview/lltracker.cpp
index 9ff2e97..9e4bb09 100644
--- a/linden/indra/newview/lltracker.cpp
+++ b/linden/indra/newview/lltracker.cpp
@@ -444,7 +444,7 @@ void draw_shockwave(F32 center_z, F32 t, S32 steps, LLColor4 color)
444 F32 y = 0.f; 444 F32 y = 0.f;
445 445
446 LLColor4 ccol = LLColor4(1,1,1,(1.f-t)*0.25f); 446 LLColor4 ccol = LLColor4(1,1,1,(1.f-t)*0.25f);
447 gGL.begin(GL_TRIANGLE_FAN); 447 gGL.begin(LLVertexBuffer::TRIANGLE_FAN);
448 gGL.color4fv(ccol.mV); 448 gGL.color4fv(ccol.mV);
449 gGL.vertex3f(0.f, 0.f, center_z); 449 gGL.vertex3f(0.f, 0.f, center_z);
450 // make sure circle is complete 450 // make sure circle is complete
@@ -534,7 +534,7 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
534 an *= 2.f; 534 an *= 2.f;
535 an += 1.0f+dr; 535 an += 1.0f+dr;
536 536
537 gGL.begin(GL_TRIANGLE_STRIP); 537 gGL.begin(LLVertexBuffer::TRIANGLE_STRIP);
538 gGL.color4fv(col_edge.mV); 538 gGL.color4fv(col_edge.mV);
539 gGL.vertex3f(-x*a, -y*a, z); 539 gGL.vertex3f(-x*a, -y*a, z);
540 gGL.color4fv(col_edge_next.mV); 540 gGL.color4fv(col_edge_next.mV);
diff --git a/linden/indra/newview/llviewerdisplay.cpp b/linden/indra/newview/llviewerdisplay.cpp
index ae23cb5..cdffe33 100644
--- a/linden/indra/newview/llviewerdisplay.cpp
+++ b/linden/indra/newview/llviewerdisplay.cpp
@@ -147,9 +147,11 @@ void display_startup()
147 gViewerWindow->setup2DRender(); 147 gViewerWindow->setup2DRender();
148 glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); 148 glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
149 149
150 gGL.start(); 150 gGL.color4f(1,1,1,1);
151 gViewerWindow->draw(); 151 gViewerWindow->draw();
152 gGL.stop(); 152 gGL.flush();
153
154 LLVertexBuffer::unbind();
153 155
154#ifndef LL_RELEASE_FOR_DOWNLOAD 156#ifndef LL_RELEASE_FOR_DOWNLOAD
155 LLGLState::checkStates(); 157 LLGLState::checkStates();
@@ -199,12 +201,9 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
199 201
200 LLGLSDefault gls_default; 202 LLGLSDefault gls_default;
201 LLGLDepthTest gls_depth(GL_TRUE, GL_TRUE, GL_LEQUAL); 203 LLGLDepthTest gls_depth(GL_TRUE, GL_TRUE, GL_LEQUAL);
202
203 // No clue where this is getting unset, but safe enough to reset it here.
204 //this causes frame stalls, try real hard not to uncomment this line - DaveP
205 //LLGLState::resetTextureStates();
206
207 204
205 LLVertexBuffer::unbind();
206
208#ifndef LL_RELEASE_FOR_DOWNLOAD 207#ifndef LL_RELEASE_FOR_DOWNLOAD
209 LLGLState::checkStates(); 208 LLGLState::checkStates();
210 LLGLState::checkTextureChannels(); 209 LLGLState::checkTextureChannels();
@@ -676,7 +675,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
676 // glTranslatef(0.f, 0.f, -LLViewerCamera::getInstance()->getNear()); 675 // glTranslatef(0.f, 0.f, -LLViewerCamera::getInstance()->getNear());
677 // glScalef(LLViewerCamera::getInstance()->getNear() * LLViewerCamera::getInstance()->getAspect() / sinf(LLViewerCamera::getInstance()->getView()), LLViewerCamera::getInstance()->getNear() / sinf(LLViewerCamera::getInstance()->getView()), 1.f); 676 // glScalef(LLViewerCamera::getInstance()->getNear() * LLViewerCamera::getInstance()->getAspect() / sinf(LLViewerCamera::getInstance()->getView()), LLViewerCamera::getInstance()->getNear() / sinf(LLViewerCamera::getInstance()->getView()), 1.f);
678 // gGL.color4fv(LLColor4::white.mV); 677 // gGL.color4fv(LLColor4::white.mV);
679 // gGL.begin(GL_QUADS); 678 // gGL.begin(LLVertexBuffer::QUADS);
680 // { 679 // {
681 // gGL.vertex3f(floater_3d_rect.mLeft, floater_3d_rect.mBottom, 0.f); 680 // gGL.vertex3f(floater_3d_rect.mLeft, floater_3d_rect.mBottom, 0.f);
682 // gGL.vertex3f(floater_3d_rect.mLeft, floater_3d_rect.mTop, 0.f); 681 // gGL.vertex3f(floater_3d_rect.mLeft, floater_3d_rect.mTop, 0.f);
@@ -910,8 +909,8 @@ void render_ui_and_swap()
910 } 909 }
911 910
912 { 911 {
913 LLVertexBuffer::startRender(); 912
914 gGL.start(); 913 gGL.color4f(1,1,1,1);
915 if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) 914 if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
916 { 915 {
917 LLFastTimer t(LLFastTimer::FTM_RENDER_UI); 916 LLFastTimer t(LLFastTimer::FTM_RENDER_UI);
@@ -929,7 +928,7 @@ void render_ui_and_swap()
929 LLGLState::checkStates(); 928 LLGLState::checkStates();
930#endif 929#endif
931 } 930 }
932 gGL.stop(); 931 gGL.flush();
933 932
934 { 933 {
935 gViewerWindow->setup2DRender(); 934 gViewerWindow->setup2DRender();
@@ -937,7 +936,7 @@ void render_ui_and_swap()
937 gViewerWindow->drawDebugText(); 936 gViewerWindow->drawDebugText();
938 } 937 }
939 938
940 LLVertexBuffer::stopRender(); 939 LLVertexBuffer::unbind();
941 } 940 }
942 941
943 glh_set_current_modelview(saved_view); 942 glh_set_current_modelview(saved_view);
@@ -960,7 +959,7 @@ void render_ui_and_swap_if_needed()
960void renderCoordinateAxes() 959void renderCoordinateAxes()
961{ 960{
962 LLGLSNoTexture gls_no_texture; 961 LLGLSNoTexture gls_no_texture;
963 gGL.begin(GL_LINES); 962 gGL.begin(LLVertexBuffer::LINES);
964 gGL.color3f(1.0f, 0.0f, 0.0f); // i direction = X-Axis = red 963 gGL.color3f(1.0f, 0.0f, 0.0f); // i direction = X-Axis = red
965 gGL.vertex3f(0.0f, 0.0f, 0.0f); 964 gGL.vertex3f(0.0f, 0.0f, 0.0f);
966 gGL.vertex3f(2.0f, 0.0f, 0.0f); 965 gGL.vertex3f(2.0f, 0.0f, 0.0f);
@@ -1013,7 +1012,7 @@ void draw_axes()
1013 LLGLSNoTexture gls_no_texture; 1012 LLGLSNoTexture gls_no_texture;
1014 // A vertical white line at origin 1013 // A vertical white line at origin
1015 LLVector3 v = gAgent.getPositionAgent(); 1014 LLVector3 v = gAgent.getPositionAgent();
1016 gGL.begin(GL_LINES); 1015 gGL.begin(LLVertexBuffer::LINES);
1017 gGL.color3f(1.0f, 1.0f, 1.0f); 1016 gGL.color3f(1.0f, 1.0f, 1.0f);
1018 gGL.vertex3f(0.0f, 0.0f, 0.0f); 1017 gGL.vertex3f(0.0f, 0.0f, 0.0f);
1019 gGL.vertex3f(0.0f, 0.0f, 40.0f); 1018 gGL.vertex3f(0.0f, 0.0f, 40.0f);
@@ -1119,7 +1118,7 @@ void render_ui_2d()
1119 1118
1120void render_disconnected_background() 1119void render_disconnected_background()
1121{ 1120{
1122 gGL.start(); 1121 gGL.color4f(1,1,1,1);
1123 if (!gDisconnectedImagep && gDisconnected) 1122 if (!gDisconnectedImagep && gDisconnected)
1124 { 1123 {
1125 llinfos << "Loading last bitmap..." << llendl; 1124 llinfos << "Loading last bitmap..." << llendl;
@@ -1192,7 +1191,7 @@ void render_disconnected_background()
1192 } 1191 }
1193 glPopMatrix(); 1192 glPopMatrix();
1194 } 1193 }
1195 gGL.stop(); 1194 gGL.flush();
1196} 1195}
1197 1196
1198void display_cleanup() 1197void display_cleanup()
diff --git a/linden/indra/newview/llviewerjoint.cpp b/linden/indra/newview/llviewerjoint.cpp
index bea90e6..71f9211 100644
--- a/linden/indra/newview/llviewerjoint.cpp
+++ b/linden/indra/newview/llviewerjoint.cpp
@@ -148,7 +148,7 @@ void LLViewerJoint::renderSkeleton(BOOL recursive)
148 //---------------------------------------------------------------- 148 //----------------------------------------------------------------
149 if (mComponents & SC_AXES) 149 if (mComponents & SC_AXES)
150 { 150 {
151 gGL.begin(GL_LINES); 151 gGL.begin(LLVertexBuffer::LINES);
152 gGL.color3f( 1.0f, 0.0f, 0.0f ); 152 gGL.color3f( 1.0f, 0.0f, 0.0f );
153 gGL.vertex3f( 0.0f, 0.0f, 0.0f ); 153 gGL.vertex3f( 0.0f, 0.0f, 0.0f );
154 gGL.vertex3f( 0.1f, 0.0f, 0.0f ); 154 gGL.vertex3f( 0.1f, 0.0f, 0.0f );
@@ -170,7 +170,7 @@ void LLViewerJoint::renderSkeleton(BOOL recursive)
170 { 170 {
171 gGL.color3f( 1.0f, 1.0f, 0.0f ); 171 gGL.color3f( 1.0f, 1.0f, 0.0f );
172 172
173 gGL.begin(GL_TRIANGLES); 173 gGL.begin(LLVertexBuffer::TRIANGLES);
174 174
175 // joint top half 175 // joint top half
176 glNormal3f(nc, nc, nc); 176 glNormal3f(nc, nc, nc);
@@ -360,7 +360,7 @@ void LLViewerJoint::drawBone()
360 // render the bone 360 // render the bone
361 gGL.color3f( 0.5f, 0.5f, 0.0f ); 361 gGL.color3f( 0.5f, 0.5f, 0.0f );
362 362
363 gGL.begin(GL_TRIANGLES); 363 gGL.begin(LLVertexBuffer::TRIANGLES);
364 364
365 gGL.vertex3f( length, 0.0f, 0.0f); 365 gGL.vertex3f( length, 0.0f, 0.0f);
366 gGL.vertex3f( 0.0f, boneSize, 0.0f); 366 gGL.vertex3f( 0.0f, boneSize, 0.0f);
diff --git a/linden/indra/newview/llviewerjointattachment.cpp b/linden/indra/newview/llviewerjointattachment.cpp
index ad7d5df..bbab71b 100644
--- a/linden/indra/newview/llviewerjointattachment.cpp
+++ b/linden/indra/newview/llviewerjointattachment.cpp
@@ -92,7 +92,7 @@ U32 LLViewerJointAttachment::drawShape( F32 pixelArea, BOOL first_pass )
92 LLGLDisable cull_face(GL_CULL_FACE); 92 LLGLDisable cull_face(GL_CULL_FACE);
93 93
94 gGL.color4f(1.f, 1.f, 1.f, 1.f); 94 gGL.color4f(1.f, 1.f, 1.f, 1.f);
95 gGL.begin(GL_QUADS); 95 gGL.begin(LLVertexBuffer::QUADS);
96 { 96 {
97 gGL.vertex3f(-0.1f, 0.1f, 0.f); 97 gGL.vertex3f(-0.1f, 0.1f, 0.f);
98 gGL.vertex3f(-0.1f, -0.1f, 0.f); 98 gGL.vertex3f(-0.1f, -0.1f, 0.f);
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp
index e9f100e..a9adbcd 100644
--- a/linden/indra/newview/llviewermessage.cpp
+++ b/linden/indra/newview/llviewermessage.cpp
@@ -1824,7 +1824,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1824 } 1824 }
1825 break; 1825 break;
1826 case IM_BUSY_AUTO_RESPONSE: 1826 case IM_BUSY_AUTO_RESPONSE:
1827 // fix for JIRA issue VWR-20 submitted 13-JAN-2007 - Paul Churchill
1828 if (is_muted) 1827 if (is_muted)
1829 { 1828 {
1830 lldebugs << "Ignoring busy response from " << from_id << llendl; 1829 lldebugs << "Ignoring busy response from " << from_id << llendl;
@@ -1832,8 +1831,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
1832 } 1831 }
1833 else 1832 else
1834 { 1833 {
1835 // original code resumes 1834 // TODO: after LLTrans hits release, get "busy response" into translatable file
1836 gIMMgr->addMessage(session_id, from_id, name, message); 1835 snprintf(buffer, sizeof(buffer), "%s (%s): %s", name, "busy response", (message+message_offset)); /* Flawfinder: ignore */
1836 gIMMgr->addMessage(session_id, from_id, name, buffer);
1837 } 1837 }
1838 break; 1838 break;
1839 1839
diff --git a/linden/indra/newview/llviewerobjectlist.cpp b/linden/indra/newview/llviewerobjectlist.cpp
index 9b1548f..03567b0 100644
--- a/linden/indra/newview/llviewerobjectlist.cpp
+++ b/linden/indra/newview/llviewerobjectlist.cpp
@@ -1206,12 +1206,12 @@ U32 LLViewerObjectList::renderObjectsForSelect(LLCamera &camera, BOOL pick_parce
1206 // 1206 //
1207 // Render pass for selected objects 1207 // Render pass for selected objects
1208 // 1208 //
1209 gGL.start(); 1209 gGL.color4f(1,1,1,1);
1210 gViewerWindow->renderSelections( TRUE, pick_parcel_wall, FALSE ); 1210 gViewerWindow->renderSelections( TRUE, pick_parcel_wall, FALSE );
1211 1211
1212 // render pickable ui elements, like names, etc. 1212 // render pickable ui elements, like names, etc.
1213 LLHUDObject::renderAllForSelect(); 1213 LLHUDObject::renderAllForSelect();
1214 gGL.stop(); 1214 gGL.flush();
1215 1215
1216 gRenderForSelect = FALSE; 1216 gRenderForSelect = FALSE;
1217 1217
diff --git a/linden/indra/newview/llviewerparceloverlay.cpp b/linden/indra/newview/llviewerparceloverlay.cpp
index ad34b6a..7d0b2b4 100644
--- a/linden/indra/newview/llviewerparceloverlay.cpp
+++ b/linden/indra/newview/llviewerparceloverlay.cpp
@@ -824,7 +824,7 @@ S32 LLViewerParcelOverlay::renderPropertyLines ()
824 continue; 824 continue;
825 } 825 }
826 826
827 gGL.begin(GL_TRIANGLE_STRIP); 827 gGL.begin(LLVertexBuffer::TRIANGLE_STRIP);
828 828
829 for (j = 0; j < vertex_per_edge; j++) 829 for (j = 0; j < vertex_per_edge; j++)
830 { 830 {
@@ -844,7 +844,7 @@ S32 LLViewerParcelOverlay::renderPropertyLines ()
844 colorp = mColorArray + BYTES_PER_COLOR * i; 844 colorp = mColorArray + BYTES_PER_COLOR * i;
845 vertexp = mVertexArray + FLOATS_PER_VERTEX * i; 845 vertexp = mVertexArray + FLOATS_PER_VERTEX * i;
846 846
847 gGL.begin(GL_TRIANGLE_STRIP); 847 gGL.begin(LLVertexBuffer::TRIANGLE_STRIP);
848 848
849 for (j = 0; j < vertex_per_edge; j++) 849 for (j = 0; j < vertex_per_edge; j++)
850 { 850 {
diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp
index 563c0e6..4c76b8b 100644
--- a/linden/indra/newview/llviewerwindow.cpp
+++ b/linden/indra/newview/llviewerwindow.cpp
@@ -2243,7 +2243,7 @@ void LLViewerWindow::setMenuBackgroundColor(bool god_mode, bool dev_grid)
2243 2243
2244void LLViewerWindow::drawDebugText() 2244void LLViewerWindow::drawDebugText()
2245{ 2245{
2246 gGL.start(); 2246 gGL.color4f(1,1,1,1);
2247 gGL.pushMatrix(); 2247 gGL.pushMatrix();
2248 { 2248 {
2249 // scale view by UI global scale factor and aspect ratio correction factor 2249 // scale view by UI global scale factor and aspect ratio correction factor
@@ -2251,7 +2251,7 @@ void LLViewerWindow::drawDebugText()
2251 mDebugText->draw(); 2251 mDebugText->draw();
2252 } 2252 }
2253 gGL.popMatrix(); 2253 gGL.popMatrix();
2254 gGL.stop(); 2254 gGL.flush();
2255} 2255}
2256 2256
2257void LLViewerWindow::draw() 2257void LLViewerWindow::draw()
@@ -5212,7 +5212,7 @@ void LLViewerWindow::drawPickBuffer() const
5212{ 5212{
5213 if (mPickBuffer) 5213 if (mPickBuffer)
5214 { 5214 {
5215 gGL.start(); 5215 gGL.color4f(1,1,1,1);
5216 gGL.pushMatrix(); 5216 gGL.pushMatrix();
5217 LLGLDisable no_blend(GL_BLEND); 5217 LLGLDisable no_blend(GL_BLEND);
5218 LLGLDisable no_alpha_test(GL_ALPHA_TEST); 5218 LLGLDisable no_alpha_test(GL_ALPHA_TEST);
@@ -5248,7 +5248,7 @@ void LLViewerWindow::drawPickBuffer() const
5248 llround((F32)mPickPoint.mY * mDisplayScale.mV[VY] + (F32)(PICK_HALF_WIDTH + mPickOffset.mY) * 10.f), 5248 llround((F32)mPickPoint.mY * mDisplayScale.mV[VY] + (F32)(PICK_HALF_WIDTH + mPickOffset.mY) * 10.f),
5249 FALSE); 5249 FALSE);
5250 gGL.popMatrix(); 5250 gGL.popMatrix();
5251 gGL.stop(); 5251 gGL.flush();
5252 } 5252 }
5253} 5253}
5254 5254
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp
index 7989704..7de2f9c 100644
--- a/linden/indra/newview/llvoavatar.cpp
+++ b/linden/indra/newview/llvoavatar.cpp
@@ -3965,7 +3965,7 @@ U32 LLVOAvatar::renderSkinned(EAvatarRenderPass pass)
3965 LLVector3 collide_point = slaved_pos; 3965 LLVector3 collide_point = slaved_pos;
3966 collide_point.mV[VZ] -= foot_plane_normal.mV[VZ] * (dist_from_plane + COLLISION_TOLERANCE - FOOT_COLLIDE_FUDGE); 3966 collide_point.mV[VZ] -= foot_plane_normal.mV[VZ] * (dist_from_plane + COLLISION_TOLERANCE - FOOT_COLLIDE_FUDGE);
3967 3967
3968 gGL.begin(GL_LINES); 3968 gGL.begin(LLVertexBuffer::LINES);
3969 { 3969 {
3970 F32 SQUARE_SIZE = 0.2f; 3970 F32 SQUARE_SIZE = 0.2f;
3971 gGL.color4f(1.f, 0.f, 0.f, 1.f); 3971 gGL.color4f(1.f, 0.f, 0.f, 1.f);
@@ -4138,10 +4138,10 @@ U32 LLVOAvatar::renderImpostor(LLColor4U color)
4138 LLGLEnable test(GL_ALPHA_TEST); 4138 LLGLEnable test(GL_ALPHA_TEST);
4139 glAlphaFunc(GL_GREATER, 0.f); 4139 glAlphaFunc(GL_GREATER, 0.f);
4140 4140
4141 gGL.start(); 4141 gGL.color4f(1,1,1,1);
4142 gGL.color4ubv(color.mV); 4142 gGL.color4ubv(color.mV);
4143 mImpostor.bindTexture(); 4143 mImpostor.bindTexture();
4144 gGL.begin(GL_QUADS); 4144 gGL.begin(LLVertexBuffer::QUADS);
4145 gGL.texCoord2f(0,0); 4145 gGL.texCoord2f(0,0);
4146 gGL.vertex3fv((pos+left-up).mV); 4146 gGL.vertex3fv((pos+left-up).mV);
4147 gGL.texCoord2f(1,0); 4147 gGL.texCoord2f(1,0);
@@ -4151,7 +4151,7 @@ U32 LLVOAvatar::renderImpostor(LLColor4U color)
4151 gGL.texCoord2f(0,1); 4151 gGL.texCoord2f(0,1);
4152 gGL.vertex3fv((pos+left+up).mV); 4152 gGL.vertex3fv((pos+left+up).mV);
4153 gGL.end(); 4153 gGL.end();
4154 gGL.stop(); 4154 gGL.flush();
4155 4155
4156 return 6; 4156 return 6;
4157} 4157}
diff --git a/linden/indra/newview/llvoicevisualizer.cpp b/linden/indra/newview/llvoicevisualizer.cpp
index 9dcf716..6b2a3e6 100644
--- a/linden/indra/newview/llvoicevisualizer.cpp
+++ b/linden/indra/newview/llvoicevisualizer.cpp
@@ -222,13 +222,13 @@ void LLVoiceVisualizer::render()
222 //------------------------------------------------------------- 222 //-------------------------------------------------------------
223 gGL.color4fv( LLColor4( 1.0f, 1.0f, 1.0f, DOT_OPACITY ).mV ); 223 gGL.color4fv( LLColor4( 1.0f, 1.0f, 1.0f, DOT_OPACITY ).mV );
224 224
225 gGL.begin( GL_TRIANGLE_STRIP ); 225 gGL.begin( LLVertexBuffer::TRIANGLE_STRIP );
226 gGL.texCoord2i( 0, 0 ); gGL.vertex3fv( bottomLeft.mV ); 226 gGL.texCoord2i( 0, 0 ); gGL.vertex3fv( bottomLeft.mV );
227 gGL.texCoord2i( 1, 0 ); gGL.vertex3fv( bottomRight.mV ); 227 gGL.texCoord2i( 1, 0 ); gGL.vertex3fv( bottomRight.mV );
228 gGL.texCoord2i( 0, 1 ); gGL.vertex3fv( topLeft.mV ); 228 gGL.texCoord2i( 0, 1 ); gGL.vertex3fv( topLeft.mV );
229 gGL.end(); 229 gGL.end();
230 230
231 gGL.begin( GL_TRIANGLE_STRIP ); 231 gGL.begin( LLVertexBuffer::TRIANGLE_STRIP );
232 gGL.texCoord2i( 1, 0 ); gGL.vertex3fv( bottomRight.mV ); 232 gGL.texCoord2i( 1, 0 ); gGL.vertex3fv( bottomRight.mV );
233 gGL.texCoord2i( 1, 1 ); gGL.vertex3fv( topRight.mV ); 233 gGL.texCoord2i( 1, 1 ); gGL.vertex3fv( topRight.mV );
234 gGL.texCoord2i( 0, 1 ); gGL.vertex3fv( topLeft.mV ); 234 gGL.texCoord2i( 0, 1 ); gGL.vertex3fv( topLeft.mV );
@@ -345,13 +345,13 @@ void LLVoiceVisualizer::render()
345 //--------------------------------------------------- 345 //---------------------------------------------------
346 // now, render the mofo 346 // now, render the mofo
347 //--------------------------------------------------- 347 //---------------------------------------------------
348 gGL.begin( GL_TRIANGLE_STRIP ); 348 gGL.begin( LLVertexBuffer::TRIANGLE_STRIP );
349 gGL.texCoord2i( 0, 0 ); gGL.vertex3fv( bottomLeft.mV ); 349 gGL.texCoord2i( 0, 0 ); gGL.vertex3fv( bottomLeft.mV );
350 gGL.texCoord2i( 1, 0 ); gGL.vertex3fv( bottomRight.mV ); 350 gGL.texCoord2i( 1, 0 ); gGL.vertex3fv( bottomRight.mV );
351 gGL.texCoord2i( 0, 1 ); gGL.vertex3fv( topLeft.mV ); 351 gGL.texCoord2i( 0, 1 ); gGL.vertex3fv( topLeft.mV );
352 gGL.end(); 352 gGL.end();
353 353
354 gGL.begin( GL_TRIANGLE_STRIP ); 354 gGL.begin( LLVertexBuffer::TRIANGLE_STRIP );
355 gGL.texCoord2i( 1, 0 ); gGL.vertex3fv( bottomRight.mV ); 355 gGL.texCoord2i( 1, 0 ); gGL.vertex3fv( bottomRight.mV );
356 gGL.texCoord2i( 1, 1 ); gGL.vertex3fv( topRight.mV ); 356 gGL.texCoord2i( 1, 1 ); gGL.vertex3fv( topRight.mV );
357 gGL.texCoord2i( 0, 1 ); gGL.vertex3fv( topLeft.mV ); 357 gGL.texCoord2i( 0, 1 ); gGL.vertex3fv( topLeft.mV );
diff --git a/linden/indra/newview/llwebbrowserctrl.cpp b/linden/indra/newview/llwebbrowserctrl.cpp
index fbbd827..710b7e1 100644
--- a/linden/indra/newview/llwebbrowserctrl.cpp
+++ b/linden/indra/newview/llwebbrowserctrl.cpp
@@ -568,14 +568,14 @@ void LLWebBrowserCtrl::draw()
568 LLGLSUIDefault gls_ui; 568 LLGLSUIDefault gls_ui;
569 LLGLDisable gls_alphaTest( GL_ALPHA_TEST ); 569 LLGLDisable gls_alphaTest( GL_ALPHA_TEST );
570 570
571 glPushMatrix(); 571 gGL.pushMatrix();
572 { 572 {
573 if (mIgnoreUIScale) 573 if (mIgnoreUIScale)
574 { 574 {
575 glLoadIdentity(); 575 glLoadIdentity();
576 // font system stores true screen origin, need to scale this by UI scale factor 576 // font system stores true screen origin, need to scale this by UI scale factor
577 // to get render origin for this view (with unit scale) 577 // to get render origin for this view (with unit scale)
578 glTranslatef(floorf(LLFontGL::sCurOrigin.mX * LLUI::sGLScaleFactor.mV[VX]), 578 gGL.translatef(floorf(LLFontGL::sCurOrigin.mX * LLUI::sGLScaleFactor.mV[VX]),
579 floorf(LLFontGL::sCurOrigin.mY * LLUI::sGLScaleFactor.mV[VY]), 579 floorf(LLFontGL::sCurOrigin.mY * LLUI::sGLScaleFactor.mV[VY]),
580 LLFontGL::sCurOrigin.mZ); 580 LLFontGL::sCurOrigin.mZ);
581 } 581 }
@@ -588,7 +588,7 @@ void LLWebBrowserCtrl::draw()
588 588
589 // draw the browser 589 // draw the browser
590 gGL.blendFunc( GL_ONE, GL_ZERO ); 590 gGL.blendFunc( GL_ONE, GL_ZERO );
591 gGL.begin( GL_QUADS ); 591 gGL.begin( LLVertexBuffer::QUADS );
592 { 592 {
593 // render using web browser reported width and height, instead of trying to invert GL scale 593 // render using web browser reported width and height, instead of trying to invert GL scale
594 gGL.texCoord2f( max_u, max_v ); 594 gGL.texCoord2f( max_u, max_v );
@@ -606,7 +606,7 @@ void LLWebBrowserCtrl::draw()
606 gGL.end(); 606 gGL.end();
607 gGL.blendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); 607 gGL.blendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
608 } 608 }
609 glPopMatrix(); 609 gGL.popMatrix();
610 610
611 // highlight if keyboard focus here. (TODO: this needs some work) 611 // highlight if keyboard focus here. (TODO: this needs some work)
612 if ( mBorder->getVisible() ) 612 if ( mBorder->getVisible() )
diff --git a/linden/indra/newview/llworldmapview.cpp b/linden/indra/newview/llworldmapview.cpp
index ccf5903..1cc4921 100644
--- a/linden/indra/newview/llworldmapview.cpp
+++ b/linden/indra/newview/llworldmapview.cpp
@@ -381,7 +381,7 @@ void LLWorldMapView::draw()
381 glColorMask(TRUE, TRUE, TRUE, FALSE); 381 glColorMask(TRUE, TRUE, TRUE, FALSE);
382 gGL.color4f(1.f, 1.f, 1.f, layer_alpha); 382 gGL.color4f(1.f, 1.f, 1.f, layer_alpha);
383 383
384 gGL.begin(GL_QUADS); 384 gGL.begin(LLVertexBuffer::QUADS);
385 gGL.texCoord2f(0.0f, 1.0f); 385 gGL.texCoord2f(0.0f, 1.0f);
386 gGL.vertex3f(left, top, -1.0f); 386 gGL.vertex3f(left, top, -1.0f);
387 gGL.texCoord2f(0.0f, 0.0f); 387 gGL.texCoord2f(0.0f, 0.0f);
@@ -397,7 +397,7 @@ void LLWorldMapView::draw()
397 glColorMask(FALSE, FALSE, FALSE, TRUE); 397 glColorMask(FALSE, FALSE, FALSE, TRUE);
398 gGL.color4f(1.f, 1.f, 1.f, 1.f); 398 gGL.color4f(1.f, 1.f, 1.f, 1.f);
399 399
400 gGL.begin(GL_QUADS); 400 gGL.begin(LLVertexBuffer::QUADS);
401 gGL.texCoord2f(0.0f, 1.0f); 401 gGL.texCoord2f(0.0f, 1.0f);
402 gGL.vertex2f(left, top); 402 gGL.vertex2f(left, top);
403 gGL.texCoord2f(0.0f, 0.0f); 403 gGL.texCoord2f(0.0f, 0.0f);
@@ -538,7 +538,7 @@ void LLWorldMapView::draw()
538 F32 alpha = sim_alpha * info->mAlpha; 538 F32 alpha = sim_alpha * info->mAlpha;
539 gGL.color4f(1.f, 1.0f, 1.0f, alpha); 539 gGL.color4f(1.f, 1.0f, 1.0f, alpha);
540 540
541 gGL.begin(GL_QUADS); 541 gGL.begin(LLVertexBuffer::QUADS);
542 gGL.texCoord2f(0.f, 1.f); 542 gGL.texCoord2f(0.f, 1.f);
543 gGL.vertex3f(left, top, 0.f); 543 gGL.vertex3f(left, top, 0.f);
544 gGL.texCoord2f(0.f, 0.f); 544 gGL.texCoord2f(0.f, 0.f);
@@ -553,7 +553,7 @@ void LLWorldMapView::draw()
553 { 553 {
554 LLViewerImage::bindTexture(overlayimage); 554 LLViewerImage::bindTexture(overlayimage);
555 gGL.color4f(1.f, 1.f, 1.f, alpha); 555 gGL.color4f(1.f, 1.f, 1.f, alpha);
556 gGL.begin(GL_QUADS); 556 gGL.begin(LLVertexBuffer::QUADS);
557 gGL.texCoord2f(0.f, 1.f); 557 gGL.texCoord2f(0.f, 1.f);
558 gGL.vertex3f(left, top, -0.5f); 558 gGL.vertex3f(left, top, -0.5f);
559 gGL.texCoord2f(0.f, 0.f); 559 gGL.texCoord2f(0.f, 0.f);
@@ -574,7 +574,7 @@ void LLWorldMapView::draw()
574 gGL.color4f(1.f, 1.f, 1.f, 1.f); 574 gGL.color4f(1.f, 1.f, 1.f, 1.f);
575 575
576 LLGLSNoTexture gls_no_texture; 576 LLGLSNoTexture gls_no_texture;
577 gGL.begin(GL_QUADS); 577 gGL.begin(LLVertexBuffer::QUADS);
578 gGL.vertex2f(left, top); 578 gGL.vertex2f(left, top);
579 gGL.vertex2f(left, bottom); 579 gGL.vertex2f(left, bottom);
580 gGL.vertex2f(right, bottom); 580 gGL.vertex2f(right, bottom);
@@ -593,7 +593,7 @@ void LLWorldMapView::draw()
593 gGL.color4f(0.2f, 0.0f, 0.0f, 0.4f); 593 gGL.color4f(0.2f, 0.0f, 0.0f, 0.4f);
594 594
595 LLGLSNoTexture gls_no_texture; 595 LLGLSNoTexture gls_no_texture;
596 gGL.begin(GL_QUADS); 596 gGL.begin(LLVertexBuffer::QUADS);
597 gGL.vertex2f(left, top); 597 gGL.vertex2f(left, top);
598 gGL.vertex2f(left, bottom); 598 gGL.vertex2f(left, bottom);
599 gGL.vertex2f(right, bottom); 599 gGL.vertex2f(right, bottom);
@@ -610,7 +610,7 @@ void LLWorldMapView::draw()
610 610
611 LLGLSNoTexture gls_no_texture; 611 LLGLSNoTexture gls_no_texture;
612 gGL.color3f(1.f, 0.f, 0.f); 612 gGL.color3f(1.f, 0.f, 0.f);
613 gGL.begin(GL_LINES); 613 gGL.begin(LLVertexBuffer::LINES);
614 gGL.vertex2f(left, top); 614 gGL.vertex2f(left, top);
615 gGL.vertex2f(right, bottom); 615 gGL.vertex2f(right, bottom);
616 gGL.vertex2f(left, bottom); 616 gGL.vertex2f(left, bottom);
@@ -971,7 +971,7 @@ void LLWorldMapView::drawFrustum()
971 971
972 // Draw triangle with more alpha in far pixels to make it 972 // Draw triangle with more alpha in far pixels to make it
973 // fade out in distance. 973 // fade out in distance.
974 gGL.begin( GL_TRIANGLES ); 974 gGL.begin( LLVertexBuffer::TRIANGLES );
975 gGL.color4f(1.f, 1.f, 1.f, 0.25f); 975 gGL.color4f(1.f, 1.f, 1.f, 0.25f);
976 gGL.vertex2f( 0, 0 ); 976 gGL.vertex2f( 0, 0 );
977 977
@@ -1181,7 +1181,7 @@ static void drawDot(F32 x_pixels, F32 y_pixels,
1181 gGL.color4fv( color.mV ); 1181 gGL.color4fv( color.mV );
1182 LLUI::setLineWidth(1.5f); 1182 LLUI::setLineWidth(1.5f);
1183 F32 h_bar = relative_z > HEIGHT_THRESHOLD ? top : bottom; // horizontal bar Y 1183 F32 h_bar = relative_z > HEIGHT_THRESHOLD ? top : bottom; // horizontal bar Y
1184 gGL.begin( GL_LINES ); 1184 gGL.begin( LLVertexBuffer::LINES );
1185 gGL.vertex2f(center, top); 1185 gGL.vertex2f(center, top);
1186 gGL.vertex2f(left, h_bar); 1186 gGL.vertex2f(left, h_bar);
1187 gGL.vertex2f(right, h_bar); 1187 gGL.vertex2f(right, h_bar);
diff --git a/linden/indra/newview/pipeline.cpp b/linden/indra/newview/pipeline.cpp
index c1ad4b3..5ec3310 100644
--- a/linden/indra/newview/pipeline.cpp
+++ b/linden/indra/newview/pipeline.cpp
@@ -1641,6 +1641,8 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
1641 LLFastTimer ftm(LLFastTimer::FTM_STATESORT); 1641 LLFastTimer ftm(LLFastTimer::FTM_STATESORT);
1642 LLMemType mt(LLMemType::MTYPE_PIPELINE); 1642 LLMemType mt(LLMemType::MTYPE_PIPELINE);
1643 1643
1644 //LLVertexBuffer::unbind();
1645
1644 grabReferences(result); 1646 grabReferences(result);
1645 1647
1646 { 1648 {
@@ -2129,7 +2131,7 @@ void render_hud_elements()
2129 glStencilMask(0xFFFFFFFF); 2131 glStencilMask(0xFFFFFFFF);
2130 glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); 2132 glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
2131 2133
2132 gGL.start(); 2134 gGL.color4f(1,1,1,1);
2133 if (!LLPipeline::sReflectionRender && gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) 2135 if (!LLPipeline::sReflectionRender && gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
2134 { 2136 {
2135 gViewerWindow->renderSelections(FALSE, FALSE, FALSE); // For HUD version in render_ui_3d() 2137 gViewerWindow->renderSelections(FALSE, FALSE, FALSE); // For HUD version in render_ui_3d()
@@ -2156,7 +2158,7 @@ void render_hud_elements()
2156 { 2158 {
2157 LLHUDText::renderAllHUD(); 2159 LLHUDText::renderAllHUD();
2158 } 2160 }
2159 gGL.stop(); 2161 gGL.flush();
2160} 2162}
2161 2163
2162void LLPipeline::renderHighlights() 2164void LLPipeline::renderHighlights()
@@ -2273,7 +2275,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
2273 } 2275 }
2274 } 2276 }
2275 2277
2276 LLVertexBuffer::startRender(); 2278
2277 2279
2278 //by bao 2280 //by bao
2279 //fake vertex buffer updating 2281 //fake vertex buffer updating
@@ -2451,17 +2453,14 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
2451 2453
2452 renderDebug(); 2454 renderDebug();
2453 2455
2454 LLVertexBuffer::stopRender();
2455 LLVertexBuffer::unbind(); 2456 LLVertexBuffer::unbind();
2456 2457
2457 if (!LLPipeline::sReflectionRender && gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) 2458 if (!LLPipeline::sReflectionRender && gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
2458 { 2459 {
2459 gGL.start();
2460 // Render debugging beacons. 2460 // Render debugging beacons.
2461 gObjectList.renderObjectBeacons(); 2461 gObjectList.renderObjectBeacons();
2462 LLHUDObject::renderAll(); 2462 LLHUDObject::renderAll();
2463 gObjectList.resetObjectBeacons(); 2463 gObjectList.resetObjectBeacons();
2464 gGL.stop();
2465 } 2464 }
2466 2465
2467 //HACK: preserve/restore matrices around HUD render 2466 //HACK: preserve/restore matrices around HUD render
@@ -2474,6 +2473,8 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
2474 } 2473 }
2475 } 2474 }
2476 2475
2476 LLVertexBuffer::unbind();
2477
2477#ifndef LL_RELEASE_FOR_DOWNLOAD 2478#ifndef LL_RELEASE_FOR_DOWNLOAD
2478 LLGLState::checkStates(); 2479 LLGLState::checkStates();
2479 LLGLState::checkTextureChannels(); 2480 LLGLState::checkTextureChannels();
@@ -2509,7 +2510,7 @@ void LLPipeline::renderDebug()
2509 2510
2510 assertInitialized(); 2511 assertInitialized();
2511 2512
2512 gGL.start(); 2513 gGL.color4f(1,1,1,1);
2513 2514
2514 gGLLastMatrix = NULL; 2515 gGLLastMatrix = NULL;
2515 glLoadMatrixd(gGLModelView); 2516 glLoadMatrixd(gGLModelView);
@@ -2554,7 +2555,7 @@ void LLPipeline::renderDebug()
2554 2555
2555 if (gAgent.getRegion()) 2556 if (gAgent.getRegion())
2556 { 2557 {
2557 gGL.begin(GL_POINTS); 2558 gGL.begin(LLVertexBuffer::POINTS);
2558 // Draw the composition layer for the region that I'm in. 2559 // Draw the composition layer for the region that I'm in.
2559 for (x = 0; x <= 260; x++) 2560 for (x = 0; x <= 260; x++)
2560 { 2561 {
@@ -2577,7 +2578,7 @@ void LLPipeline::renderDebug()
2577 gGL.end(); 2578 gGL.end();
2578 } 2579 }
2579 } 2580 }
2580 gGL.stop(); 2581 gGL.flush();
2581} 2582}
2582 2583
2583void LLPipeline::renderForSelect(std::set<LLViewerObject*>& objects) 2584void LLPipeline::renderForSelect(std::set<LLViewerObject*>& objects)
@@ -2594,7 +2595,7 @@ void LLPipeline::renderForSelect(std::set<LLViewerObject*>& objects)
2594 2595
2595 LLMemType mt(LLMemType::MTYPE_PIPELINE); 2596 LLMemType mt(LLMemType::MTYPE_PIPELINE);
2596 2597
2597 LLVertexBuffer::startRender(); 2598
2598 2599
2599 glMatrixMode(GL_MODELVIEW); 2600 glMatrixMode(GL_MODELVIEW);
2600 2601
@@ -2603,6 +2604,8 @@ void LLPipeline::renderForSelect(std::set<LLViewerObject*>& objects)
2603 LLGLDepthTest gls_depth(GL_TRUE,GL_TRUE); 2604 LLGLDepthTest gls_depth(GL_TRUE,GL_TRUE);
2604 disableLights(); 2605 disableLights();
2605 2606
2607 LLVertexBuffer::unbind();
2608
2606 //for each drawpool 2609 //for each drawpool
2607#ifndef LL_RELEASE_FOR_DOWNLOAD 2610#ifndef LL_RELEASE_FOR_DOWNLOAD
2608 LLGLState::checkStates(); 2611 LLGLState::checkStates();
@@ -2758,7 +2761,7 @@ void LLPipeline::renderForSelect(std::set<LLViewerObject*>& objects)
2758 glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); 2761 glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
2759 2762
2760 LLVertexBuffer::unbind(); 2763 LLVertexBuffer::unbind();
2761 LLVertexBuffer::stopRender(); 2764 LLVertexBuffer::unbind();
2762 2765
2763 glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); 2766 glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
2764} 2767}
@@ -4494,7 +4497,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot)
4494 glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); 4497 glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
4495 4498
4496 LLFastTimer ftm(LLFastTimer::FTM_RENDER_BLOOM); 4499 LLFastTimer ftm(LLFastTimer::FTM_RENDER_BLOOM);
4497 gGL.start(); 4500 gGL.color4f(1,1,1,1);
4498 LLGLDepthTest depth(GL_FALSE); 4501 LLGLDepthTest depth(GL_FALSE);
4499 LLGLDisable blend(GL_BLEND); 4502 LLGLDisable blend(GL_BLEND);
4500 LLGLDisable cull(GL_CULL_FACE); 4503 LLGLDisable cull(GL_CULL_FACE);
@@ -4524,7 +4527,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot)
4524 LLGLEnable blend(GL_BLEND); 4527 LLGLEnable blend(GL_BLEND);
4525 gGL.blendFunc(GL_ONE, GL_ONE); 4528 gGL.blendFunc(GL_ONE, GL_ONE);
4526 tc2.setVec(1,1); 4529 tc2.setVec(1,1);
4527 gGL.begin(GL_TRIANGLE_STRIP); 4530 gGL.begin(LLVertexBuffer::TRIANGLE_STRIP);
4528 gGL.color4f(1,1,1,1); 4531 gGL.color4f(1,1,1,1);
4529 gGL.texCoord2f(tc1.mV[0], tc1.mV[1]); 4532 gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
4530 gGL.vertex2f(-1,-1); 4533 gGL.vertex2f(-1,-1);
@@ -4543,7 +4546,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot)
4543 gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 4546 gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
4544 } 4547 }
4545 4548
4546 gGL.stop(); 4549 gGL.flush();
4547 glMatrixMode(GL_PROJECTION); 4550 glMatrixMode(GL_PROJECTION);
4548 glPopMatrix(); 4551 glPopMatrix();
4549 glMatrixMode(GL_MODELVIEW); 4552 glMatrixMode(GL_MODELVIEW);
@@ -4582,7 +4585,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot)
4582 4585
4583 gGL.color4f(1,1,1,1); 4586 gGL.color4f(1,1,1,1);
4584 gPipeline.enableLightsFullbright(LLColor4(1,1,1,1)); 4587 gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
4585 gGL.begin(GL_TRIANGLE_STRIP); 4588 gGL.begin(LLVertexBuffer::TRIANGLE_STRIP);
4586 gGL.texCoord2f(tc1.mV[0], tc1.mV[1]); 4589 gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
4587 gGL.vertex2f(-1,-1); 4590 gGL.vertex2f(-1,-1);
4588 4591
@@ -4652,7 +4655,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot)
4652 gGlowProgram.uniform2f("glowDelta", 0, delta); 4655 gGlowProgram.uniform2f("glowDelta", 0, delta);
4653 } 4656 }
4654 4657
4655 gGL.begin(GL_TRIANGLE_STRIP); 4658 gGL.begin(LLVertexBuffer::TRIANGLE_STRIP);
4656 gGL.texCoord2f(tc1.mV[0], tc1.mV[1]); 4659 gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
4657 gGL.vertex2f(-1,-1); 4660 gGL.vertex2f(-1,-1);
4658 4661
@@ -4686,7 +4689,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot)
4686 glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); 4689 glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
4687 LLGLDisable blend(GL_BLEND); 4690 LLGLDisable blend(GL_BLEND);
4688 4691
4689 gGL.begin(GL_TRIANGLE_STRIP); 4692 gGL.begin(LLVertexBuffer::TRIANGLE_STRIP);
4690 gGL.color4f(1,1,1,1); 4693 gGL.color4f(1,1,1,1);
4691 gGL.texCoord2f(tc1.mV[0], tc1.mV[1]); 4694 gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
4692 gGL.vertex2f(-1,-1); 4695 gGL.vertex2f(-1,-1);
@@ -4721,7 +4724,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot)
4721 glEnable(GL_TEXTURE_RECTANGLE_ARB); 4724 glEnable(GL_TEXTURE_RECTANGLE_ARB);
4722 mScreen.bindTexture(); 4725 mScreen.bindTexture();
4723 4726
4724 gGL.begin(GL_TRIANGLE_STRIP); 4727 gGL.begin(LLVertexBuffer::TRIANGLE_STRIP);
4725 gGL.color4f(1,1,1,1); 4728 gGL.color4f(1,1,1,1);
4726 gGL.texCoord2f(tc1.mV[0], tc1.mV[1]); 4729 gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
4727 gGL.vertex2f(-1,-1); 4730 gGL.vertex2f(-1,-1);
@@ -4743,7 +4746,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot)
4743 4746
4744 gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 4747 gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
4745 }*/ 4748 }*/
4746 gGL.stop(); 4749 gGL.flush();
4747 4750
4748 { 4751 {
4749 LLVertexBuffer::unbind(); 4752 LLVertexBuffer::unbind();
@@ -5259,15 +5262,15 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
5259 5262
5260 LLGLDepthTest depth(GL_FALSE, GL_FALSE); 5263 LLGLDepthTest depth(GL_FALSE, GL_FALSE);
5261 5264
5262 gGL.start(); 5265 gGL.color4f(1,1,1,1);
5263 gGL.color4ub(64,64,64,1); 5266 gGL.color4ub(64,64,64,1);
5264 gGL.begin(GL_QUADS); 5267 gGL.begin(LLVertexBuffer::QUADS);
5265 gGL.vertex3fv((pos+left-up).mV); 5268 gGL.vertex3fv((pos+left-up).mV);
5266 gGL.vertex3fv((pos-left-up).mV); 5269 gGL.vertex3fv((pos-left-up).mV);
5267 gGL.vertex3fv((pos-left+up).mV); 5270 gGL.vertex3fv((pos-left+up).mV);
5268 gGL.vertex3fv((pos+left+up).mV); 5271 gGL.vertex3fv((pos+left+up).mV);
5269 gGL.end(); 5272 gGL.end();
5270 gGL.stop(); 5273 gGL.flush();
5271 5274
5272 5275
5273 gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 5276 gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
diff --git a/linden/indra/newview/skins/xui/de/floater_gesture.xml b/linden/indra/newview/skins/xui/de/floater_gesture.xml
index b815b7a..bdee3b8 100644
--- a/linden/indra/newview/skins/xui/de/floater_gesture.xml
+++ b/linden/indra/newview/skins/xui/de/floater_gesture.xml
@@ -1,7 +1,7 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?> 1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="gestures" title="Aktive Gesten"> 2<floater name="gestures" title="Aktive Gesten">
3 <text name="help_label"> 3 <text name="help_label">
4 Doppelklicken Sie auf eine Geste, um Animationen und Sound abzuspielen. 4 Doppelklicken Sie auf eine Geste, um Animationen und Sound &#10;abzuspielen.
5 </text> 5 </text>
6 <scroll_list bottom_delta="-385" height="360" name="gesture_list"> 6 <scroll_list bottom_delta="-385" height="360" name="gesture_list">
7 <column label="Trigger" name="trigger" /> 7 <column label="Trigger" name="trigger" />
diff --git a/linden/indra/newview/skins/xui/de/floater_joystick.xml b/linden/indra/newview/skins/xui/de/floater_joystick.xml
index cabd7bd..837ac7d 100644
--- a/linden/indra/newview/skins/xui/de/floater_joystick.xml
+++ b/linden/indra/newview/skins/xui/de/floater_joystick.xml
@@ -10,11 +10,14 @@
10 <spinner label="Rollwinkel" name="JoystickAxis3" /> 10 <spinner label="Rollwinkel" name="JoystickAxis3" />
11 <spinner label="Zoom" name="JoystickAxis6" /> 11 <spinner label="Zoom" name="JoystickAxis6" />
12 <check_box label="Direkt-Zoom" name="ZoomDirect" /> 12 <check_box label="Direkt-Zoom" name="ZoomDirect" />
13 <check_box label="3D-Cursor" name="Cursor3D" /> 13 <check_box label="3D-Cursor" left="300" name="Cursor3D" />
14 <check_box label="Automatisch ausrichten" name="AutoLeveling" /> 14 <check_box label="Automatisch ausrichten" left="390" name="AutoLeveling" />
15 <text name="Control Modes:"> 15 <text name="Control Modes:">
16 Steuermodi: 16 Steuermodi:
17 </text> 17 </text>
18 <check_box name="JoystickAvatarEnabled">Avatar</check_box>
19 <check_box name="JoystickBuildEnabled">Bauen</check_box>
20 <check_box name="JoystickFlycamEnabled">Flycam</check_box>
18 <text name="XScale"> 21 <text name="XScale">
19 X-Skala 22 X-Skala
20 </text> 23 </text>
diff --git a/linden/indra/newview/skins/xui/de/panel_preferences_graphics1.xml b/linden/indra/newview/skins/xui/de/panel_preferences_graphics1.xml
index 802eb0f..ff48982 100644
--- a/linden/indra/newview/skins/xui/de/panel_preferences_graphics1.xml
+++ b/linden/indra/newview/skins/xui/de/panel_preferences_graphics1.xml
@@ -17,13 +17,14 @@
17 <text_editor name="FullScreenInfo" width="480"> 17 <text_editor name="FullScreenInfo" width="480">
18 Wenn deaktiviert, schaltet die Anzeige bei Anmeldung auf Vollbild um. 18 Wenn deaktiviert, schaltet die Anzeige bei Anmeldung auf Vollbild um.
19 </text_editor> 19 </text_editor>
20 <text name="DisplayResLabel"> 20 <text name="DisplayResLabel" width="100">
21 Anzeigeauflösung: 21 Anzeigeauflösung:
22 </text> 22 </text>
23 <text name="AspectRatioLabel1" tool_tip="Breite/Höhe"> 23 <combo_box name="fullscreen combo" left="115" />
24 <text name="AspectRatioLabel1" tool_tip="Breite/Höhe" width="100">
24 Aspektverhältnis: 25 Aspektverhältnis:
25 </text> 26 </text>
26 <combo_box name="aspect_ratio" tool_tip="Breite/Höhe"> 27 <combo_box name="aspect_ratio" tool_tip="Breite/Höhe" left="115">
27 <combo_item type="string" length="1" name="4:3(StandardCRT)"> 28 <combo_item type="string" length="1" name="4:3(StandardCRT)">
28 4:3 (Standard-CRT) 29 4:3 (Standard-CRT)
29 </combo_item> 30 </combo_item>
@@ -37,7 +38,7 @@
37 16:9 (Widescreen) 38 16:9 (Widescreen)
38 </combo_item> 39 </combo_item>
39 </combo_box> 40 </combo_box>
40 <check_box label="Aspektverhältnis automatisch erkennen" name="aspect_auto_detect" /> 41 <check_box label="Verhältnis automatisch erkennen" name="aspect_auto_detect" left="275" />
41 <text type="string" length="1" name="UI Size:"> 42 <text type="string" length="1" name="UI Size:">
42 UI-Größe: 43 UI-Größe:
43 </text> 44 </text>
diff --git a/linden/indra/newview/skins/xui/en-us/floater_tools.xml b/linden/indra/newview/skins/xui/en-us/floater_tools.xml
index 5531090..c45ab77 100644
--- a/linden/indra/newview/skins/xui/en-us/floater_tools.xml
+++ b/linden/indra/newview/skins/xui/en-us/floater_tools.xml
@@ -156,72 +156,72 @@
156 left_delta="23" mouse_opaque="true" name="ToolTetrahedron" 156 left_delta="23" mouse_opaque="true" name="ToolTetrahedron"
157 scale_image="TRUE" tool_tip="Tetrahedron" width="30" /> 157 scale_image="TRUE" tool_tip="Tetrahedron" width="30" />
158 <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center" 158 <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center"
159 height="24" image_disabled="object_cylinder.tga" 159 height="30" image_disabled="object_cylinder.tga"
160 image_disabled_selected="object_cylinder_active.tga" 160 image_disabled_selected="object_cylinder_active.tga"
161 image_selected="object_cylinder_active.tga" 161 image_selected="object_cylinder_active.tga"
162 image_unselected="object_cylinder.tga" label="" label_selected="" 162 image_unselected="object_cylinder.tga" label="" label_selected=""
163 left_delta="23" mouse_opaque="true" tool_tip="Cylinder" name="ToolCylinder" scale_image="TRUE" 163 left_delta="23" mouse_opaque="true" tool_tip="Cylinder" name="ToolCylinder" scale_image="TRUE"
164 width="30" /> 164 width="30" />
165 <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center" 165 <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center"
166 height="24" image_disabled="object_hemi_cylinder.tga" 166 height="30" image_disabled="object_hemi_cylinder.tga"
167 image_disabled_selected="object_hemi_cylinder_active.tga" 167 image_disabled_selected="object_hemi_cylinder_active.tga"
168 image_selected="object_hemi_cylinder_active.tga" 168 image_selected="object_hemi_cylinder_active.tga"
169 image_unselected="object_hemi_cylinder.tga" label="" label_selected="" 169 image_unselected="object_hemi_cylinder.tga" label="" label_selected=""
170 left_delta="23" mouse_opaque="true" name="ToolHemiCylinder" 170 left_delta="23" mouse_opaque="true" name="ToolHemiCylinder"
171 scale_image="TRUE" tool_tip="Hemicylinder" width="30" /> 171 scale_image="TRUE" tool_tip="Hemicylinder" width="30" />
172 <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center" 172 <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center"
173 height="24" image_disabled="object_cone.tga" 173 height="30" image_disabled="object_cone.tga"
174 image_disabled_selected="object_cone_active.tga" 174 image_disabled_selected="object_cone_active.tga"
175 image_selected="object_cone_active.tga" image_unselected="object_cone.tga" 175 image_selected="object_cone_active.tga" image_unselected="object_cone.tga"
176 label="" label_selected="" left_delta="23" mouse_opaque="true" 176 label="" label_selected="" left_delta="23" mouse_opaque="true"
177 name="ToolCone" scale_image="TRUE" tool_tip="Cone" width="30" /> 177 name="ToolCone" scale_image="TRUE" tool_tip="Cone" width="30" />
178 <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center" 178 <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center"
179 height="24" image_disabled="object_hemi_cone.tga" 179 height="30" image_disabled="object_hemi_cone.tga"
180 image_disabled_selected="object_hemi_cone_active.tga" 180 image_disabled_selected="object_hemi_cone_active.tga"
181 image_selected="object_hemi_cone_active.tga" 181 image_selected="object_hemi_cone_active.tga"
182 image_unselected="object_hemi_cone.tga" label="" label_selected="" 182 image_unselected="object_hemi_cone.tga" label="" label_selected=""
183 left_delta="23" mouse_opaque="true" name="ToolHemiCone" scale_image="TRUE" 183 left_delta="23" mouse_opaque="true" name="ToolHemiCone" scale_image="TRUE"
184 tool_tip="Hemicone" width="30" /> 184 tool_tip="Hemicone" width="30" />
185 <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center" 185 <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center"
186 height="24" image_disabled="object_sphere.tga" 186 height="30" image_disabled="object_sphere.tga"
187 image_disabled_selected="object_sphere_active.tga" 187 image_disabled_selected="object_sphere_active.tga"
188 image_selected="object_sphere_active.tga" 188 image_selected="object_sphere_active.tga"
189 image_unselected="object_sphere.tga" label="" label_selected="" 189 image_unselected="object_sphere.tga" label="" label_selected=""
190 left_delta="23" mouse_opaque="true" name="ToolSphere" scale_image="TRUE" 190 left_delta="23" mouse_opaque="true" name="ToolSphere" scale_image="TRUE"
191 width="30" tool_tip="Sphere" /> 191 width="30" tool_tip="Sphere" />
192 <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center" 192 <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center"
193 height="24" image_disabled="object_hemi_sphere.tga" 193 height="30" image_disabled="object_hemi_sphere.tga"
194 image_disabled_selected="object_hemi_sphere_active.tga" 194 image_disabled_selected="object_hemi_sphere_active.tga"
195 image_selected="object_hemi_sphere_active.tga" 195 image_selected="object_hemi_sphere_active.tga"
196 image_unselected="object_hemi_sphere.tga" label="" label_selected="" 196 image_unselected="object_hemi_sphere.tga" label="" label_selected=""
197 left_delta="23" mouse_opaque="true" name="ToolHemiSphere" 197 left_delta="23" mouse_opaque="true" name="ToolHemiSphere"
198 scale_image="TRUE" tool_tip="Hemisphere" width="30" /> 198 scale_image="TRUE" tool_tip="Hemisphere" width="30" />
199 <button bottom_delta="-23" follows="left|top" font="SansSerif" halign="center" 199 <button bottom_delta="-23" follows="left|top" font="SansSerif" halign="center"
200 height="24" image_disabled="object_torus.tga" 200 height="30" image_disabled="object_torus.tga"
201 image_disabled_selected="object_torus_active.tga" 201 image_disabled_selected="object_torus_active.tga"
202 image_selected="object_torus_active.tga" 202 image_selected="object_torus_active.tga"
203 image_unselected="object_torus.tga" label="" label_selected="" left="4" 203 image_unselected="object_torus.tga" label="" label_selected="" left="4"
204 mouse_opaque="true" name="ToolTorus" scale_image="TRUE" tool_tip="Torus" width="30" /> 204 mouse_opaque="true" name="ToolTorus" scale_image="TRUE" tool_tip="Torus" width="30" />
205 <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center" 205 <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center"
206 height="24" image_disabled="object_tube.tga" 206 height="30" image_disabled="object_tube.tga"
207 image_disabled_selected="object_tube_active.tga" 207 image_disabled_selected="object_tube_active.tga"
208 image_selected="object_tube_active.tga" image_unselected="object_tube.tga" 208 image_selected="object_tube_active.tga" image_unselected="object_tube.tga"
209 label="" label_selected="" left_delta="23" mouse_opaque="true" 209 label="" label_selected="" left_delta="23" mouse_opaque="true"
210 name="ToolTube" scale_image="TRUE" tool_tip="Tube" width="30" /> 210 name="ToolTube" scale_image="TRUE" tool_tip="Tube" width="30" />
211 <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center" 211 <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center"
212 height="24" image_disabled="object_ring.tga" 212 height="30" image_disabled="object_ring.tga"
213 image_disabled_selected="object_ring_active.tga" 213 image_disabled_selected="object_ring_active.tga"
214 image_selected="object_ring_active.tga" image_unselected="object_ring.tga" 214 image_selected="object_ring_active.tga" image_unselected="object_ring.tga"
215 label="" label_selected="" left_delta="23" mouse_opaque="true" 215 label="" label_selected="" left_delta="23" mouse_opaque="true"
216 name="ToolRing" scale_image="TRUE" tool_tip="Ring" width="30" /> 216 name="ToolRing" scale_image="TRUE" tool_tip="Ring" width="30" />
217 <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center" 217 <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center"
218 height="24" image_disabled="object_tree.tga" 218 height="30" image_disabled="object_tree.tga"
219 image_disabled_selected="object_tree_active.tga" 219 image_disabled_selected="object_tree_active.tga"
220 image_selected="object_tree_active.tga" image_unselected="object_tree.tga" 220 image_selected="object_tree_active.tga" image_unselected="object_tree.tga"
221 label="" label_selected="" left_delta="23" mouse_opaque="true" 221 label="" label_selected="" left_delta="23" mouse_opaque="true"
222 name="ToolTree" scale_image="TRUE" tool_tip="Tree" width="30" /> 222 name="ToolTree" scale_image="TRUE" tool_tip="Tree" width="30" />
223 <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center" 223 <button bottom_delta="0" follows="left|top" font="SansSerif" halign="center"
224 height="24" image_disabled="object_grass.tga" 224 height="30" image_disabled="object_grass.tga"
225 image_disabled_selected="object_grass_active.tga" 225 image_disabled_selected="object_grass_active.tga"
226 image_selected="object_grass_active.tga" 226 image_selected="object_grass_active.tga"
227 image_unselected="object_grass.tga" label="" label_selected="" 227 image_unselected="object_grass.tga" label="" label_selected=""
diff --git a/linden/indra/newview/skins/xui/ja/floater_gesture.xml b/linden/indra/newview/skins/xui/ja/floater_gesture.xml
index 43757ee..66be1f7 100644
--- a/linden/indra/newview/skins/xui/ja/floater_gesture.xml
+++ b/linden/indra/newview/skins/xui/ja/floater_gesture.xml
@@ -1,9 +1,9 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?> 1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="gestures" title="アクティブ・ジェスチャー"> 2<floater name="gestures" title="アクティブ・ジェスチャー">
3 <text name="help_label"> 3 <text name="help_label">
4 ジェスチャーをダブルクリックして、アニメーションとサウンドを再生。 4 ジェスチャーをダブルクリックして、&#10;アニメーションとサウンドを再生。
5 </text> 5 </text>
6 <scroll_list name="gesture_list"> 6 <scroll_list bottom_delta="-385" height="360" name="gesture_list">
7 <column label="トリガ" name="trigger" /> 7 <column label="トリガ" name="trigger" />
8 <column label="キー" name="shortcut" /> 8 <column label="キー" name="shortcut" />
9 <column label="" name="key" /> 9 <column label="" name="key" />
diff --git a/linden/indra/newview/skins/xui/ja/floater_joystick.xml b/linden/indra/newview/skins/xui/ja/floater_joystick.xml
index ae4108e..517b9dd 100644
--- a/linden/indra/newview/skins/xui/ja/floater_joystick.xml
+++ b/linden/indra/newview/skins/xui/ja/floater_joystick.xml
@@ -13,6 +13,9 @@
13 <text name="Control Modes:"> 13 <text name="Control Modes:">
14 制御モード: 14 制御モード:
15 </text> 15 </text>
16 <check_box name="JoystickAvatarEnabled">アバター</check_box>
17 <check_box name="JoystickBuildEnabled">造る</check_box>
18 <check_box name="JoystickFlycamEnabled">フライ・カメラ</check_box>
16 <text name="XScale"> 19 <text name="XScale">
17 Xスケール 20 Xスケール
18 </text> 21 </text>
diff --git a/linden/indra/newview/skins/xui/ja/panel_group_invite.xml b/linden/indra/newview/skins/xui/ja/panel_group_invite.xml
index 3c334c0..f004d14 100644
--- a/linden/indra/newview/skins/xui/ja/panel_group_invite.xml
+++ b/linden/indra/newview/skins/xui/ja/panel_group_invite.xml
@@ -1,15 +1,13 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?> 1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<panel label="メンバーを招待" name="invite_panel"> 2<panel label="メンバーを招待" name="invite_panel">
3 <text> 3 <text name="help_text" font="SansSerifSmall" height="72" bottom_delta="-96">
4 複数の住人を選択して、グループに 4 あなたのグループに、一度に複数の
5招待できます。 [リストから 5人を招待することができます。
6人を選ぶ]をクリックしてください。 6[リストから人を選ぶ]
7 </text> 7をクリックしてください。
8 <text name="help_text">
9 あなたのグループに、一度に複数の人を招待することができます。[リストから人を選ぶ]をクリックしてください。
10 </text> 8 </text>
11 <button label="リストから人を選ぶ" name="add_button" tool_tip="" /> 9 <button label="リストから人を選ぶ" name="add_button" tool_tip="" bottom_delta="-10" />
12 <name_list name="invitee_list" 10 <name_list name="invitee_list" height="156" bottom_delta="-160"
13 tool_tip="複数の住人を選択するには、Ctrlキーを押しながら住人名をクリックします。" /> 11 tool_tip="複数の住人を選択するには、Ctrlキーを押しながら住人名をクリックします。" />
14 <button label="リストから選択したものを削除" name="remove_button" 12 <button label="リストから選択したものを削除" name="remove_button"
15 tool_tip="上で選択した居住者を招待リストから削除します。" /> 13 tool_tip="上で選択した居住者を招待リストから削除します。" />
diff --git a/linden/indra/newview/skins/xui/ja/panel_place.xml b/linden/indra/newview/skins/xui/ja/panel_place.xml
index 6a48eb8..7339a05 100644
--- a/linden/indra/newview/skins/xui/ja/panel_place.xml
+++ b/linden/indra/newview/skins/xui/ja/panel_place.xml
@@ -7,19 +7,21 @@
7 説明: 7 説明:
8 </text> 8 </text>
9 <text name="information_label"> 9 <text name="information_label">
10 情報: 10 情報
11 </text> 11 </text>
12 <text left="110" name="info_editor" width="327" />
12 <text name="location_label"> 13 <text name="location_label">
13 ロケーション: 14 ロケーション:
14 </text> 15 </text>
16 <text left="110" name="location_editor" width="327" />
15 <button label="テレポート" name="teleport_btn" /> 17 <button label="テレポート" name="teleport_btn" />
16 <button label="地図上に表示" name="map_btn" /> 18 <button label="地図上に表示" name="map_btn" />
17 <button label="賭ける..." name="auction_btn" /> 19 <button label="賭ける..." name="auction_btn" />
18 <text name="traffic_text"> 20 <text name="traffic_text">
19 交通量: [TRAFFIC] 21 交通量:[TRAFFIC]
20 </text> 22 </text>
21 <text name="area_text"> 23 <text name="area_text">
22 面積:AREA平方メートル 24 面積:[AREA]平方メートル
23 </text> 25 </text>
24 <text name="forsale_text"> 26 <text name="forsale_text">
25 L$[PRICE]で売り出し中。 27 L$[PRICE]で売り出し中。
diff --git a/linden/indra/newview/skins/xui/ja/panel_place_small.xml b/linden/indra/newview/skins/xui/ja/panel_place_small.xml
index 3457199..32e3520 100644
--- a/linden/indra/newview/skins/xui/ja/panel_place_small.xml
+++ b/linden/indra/newview/skins/xui/ja/panel_place_small.xml
@@ -7,11 +7,13 @@
7 説明: 7 説明:
8 </text> 8 </text>
9 <text name="information_label"> 9 <text name="information_label">
10 情報: 10 情報
11 </text> 11 </text>
12 <text left="55" name="info_editor" width="367" font="SansSerifSmall" />
12 <text name="location_label"> 13 <text name="location_label">
13 ロケーション: 14 ロケーション:
14 </text> 15 </text>
16 <text left="110" name="location_editor" width="327" />
15 <button label="テレポート" name="teleport_btn" /> 17 <button label="テレポート" name="teleport_btn" />
16 <button label="地図上に表示" name="map_btn" /> 18 <button label="地図上に表示" name="map_btn" />
17 <button label="賭ける..." name="auction_btn" /> 19 <button label="賭ける..." name="auction_btn" />
@@ -19,13 +21,13 @@
19 交通量:[TRAFFIC] 21 交通量:[TRAFFIC]
20 </string> 22 </string>
21 <string name="area_text"> 23 <string name="area_text">
22 面積:AREA平方メートル 24 面積:[AREA]平方メートル
23 </string> 25 </string>
24 <string name="forsale_text"> 26 <string name="forsale_text">
25 L$[PRICE]で売出し中 27 L$[PRICE]で売出し中
26 </string> 28 </string>
27 <string name="auction_text"> 29 <string name="auction_text">
28 オークションID [ID] 30 オークションID [ID]
29 </string> 31 </string>
30 <text name="server_update_text"> 32 <text name="server_update_text">
31 土地情報のご利用には、サーバーのアップデートが必要です。 33 土地情報のご利用には、サーバーのアップデートが必要です。
diff --git a/linden/indra/newview/skins/xui/ko/floater_joystick.xml b/linden/indra/newview/skins/xui/ko/floater_joystick.xml
index 3907aab..e965738 100644
--- a/linden/indra/newview/skins/xui/ko/floater_joystick.xml
+++ b/linden/indra/newview/skins/xui/ko/floater_joystick.xml
@@ -13,6 +13,9 @@
13 <text name="Control Modes:"> 13 <text name="Control Modes:">
14 조절 모드: 14 조절 모드:
15 </text> 15 </text>
16 <check_box name="JoystickAvatarEnabled">아바타</check_box>
17 <check_box name="JoystickBuildEnabled">만들기</check_box>
18 <check_box name="JoystickFlycamEnabled">플라이캠</check_box>
16 <text name="XScale"> 19 <text name="XScale">
17 X 크기 20 X 크기
18 </text> 21 </text>