diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 7f7c4413af..a44b102efc 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -271,14 +271,9 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons const LLFontGlyphInfo* next_glyph = NULL; static constexpr S32 GLYPH_BATCH_SIZE = 30; - // Remove QUADS rendering mode - //static thread_local LLVector3 vertices[GLYPH_BATCH_SIZE * 4]; - //static thread_local LLVector2 uvs[GLYPH_BATCH_SIZE * 4]; - //static thread_local LLColor4U colors[GLYPH_BATCH_SIZE * 4]; static thread_local LLVector3 vertices[GLYPH_BATCH_SIZE * 6]; static thread_local LLVector2 uvs[GLYPH_BATCH_SIZE * 6]; static thread_local LLColor4U colors[GLYPH_BATCH_SIZE * 6]; - // LLColor4U text_color(color); // Preserve the transparency to render fading emojis in fading text (e.g. @@ -310,12 +305,6 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons // otherwise the queued glyphs will be taken from wrong textures. if (glyph_count > 0) { - // Remove QUADS rendering mode - //gGL.begin(LLRender::QUADS); - //{ - // gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 4); - //} - //gGL.end(); gGL.begin(LLRender::TRIANGLES); { gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 6); @@ -350,18 +339,11 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons if (glyph_count >= GLYPH_BATCH_SIZE) { - // Remove QUADS rendering mode - //gGL.begin(LLRender::QUADS); - //{ - // gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 4); - //} - //gGL.end(); gGL.begin(LLRender::TRIANGLES); { gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 6); } gGL.end(); - // glyph_count = 0; } @@ -395,18 +377,11 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons cur_render_y = cur_y; } - // Remove QUADS rendering mode - //gGL.begin(LLRender::QUADS); - //{ - // gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 4); - //} - //gGL.end(); gGL.begin(LLRender::TRIANGLES); { gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 6); } gGL.end(); - // if (right_x) @@ -1359,30 +1334,6 @@ LLFontGL &LLFontGL::operator=(const LLFontGL &source) return *this; } -// Remove QUADS rendering mode -//void LLFontGL::renderQuad(LLVector3* vertex_out, LLVector2* uv_out, LLColor4U* colors_out, const LLRectf& screen_rect, const LLRectf& uv_rect, const LLColor4U& color, F32 slant_amt) const -//{ -// S32 index = 0; -// -// vertex_out[index] = LLVector3(screen_rect.mRight, screen_rect.mTop, 0.f); -// uv_out[index] = LLVector2(uv_rect.mRight, uv_rect.mTop); -// colors_out[index] = color; -// index++; -// -// vertex_out[index] = LLVector3(screen_rect.mLeft, screen_rect.mTop, 0.f); -// uv_out[index] = LLVector2(uv_rect.mLeft, uv_rect.mTop); -// colors_out[index] = color; -// index++; -// -// vertex_out[index] = LLVector3(screen_rect.mLeft, screen_rect.mBottom, 0.f); -// uv_out[index] = LLVector2(uv_rect.mLeft, uv_rect.mBottom); -// colors_out[index] = color; -// index++; -// -// vertex_out[index] = LLVector3(screen_rect.mRight, screen_rect.mBottom, 0.f); -// uv_out[index] = LLVector2(uv_rect.mRight, uv_rect.mBottom); -// colors_out[index] = color; -//} void LLFontGL::renderTriangle(LLVector3* vertex_out, LLVector2* uv_out, LLColor4U* colors_out, const LLRectf& screen_rect, const LLRectf& uv_rect, const LLColor4U& color, F32 slant_amt) const { S32 index = 0; @@ -1417,7 +1368,6 @@ void LLFontGL::renderTriangle(LLVector3* vertex_out, LLVector2* uv_out, LLColor4 uv_out[index] = LLVector2(uv_rect.mRight, uv_rect.mBottom); colors_out[index] = color; } -// void LLFontGL::drawGlyph(S32& glyph_count, LLVector3* vertex_out, LLVector2* uv_out, LLColor4U* colors_out, const LLRectf& screen_rect, const LLRectf& uv_rect, const LLColor4U& color, U8 style, ShadowType shadow, F32 drop_shadow_strength) const { @@ -1433,10 +1383,7 @@ void LLFontGL::drawGlyph(S32& glyph_count, LLVector3* vertex_out, LLVector2* uv_ LLRectf screen_rect_offset = screen_rect; screen_rect_offset.translate((F32)(pass * BOLD_OFFSET), 0.f); - // Remove QUADS rendering mode - //renderQuad(&vertex_out[glyph_count * 4], &uv_out[glyph_count * 4], &colors_out[glyph_count * 4], screen_rect_offset, uv_rect, color, slant_offset); renderTriangle(&vertex_out[glyph_count * 6], &uv_out[glyph_count * 6], &colors_out[glyph_count * 6], screen_rect_offset, uv_rect, color, slant_offset); - // glyph_count++; } } @@ -1467,16 +1414,10 @@ void LLFontGL::drawGlyph(S32& glyph_count, LLVector3* vertex_out, LLVector2* uv_ break; } - // Remove QUADS rendering mode - //renderQuad(&vertex_out[glyph_count * 4], &uv_out[glyph_count * 4], &colors_out[glyph_count * 4], screen_rect_offset, uv_rect, shadow_color, slant_offset); renderTriangle(&vertex_out[glyph_count * 6], &uv_out[glyph_count * 6], &colors_out[glyph_count * 6], screen_rect_offset, uv_rect, shadow_color, slant_offset); - // glyph_count++; } - // Remove QUADS rendering mode - //renderQuad(&vertex_out[glyph_count * 4], &uv_out[glyph_count * 4], &colors_out[glyph_count * 4], screen_rect, uv_rect, color, slant_offset); renderTriangle(&vertex_out[glyph_count * 6], &uv_out[glyph_count * 6], &colors_out[glyph_count * 6], screen_rect, uv_rect, color, slant_offset); - // glyph_count++; } else if (shadow == DROP_SHADOW) @@ -1485,22 +1426,14 @@ void LLFontGL::drawGlyph(S32& glyph_count, LLVector3* vertex_out, LLVector2* uv_ shadow_color.mV[VALPHA] = U8(color.mV[VALPHA] * drop_shadow_strength); LLRectf screen_rect_shadow = screen_rect; screen_rect_shadow.translate(1.f, -1.f); - // Remove QUADS rendering mode - //renderQuad(&vertex_out[glyph_count * 4], &uv_out[glyph_count * 4], &colors_out[glyph_count * 4], screen_rect_shadow, uv_rect, shadow_color, slant_offset); - //glyph_count++; - //renderQuad(&vertex_out[glyph_count * 4], &uv_out[glyph_count * 4], &colors_out[glyph_count * 4], screen_rect, uv_rect, color, slant_offset); renderTriangle(&vertex_out[glyph_count * 6], &uv_out[glyph_count * 6], &colors_out[glyph_count * 6], screen_rect_shadow, uv_rect, shadow_color, slant_offset); glyph_count++; renderTriangle(&vertex_out[glyph_count * 6], &uv_out[glyph_count * 6], &colors_out[glyph_count * 6], screen_rect, uv_rect, color, slant_offset); - // glyph_count++; } else // normal rendering { - // Remove QUADS rendering mode - //renderQuad(&vertex_out[glyph_count * 4], &uv_out[glyph_count * 4], &colors_out[glyph_count * 4], screen_rect, uv_rect, color, slant_offset); renderTriangle(&vertex_out[glyph_count * 6], &uv_out[glyph_count * 6], &colors_out[glyph_count * 6], screen_rect, uv_rect, color, slant_offset); - // glyph_count++; } } diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h index 69363cfa94..3bd6a223f0 100644 --- a/indra/llrender/llfontgl.h +++ b/indra/llrender/llfontgl.h @@ -249,10 +249,7 @@ private: LLFontDescriptor mFontDescriptor; LLPointer mFontFreetype; - // Remove QUADS rendering mode - //void renderQuad(LLVector3* vertex_out, LLVector2* uv_out, LLColor4U* colors_out, const LLRectf& screen_rect, const LLRectf& uv_rect, const LLColor4U& color, F32 slant_amt) const; void renderTriangle(LLVector3* vertex_out, LLVector2* uv_out, LLColor4U* colors_out, const LLRectf& screen_rect, const LLRectf& uv_rect, const LLColor4U& color, F32 slant_amt) const; - // void drawGlyph(S32& glyph_count, LLVector3* vertex_out, LLVector2* uv_out, LLColor4U* colors_out, const LLRectf& screen_rect, const LLRectf& uv_rect, const LLColor4U& color, U8 style, ShadowType shadow, F32 drop_shadow_fade) const; // Registry holds all instantiated fonts. diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 8f614e3548..21645859f8 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -803,7 +803,6 @@ void LLLightState::setSpotDirection(const LLVector3& direction) LLRender::LLRender() : mDirty(false), mCount(0), - //mQuadCycle(0), // Remove QUADS rendering mode mMode(LLRender::TRIANGLES), mCurrTextureUnitIndex(0), mLineWidth(1.f), // Line width OGL core profile fix by Rye Mutt @@ -1573,15 +1572,7 @@ void LLRender::begin(const GLuint& mode) { if (mode != mMode) { - // Remove QUADS rendering mode - //if (mode == LLRender::QUADS) - //{ - // mQuadCycle = 1; - //} - // - - if (//mMode == LLRender::QUADS || // Remove QUADS rendering mode - mMode == LLRender::LINES || + if (mMode == LLRender::LINES || mMode == LLRender::TRIANGLES || mMode == LLRender::POINTS) { @@ -1604,8 +1595,7 @@ void LLRender::end() //IMM_ERRS << "GL begin and end called with no vertices specified." << LL_ENDL; } - if ((//mMode != LLRender::QUADS && // Remove QUADS rendering mode - mMode != LLRender::LINES && + if ((mMode != LLRender::LINES && mMode != LLRender::TRIANGLES && mMode != LLRender::POINTS) || mCount > 2048) @@ -1630,30 +1620,19 @@ void LLRender::flush() //store mCount in a local variable to avoid re-entrance (drawArrays may call flush) U32 count = mCount; - // Remove QUADS rendering mode - //if (mMode == LLRender::QUADS && !sGLCoreProfile) - //{ - // if (mCount%4 != 0) - // { - // count -= (mCount % 4); - // LL_WARNS() << "Incomplete quad requested." << LL_ENDL; - // } - //} - // - - if (mMode == LLRender::TRIANGLES) + if (mMode == LLRender::TRIANGLES) + { + if (mCount%3 != 0) { - if (mCount%3 != 0) - { - count -= (mCount % 3); - LL_WARNS() << "Incomplete triangle requested." << LL_ENDL; - } + count -= (mCount % 3); + LL_WARNS() << "Incomplete triangle requested." << LL_ENDL; } + } - if (mMode == LLRender::LINES) + if (mMode == LLRender::LINES) + { + if (mCount%2 != 0) { - if (mCount%2 != 0) - { count -= (mCount % 2); LL_WARNS() << "Incomplete line requested." << LL_ENDL; } @@ -1803,18 +1782,7 @@ LLVertexBuffer* LLRender::genBuffer(U32 attribute_mask, S32 count) void LLRender::drawBuffer(LLVertexBuffer* vb, U32 mode, S32 count) { vb->setBuffer(); - - // Remove QUADS rendering mode - //if (mode == LLRender::QUADS && sGLCoreProfile) - //{ - // vb->drawArrays(LLRender::TRIANGLES, 0, count); - // mQuadCycle = 1; - //} - //else - // - { - vb->drawArrays(mode, 0, count); - } + vb->drawArrays(mode, 0, count); } void LLRender::resetStriders(S32 count) @@ -1835,8 +1803,6 @@ void LLRender::vertex3f(const GLfloat& x, const GLfloat& y, const GLfloat& z) { case LLRender::POINTS: flush(); break; case LLRender::TRIANGLES: if (mCount%3==0) flush(); break; - // Remove QUADS rendering mode - //case LLRender::QUADS: if(mCount%4 == 0) flush(); break; case LLRender::LINES: if (mCount%2 == 0) flush(); break; } } @@ -1857,27 +1823,6 @@ void LLRender::vertex3f(const GLfloat& x, const GLfloat& y, const GLfloat& z) mVerticesp[mCount] = vert; } - // Remove QUADS rendering mode - //if (mMode == LLRender::QUADS && LLRender::sGLCoreProfile) - //{ - // mQuadCycle++; - // if (mQuadCycle == 4) - // { //copy two vertices so fourth quad element will add a triangle - // mQuadCycle = 0; - // - // mCount++; - // mVerticesp[mCount] = mVerticesp[mCount-3]; - // mColorsp[mCount] = mColorsp[mCount-3]; - // mTexcoordsp[mCount] = mTexcoordsp[mCount-3]; - - // mCount++; - // mVerticesp[mCount] = mVerticesp[mCount-2]; - // mColorsp[mCount] = mColorsp[mCount-2]; - // mTexcoordsp[mCount] = mTexcoordsp[mCount-2]; - // } - //} - // - mCount++; mVerticesp[mCount] = mVerticesp[mCount-1]; mColorsp[mCount] = mColorsp[mCount-1]; @@ -1892,52 +1837,13 @@ void LLRender::vertexBatchPreTransformed(LLVector3* verts, S32 vert_count) return; } - // Remove QUADS rendering mode - //if (sGLCoreProfile && mMode == LLRender::QUADS) - //{ //quads are deprecated, convert to triangle list - // S32 i = 0; - // - // while (i < vert_count) - // { - // //read first three - // mVerticesp[mCount++] = verts[i++]; - // mTexcoordsp[mCount] = mTexcoordsp[mCount-1]; - // mColorsp[mCount] = mColorsp[mCount-1]; - - // mVerticesp[mCount++] = verts[i++]; - // mTexcoordsp[mCount] = mTexcoordsp[mCount-1]; - // mColorsp[mCount] = mColorsp[mCount-1]; - - // mVerticesp[mCount++] = verts[i++]; - // mTexcoordsp[mCount] = mTexcoordsp[mCount-1]; - // mColorsp[mCount] = mColorsp[mCount-1]; - - // //copy two - // mVerticesp[mCount++] = verts[i-3]; - // mTexcoordsp[mCount] = mTexcoordsp[mCount-1]; - // mColorsp[mCount] = mColorsp[mCount-1]; - - // mVerticesp[mCount++] = verts[i-1]; - // mTexcoordsp[mCount] = mTexcoordsp[mCount-1]; - // mColorsp[mCount] = mColorsp[mCount-1]; - // - // //copy last one - // mVerticesp[mCount++] = verts[i++]; - // mTexcoordsp[mCount] = mTexcoordsp[mCount-1]; - // mColorsp[mCount] = mColorsp[mCount-1]; - // } - //} - //else - // + for (S32 i = 0; i < vert_count; i++) { - for (S32 i = 0; i < vert_count; i++) - { - mVerticesp[mCount] = verts[i]; + mVerticesp[mCount] = verts[i]; - mCount++; - mTexcoordsp[mCount] = mTexcoordsp[mCount-1]; - mColorsp[mCount] = mColorsp[mCount-1]; - } + mCount++; + mTexcoordsp[mCount] = mTexcoordsp[mCount-1]; + mColorsp[mCount] = mColorsp[mCount-1]; } if( mCount > 0 ) // ND: Guard against crashes if mCount is zero, yes it can happen @@ -1952,52 +1858,13 @@ void LLRender::vertexBatchPreTransformed(LLVector3* verts, LLVector2* uvs, S32 v return; } - // Remove QUADS rendering mode - //if (sGLCoreProfile && mMode == LLRender::QUADS) - //{ //quads are deprecated, convert to triangle list - // S32 i = 0; - - // while (i < vert_count) - // { - // //read first three - // mVerticesp[mCount] = verts[i]; - // mTexcoordsp[mCount++] = uvs[i++]; - // mColorsp[mCount] = mColorsp[mCount-1]; - - // mVerticesp[mCount] = verts[i]; - // mTexcoordsp[mCount++] = uvs[i++]; - // mColorsp[mCount] = mColorsp[mCount-1]; - - // mVerticesp[mCount] = verts[i]; - // mTexcoordsp[mCount++] = uvs[i++]; - // mColorsp[mCount] = mColorsp[mCount-1]; - - // //copy last two - // mVerticesp[mCount] = verts[i-3]; - // mTexcoordsp[mCount++] = uvs[i-3]; - // mColorsp[mCount] = mColorsp[mCount-1]; - - // mVerticesp[mCount] = verts[i-1]; - // mTexcoordsp[mCount++] = uvs[i-1]; - // mColorsp[mCount] = mColorsp[mCount-1]; - - // //copy last one - // mVerticesp[mCount] = verts[i]; - // mTexcoordsp[mCount++] = uvs[i++]; - // mColorsp[mCount] = mColorsp[mCount-1]; - // } - //} - //else - // + for (S32 i = 0; i < vert_count; i++) { - for (S32 i = 0; i < vert_count; i++) - { - mVerticesp[mCount] = verts[i]; - mTexcoordsp[mCount] = uvs[i]; + mVerticesp[mCount] = verts[i]; + mTexcoordsp[mCount] = uvs[i]; - mCount++; - mColorsp[mCount] = mColorsp[mCount-1]; - } + mCount++; + mColorsp[mCount] = mColorsp[mCount-1]; } if (mCount > 0) @@ -2015,53 +1882,13 @@ void LLRender::vertexBatchPreTransformed(LLVector3* verts, LLVector2* uvs, LLCol return; } - - // Remove QUADS rendering mode - //if (sGLCoreProfile && mMode == LLRender::QUADS) - //{ //quads are deprecated, convert to triangle list - // S32 i = 0; - - // while (i < vert_count) - // { - // //read first three - // mVerticesp[mCount] = verts[i]; - // mTexcoordsp[mCount] = uvs[i]; - // mColorsp[mCount++] = colors[i++]; - - // mVerticesp[mCount] = verts[i]; - // mTexcoordsp[mCount] = uvs[i]; - // mColorsp[mCount++] = colors[i++]; - - // mVerticesp[mCount] = verts[i]; - // mTexcoordsp[mCount] = uvs[i]; - // mColorsp[mCount++] = colors[i++]; - - // //copy last two - // mVerticesp[mCount] = verts[i-3]; - // mTexcoordsp[mCount] = uvs[i-3]; - // mColorsp[mCount++] = colors[i-3]; - - // mVerticesp[mCount] = verts[i-1]; - // mTexcoordsp[mCount] = uvs[i-1]; - // mColorsp[mCount++] = colors[i-1]; - - // //copy last one - // mVerticesp[mCount] = verts[i]; - // mTexcoordsp[mCount] = uvs[i]; - // mColorsp[mCount++] = colors[i++]; - // } - //} - //else - // + for (S32 i = 0; i < vert_count; i++) { - for (S32 i = 0; i < vert_count; i++) - { - mVerticesp[mCount] = verts[i]; - mTexcoordsp[mCount] = uvs[i]; - mColorsp[mCount] = colors[i]; + mVerticesp[mCount] = verts[i]; + mTexcoordsp[mCount] = uvs[i]; + mColorsp[mCount] = colors[i]; - mCount++; - } + mCount++; } if (mCount > 0) diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h index abfdccc21c..96c58a2f7f 100644 --- a/indra/llrender/llrender.h +++ b/indra/llrender/llrender.h @@ -319,8 +319,6 @@ public: POINTS, LINES, LINE_STRIP, - // Remove QUADS rendering mode - //QUADS, LINE_LOOP, NUM_MODES }; @@ -511,8 +509,6 @@ private: LLColor4 mAmbientLightColor; bool mDirty; - // Remove QUADS rendering mode - //U32 mQuadCycle; U32 mCount; U32 mMode; U32 mCurrTextureUnitIndex; diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp index 10012dc98c..58a86fecc9 100644 --- a/indra/llrender/llrender2dutils.cpp +++ b/indra/llrender/llrender2dutils.cpp @@ -175,83 +175,70 @@ void gl_drop_shadow(S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &st LLColor4 end_color = start_color; end_color.mV[VALPHA] = 0.f; - // Remove QUADS rendering mode - //gGL.begin(LLRender::QUADS); gGL.begin(LLRender::TRIANGLES); - // // Right edge, CCW faces screen gGL.color4fv(start_color.mV); - gGL.vertex2i(right, top-lines); - gGL.vertex2i(right, bottom); + gGL.vertex2i(right, top - lines); + gGL.vertex2i(right, bottom); gGL.color4fv(end_color.mV); - gGL.vertex2i(right+lines, bottom); - // Remove QUADS rendering mode + gGL.vertex2i(right + lines, bottom); gGL.color4fv(start_color.mV); - gGL.vertex2i(right, top-lines); + gGL.vertex2i(right, top - lines); gGL.color4fv(end_color.mV); - gGL.vertex2i(right+lines, bottom); - // - gGL.vertex2i(right+lines, top-lines); + gGL.vertex2i(right + lines, bottom); + gGL.vertex2i(right + lines, top - lines); // Bottom edge, CCW faces screen gGL.color4fv(start_color.mV); - gGL.vertex2i(right, bottom); - gGL.vertex2i(left+lines, bottom); + gGL.vertex2i(right, bottom); + gGL.vertex2i(left + lines, bottom); gGL.color4fv(end_color.mV); - gGL.vertex2i(left+lines, bottom-lines); - // Remove QUADS rendering mode + gGL.vertex2i(left + lines, bottom - lines); gGL.color4fv(start_color.mV); - gGL.vertex2i(right, bottom); + gGL.vertex2i(right, bottom); gGL.color4fv(end_color.mV); - gGL.vertex2i(left+lines, bottom-lines); - // - gGL.vertex2i(right, bottom-lines); + gGL.vertex2i(left + lines, bottom - lines); + gGL.vertex2i(right, bottom - lines); // bottom left Corner gGL.color4fv(start_color.mV); - gGL.vertex2i(left+lines, bottom); + gGL.vertex2i(left + lines, bottom); gGL.color4fv(end_color.mV); - gGL.vertex2i(left, bottom); + gGL.vertex2i(left, bottom); // make the bottom left corner not sharp - gGL.vertex2i(left+1, bottom-lines+1); - // Remove QUADS rendering mode + gGL.vertex2i(left + 1, bottom - lines + 1); gGL.color4fv(start_color.mV); - gGL.vertex2i(left+lines, bottom); + gGL.vertex2i(left + lines, bottom); gGL.color4fv(end_color.mV); - gGL.vertex2i(left+1, bottom-lines+1); - // - gGL.vertex2i(left+lines, bottom-lines); + gGL.vertex2i(left + 1, bottom - lines + 1); + gGL.vertex2i(left + lines, bottom - lines); // bottom right corner gGL.color4fv(start_color.mV); - gGL.vertex2i(right, bottom); + gGL.vertex2i(right, bottom); gGL.color4fv(end_color.mV); - gGL.vertex2i(right, bottom-lines); + gGL.vertex2i(right, bottom - lines); // make the rightmost corner not sharp - gGL.vertex2i(right+lines-1, bottom-lines+1); - // Remove QUADS rendering mode + gGL.vertex2i(right + lines - 1, bottom - lines + 1); gGL.color4fv(start_color.mV); - gGL.vertex2i(right, bottom); + gGL.vertex2i(right, bottom); gGL.color4fv(end_color.mV); - gGL.vertex2i(right+lines-1, bottom-lines+1); - // - gGL.vertex2i(right+lines, bottom); + gGL.vertex2i(right + lines - 1, bottom - lines + 1); + gGL.vertex2i(right + lines, bottom); // top right corner gGL.color4fv(start_color.mV); - gGL.vertex2i( right, top-lines ); + gGL.vertex2i(right, top - lines); gGL.color4fv(end_color.mV); - gGL.vertex2i( right+lines, top-lines ); + gGL.vertex2i(right + lines, top - lines); // make the corner not sharp - gGL.vertex2i( right+lines-1, top-1 ); - // Remove QUADS rendering mode + gGL.vertex2i(right + lines - 1, top - 1); gGL.color4fv(start_color.mV); - gGL.vertex2i( right, top-lines ); + gGL.vertex2i(right, top - lines); gGL.color4fv(end_color.mV); - gGL.vertex2i( right+lines-1, top-1 ); - // - gGL.vertex2i( right, top ); + gGL.vertex2i(right + lines - 1, top - 1); + gGL.vertex2i(right, top); gGL.end(); stop_glerror(); diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index b0fa4bb6a5..ec009477df 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -634,17 +634,7 @@ void LLVertexBufferData::draw() gGL.loadMatrix(glm::value_ptr(mTexture0)); mVB->setBuffer(); - - // Remove QUADS rendering mode - //if (mMode == LLRender::QUADS && LLRender::sGLCoreProfile) - //{ - // mVB->drawArrays(LLRender::TRIANGLES, 0, mCount); - //} - //else - // - { - mVB->drawArrays(mMode, 0, mCount); - } + mVB->drawArrays(mMode, 0, mCount); gGL.popMatrix(); gGL.matrixMode(LLRender::MM_PROJECTION); @@ -717,7 +707,6 @@ const U32 LLVertexBuffer::sGLMode[LLRender::NUM_MODES] = GL_POINTS, GL_LINES, GL_LINE_STRIP, - //GL_QUADS, // Remove QUADS rendering mode GL_LINE_LOOP, }; diff --git a/indra/llui/llbadge.cpp b/indra/llui/llbadge.cpp index 386db7aee3..6875e7c0ad 100644 --- a/indra/llui/llbadge.cpp +++ b/indra/llui/llbadge.cpp @@ -205,17 +205,6 @@ void renderBadgeBackground(F32 centerX, F32 centerY, F32 width, F32 height, cons (F32)ll_round(y) + height); LLVector3 vertices[4]; - // Remove QUADS rendering mode - //vertices[0] = LLVector3(screen_rect.mRight, screen_rect.mTop, 1.0f); - //vertices[1] = LLVector3(screen_rect.mLeft, screen_rect.mTop, 1.0f); - //vertices[2] = LLVector3(screen_rect.mLeft, screen_rect.mBottom, 1.0f); - //vertices[3] = LLVector3(screen_rect.mRight, screen_rect.mBottom, 1.0f); - // - //gGL.begin(LLRender::QUADS); - //{ - // gGL.vertexBatchPreTransformed(vertices, 4); - //} - //gGL.end(); vertices[0] = LLVector3(screen_rect.mLeft, screen_rect.mTop, 1.0f); vertices[1] = LLVector3(screen_rect.mRight, screen_rect.mTop, 1.0f); vertices[2] = LLVector3(screen_rect.mLeft, screen_rect.mBottom, 1.0f); @@ -226,7 +215,6 @@ void renderBadgeBackground(F32 centerX, F32 centerY, F32 width, F32 height, cons gGL.vertexBatchPreTransformed(vertices, 4); } gGL.end(); - // gGL.popUIMatrix(); } diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 68b557228d..5d29177f53 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -2463,39 +2463,6 @@ void LLFloater::drawConeToOwner(F32 &context_cone_opacity, gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); LLGLEnable(GL_CULL_FACE); - // Remove QUADS rendering mode - //gGL.begin(LLRender::QUADS); - //{ - // gGL.color4f(0.f, 0.f, 0.f, contex_cone_in_alpha * context_cone_opacity); - // gGL.vertex2i(owner_rect.mLeft, owner_rect.mTop); - // gGL.vertex2i(owner_rect.mRight, owner_rect.mTop); - // gGL.color4f(0.f, 0.f, 0.f, contex_cone_out_alpha * context_cone_opacity); - // gGL.vertex2i(local_rect.mRight, local_rect.mTop); - // gGL.vertex2i(local_rect.mLeft, local_rect.mTop); - - // gGL.color4f(0.f, 0.f, 0.f, contex_cone_out_alpha * context_cone_opacity); - // gGL.vertex2i(local_rect.mLeft, local_rect.mTop); - // gGL.vertex2i(local_rect.mLeft, local_rect.mBottom); - // gGL.color4f(0.f, 0.f, 0.f, contex_cone_in_alpha * context_cone_opacity); - // gGL.vertex2i(owner_rect.mLeft, owner_rect.mBottom); - // gGL.vertex2i(owner_rect.mLeft, owner_rect.mTop); - - // gGL.color4f(0.f, 0.f, 0.f, contex_cone_out_alpha * context_cone_opacity); - // gGL.vertex2i(local_rect.mRight, local_rect.mBottom); - // gGL.vertex2i(local_rect.mRight, local_rect.mTop); - // gGL.color4f(0.f, 0.f, 0.f, contex_cone_in_alpha * context_cone_opacity); - // gGL.vertex2i(owner_rect.mRight, owner_rect.mTop); - // gGL.vertex2i(owner_rect.mRight, owner_rect.mBottom); - - - // gGL.color4f(0.f, 0.f, 0.f, contex_cone_out_alpha * context_cone_opacity); - // gGL.vertex2i(local_rect.mLeft, local_rect.mBottom); - // gGL.vertex2i(local_rect.mRight, local_rect.mBottom); - // gGL.color4f(0.f, 0.f, 0.f, contex_cone_in_alpha * context_cone_opacity); - // gGL.vertex2i(owner_rect.mRight, owner_rect.mBottom); - // gGL.vertex2i(owner_rect.mLeft, owner_rect.mBottom); - //} - //gGL.end(); gGL.begin(LLRender::TRIANGLE_STRIP); { gGL.color4f(0.f, 0.f, 0.f, contex_cone_in_alpha * context_cone_opacity); @@ -2520,7 +2487,6 @@ void LLFloater::drawConeToOwner(F32 &context_cone_opacity, gGL.vertex2i(local_rect.mLeft, local_rect.mTop); } gGL.end(); - // } if (gFocusMgr.childHasMouseCapture(getDragHandle())) diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp index 732f1c5928..7b2be0744a 100644 --- a/indra/llui/llstatbar.cpp +++ b/indra/llui/llstatbar.cpp @@ -517,10 +517,7 @@ void LLStatBar::draw() max_value = 0.f; gGL.color4f(1.f, 0.f, 0.f, 1.f); - // Remove QUADS rendering mode - //gGL.begin( LLRender::QUADS ); - gGL.begin( LLRender::TRIANGLES ); - // + gGL.begin(LLRender::TRIANGLES); const S32 max_frame = llmin(num_frames, num_values); U32 num_samples = 0; for (S32 i = 1; i <= max_frame; i++) @@ -555,11 +552,6 @@ void LLStatBar::draw() F32 max = llmax(min + 1, (max_value - mCurMinBar) * value_scale); if (mOrientation == HORIZONTAL) { - // Remove QUADS rendering mode - //gGL.vertex2f((F32)bar_rect.mRight - offset, max); - //gGL.vertex2f((F32)bar_rect.mRight - offset, min); - //gGL.vertex2f((F32)bar_rect.mRight - offset - 1, min); - //gGL.vertex2f((F32)bar_rect.mRight - offset - 1, max); gGL.vertex2f((F32)bar_rect.mRight - offset, max); gGL.vertex2f((F32)bar_rect.mRight - offset, min); gGL.vertex2f((F32)bar_rect.mRight - offset - 1, min); @@ -567,23 +559,16 @@ void LLStatBar::draw() gGL.vertex2f((F32)bar_rect.mRight - offset, max); gGL.vertex2f((F32)bar_rect.mRight - offset - 1, min); gGL.vertex2f((F32)bar_rect.mRight - offset - 1, max); - // } else { - // Remove QUADS rendering mode - //gGL.vertex2f(min, (F32)bar_rect.mBottom + offset + 1); - //gGL.vertex2f(min, (F32)bar_rect.mBottom + offset); - //gGL.vertex2f(max, (F32)bar_rect.mBottom + offset); - //gGL.vertex2f(max, (F32)bar_rect.mBottom + offset + 1 ); gGL.vertex2f(min, (F32)bar_rect.mBottom + offset + 1); gGL.vertex2f(min, (F32)bar_rect.mBottom + offset); gGL.vertex2f(max, (F32)bar_rect.mBottom + offset); gGL.vertex2f(min, (F32)bar_rect.mBottom + offset + 1); gGL.vertex2f(max, (F32)bar_rect.mBottom + offset); - gGL.vertex2f(max, (F32)bar_rect.mBottom + offset + 1 ); - // + gGL.vertex2f(max, (F32)bar_rect.mBottom + offset + 1); } } gGL.end(); diff --git a/indra/newview/llbox.cpp b/indra/newview/llbox.cpp index c20c893bd2..d0787a3902 100644 --- a/indra/newview/llbox.cpp +++ b/indra/newview/llbox.cpp @@ -76,37 +76,24 @@ void LLBox::renderface(S32 which_face) {7, 4, 0, 3} }; - // Remove QUADS rendering mode - //gGL.begin(LLRender::QUADS); - // //gGL.normal3fv(&normals[which_face][0]); - // gGL.texCoord2f(1,0); - // gGL.vertex3fv(&mVertex[ faces[which_face][0] ][0]); - // gGL.texCoord2f(1,1); - // gGL.vertex3fv(&mVertex[ faces[which_face][1] ][0]); - // gGL.texCoord2f(0,1); - // gGL.vertex3fv(&mVertex[ faces[which_face][2] ][0]); - // gGL.texCoord2f(0,0); - // gGL.vertex3fv(&mVertex[ faces[which_face][3] ][0]); - //gGL.end(); gGL.begin(LLRender::TRIANGLES); { //gGL.normal3fv(&normals[which_face][0]); gGL.texCoord2f(1.f, 0.f); - gGL.vertex3fv(&mVertex[ faces[which_face][0] ][0]); + gGL.vertex3fv(&mVertex[faces[which_face][0]][0]); gGL.texCoord2f(1.f, 1.f); - gGL.vertex3fv(&mVertex[ faces[which_face][1] ][0]); + gGL.vertex3fv(&mVertex[faces[which_face][1]][0]); gGL.texCoord2f(0.f, 1.f); - gGL.vertex3fv(&mVertex[ faces[which_face][2] ][0]); + gGL.vertex3fv(&mVertex[faces[which_face][2]][0]); gGL.texCoord2f(1.f, 0.f); - gGL.vertex3fv(&mVertex[ faces[which_face][0] ][0]); + gGL.vertex3fv(&mVertex[faces[which_face][0]][0]); gGL.texCoord2f(0.f, 1.f); - gGL.vertex3fv(&mVertex[ faces[which_face][2] ][0]); + gGL.vertex3fv(&mVertex[faces[which_face][2]][0]); gGL.texCoord2f(0.f, 0.f); - gGL.vertex3fv(&mVertex[ faces[which_face][3] ][0]); + gGL.vertex3fv(&mVertex[faces[which_face][3]][0]); } gGL.end(); - // } void LLBox::render() diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp index d992542cbf..ce3627a136 100644 --- a/indra/newview/llfloaterbvhpreview.cpp +++ b/indra/newview/llfloaterbvhpreview.cpp @@ -579,20 +579,8 @@ void LLFloaterBvhPreview::draw() // gGL.color3f(1.f, 1.f, 1.f); gGL.getTexUnit(0)->bind(mAnimPreview); - // Remove QUADS rendering mode - //gGL.begin( LLRender::QUADS ); - //{ - // gGL.texCoord2f(0.f, 1.f); - // gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD); - // gGL.texCoord2f(0.f, 0.f); - // gGL.vertex2i(PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD); - // gGL.texCoord2f(1.f, 0.f); - // gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD); - // gGL.texCoord2f(1.f, 1.f); - // gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD); - //} - //gGL.end(); - gGL.begin( LLRender::TRIANGLES ); + + gGL.begin(LLRender::TRIANGLES); { gGL.texCoord2f(0.f, 1.f); gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD); @@ -609,7 +597,7 @@ void LLFloaterBvhPreview::draw() gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD); } gGL.end(); - // + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); // Preview on own avatar //LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); diff --git a/indra/newview/llfloatergltfasseteditor.cpp b/indra/newview/llfloatergltfasseteditor.cpp index d2cf24f1dd..a127f5d43e 100644 --- a/indra/newview/llfloatergltfasseteditor.cpp +++ b/indra/newview/llfloatergltfasseteditor.cpp @@ -209,7 +209,7 @@ void LLFloaterGLTFAssetEditor::loadFromNode(S32 node_id, LLFolderViewFolder* par std::string name = node.mName; if (node.mName.empty()) { - name = getString("node_tittle"); + name = getString("node_title"); } else { @@ -243,7 +243,7 @@ void LLFloaterGLTFAssetEditor::loadFromNode(S32 node_id, LLFolderViewFolder* par std::string name = mAsset->mMeshes[node.mMesh].mName; if (name.empty()) { - name = getString("mesh_tittle"); + name = getString("mesh_title"); } loadItem(node.mMesh, name, LLGLTFFolderItem::TYPE_MESH, view); } @@ -253,7 +253,7 @@ void LLFloaterGLTFAssetEditor::loadFromNode(S32 node_id, LLFolderViewFolder* par std::string name = mAsset->mSkins[node.mSkin].mName; if (name.empty()) { - name = getString("skin_tittle"); + name = getString("skin_title"); } loadItem(node.mSkin, name, LLGLTFFolderItem::TYPE_SKIN, view); } @@ -306,7 +306,7 @@ void LLFloaterGLTFAssetEditor::loadFromSelection() std::string name = scene.mName; if (scene.mName.empty()) { - name = getString("scene_tittle"); + name = getString("scene_title"); } else { diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp index 8e68283f2e..729f9c597d 100644 --- a/indra/newview/llfloaterimagepreview.cpp +++ b/indra/newview/llfloaterimagepreview.cpp @@ -433,23 +433,7 @@ void LLFloaterImagePreview::draw() } gGL.color3f(1.f, 1.f, 1.f); - // Remove QUADS rendering mode - //gGL.begin( LLRender::QUADS ); - //{ - // gGL.texCoord2f(mPreviewImageRect.mLeft, mPreviewImageRect.mTop); - // gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD); - // gGL.texCoord2f(mPreviewImageRect.mLeft, mPreviewImageRect.mBottom); - // gGL.vertex2i(PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD); - // gGL.texCoord2f(mPreviewImageRect.mRight, mPreviewImageRect.mBottom); - // gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD); - // gGL.texCoord2f(mPreviewImageRect.mRight, mPreviewImageRect.mTop); - // gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD); - //} - //gGL.end(); - // - - // Make preview area position to be not hard-coded - gGL.begin( LLRender::TRIANGLES ); + gGL.begin(LLRender::TRIANGLES); { gGL.texCoord2f(mPreviewImageRect.mLeft, mPreviewImageRect.mTop); gGL.vertex2i(mPreviewRect.mLeft, mPreviewRect.mTop); @@ -466,7 +450,6 @@ void LLFloaterImagePreview::draw() gGL.vertex2i(mPreviewRect.mRight, mPreviewRect.mTop); } gGL.end(); - // gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); @@ -487,23 +470,7 @@ void LLFloaterImagePreview::draw() gGL.getTexUnit(0)->bind(mAvatarPreview); } - // Remove QUADS rendering mode - //gGL.begin( LLRender::QUADS ); - //{ - // gGL.texCoord2f(0.f, 1.f); - // gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD); - // gGL.texCoord2f(0.f, 0.f); - // gGL.vertex2i(PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD); - // gGL.texCoord2f(1.f, 0.f); - // gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD); - // gGL.texCoord2f(1.f, 1.f); - // gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD); - //} - //gGL.end(); - // - - // Make preview area position to be not hard-coded - gGL.begin( LLRender::TRIANGLES ); + gGL.begin(LLRender::TRIANGLES); { gGL.texCoord2f(0.f, 1.f); gGL.vertex2i(mPreviewRect.mLeft, mPreviewRect.mTop); @@ -520,7 +487,6 @@ void LLFloaterImagePreview::draw() gGL.vertex2i(mPreviewRect.mRight, mPreviewRect.mTop); } gGL.end(); - // gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); } diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index df9f611316..8e301cb76c 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -874,19 +874,6 @@ void LLFloaterModelPreview::draw3dPreview() gGL.getTexUnit(0)->bind(mModelPreview); - // Remove QUADS rendering mode - //gGL.begin( LLRender::QUADS ); - //{ - // gGL.texCoord2f(0.f, 1.f); - // gGL.vertex2i(mPreviewRect.mLeft+1, mPreviewRect.mTop-1); - // gGL.texCoord2f(0.f, 0.f); - // gGL.vertex2i(mPreviewRect.mLeft+1, mPreviewRect.mBottom+1); - // gGL.texCoord2f(1.f, 0.f); - // gGL.vertex2i(mPreviewRect.mRight-1, mPreviewRect.mBottom+1); - // gGL.texCoord2f(1.f, 1.f); - // gGL.vertex2i(mPreviewRect.mRight-1, mPreviewRect.mTop-1); - //} - //gGL.end(); gGL.begin(LLRender::TRIANGLES); { gGL.texCoord2f(0.f, 1.f); @@ -904,7 +891,6 @@ void LLFloaterModelPreview::draw3dPreview() gGL.vertex2i(mPreviewRect.mLeft + 1, mPreviewRect.mTop - 1); } gGL.end(); - // gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); } diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index 6b8199dfc7..7ebfbd70c0 100644 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -416,30 +416,6 @@ void LLViewerParcelMgr::renderRect(const LLVector3d &west_south_bottom_global, gGL.end(); gGL.color4f(1.f, 1.f, 0.f, 0.2f); - // Remove QUADS rendering mode - //gGL.begin(LLRender::QUADS); - - //gGL.vertex3f(west, north, nw_bottom); - //gGL.vertex3f(west, north, nw_top); - //gGL.vertex3f(east, north, ne_top); - //gGL.vertex3f(east, north, ne_bottom); - - //gGL.vertex3f(east, north, ne_bottom); - //gGL.vertex3f(east, north, ne_top); - //gGL.vertex3f(east, south, se_top); - //gGL.vertex3f(east, south, se_bottom); - - //gGL.vertex3f(east, south, se_bottom); - //gGL.vertex3f(east, south, se_top); - //gGL.vertex3f(west, south, sw_top); - //gGL.vertex3f(west, south, sw_bottom); - - //gGL.vertex3f(west, south, sw_bottom); - //gGL.vertex3f(west, south, sw_top); - //gGL.vertex3f(west, north, nw_top); - //gGL.vertex3f(west, north, nw_bottom); - - //gGL.end(); gGL.begin(LLRender::TRIANGLE_STRIP); { gGL.vertex3f(west, north, nw_bottom); @@ -454,7 +430,6 @@ void LLViewerParcelMgr::renderRect(const LLVector3d &west_south_bottom_global, gGL.vertex3f(west, north, nw_bottom); } gGL.end(); - // LLUI::setLineWidth(1.f); } @@ -596,10 +571,9 @@ void LLViewerParcelMgr::renderOneSegment(F32 x1, F32 y1, F32 x2, F32 y2, F32 hei gGL.vertex3f(x2, y2, z2); - // Remove QUADS rendering mode gGL.vertex3f(x1, y1, z); + gGL.vertex3f(x2, y2, z2); - // // FIRE-10546: Show parcel boundary up to max. build level //z = z2+height; @@ -634,10 +608,10 @@ void LLViewerParcelMgr::renderOneSegment(F32 x1, F32 y1, F32 x2, F32 y2, F32 hei } - gGL.texCoord2f(tex_coord1*0.5f+0.5f, z1*0.5f); + gGL.texCoord2f(tex_coord1 * 0.5f + 0.5f, z1 * 0.5f); gGL.vertex3f(x1, y1, z1); - gGL.texCoord2f(tex_coord2*0.5f+0.5f, z2*0.5f); + gGL.texCoord2f(tex_coord2 * 0.5f + 0.5f, z2 * 0.5f); gGL.vertex3f(x2, y2, z2); // top edge stairsteps @@ -645,18 +619,16 @@ void LLViewerParcelMgr::renderOneSegment(F32 x1, F32 y1, F32 x2, F32 y2, F32 hei //z = llmax(z2+height, z1+height); z = absolute_height ? height : llmax(z2+height, z1+height); // - gGL.texCoord2f(tex_coord2*0.5f+0.5f, z*0.5f); + gGL.texCoord2f(tex_coord2 * 0.5f + 0.5f, z * 0.5f); gGL.vertex3f(x2, y2, z); - // Remove QUADS rendering mode - gGL.texCoord2f(tex_coord1*0.5f+0.5f, z1*0.5f); + gGL.texCoord2f(tex_coord1 * 0.5f + 0.5f, z1 * 0.5f); gGL.vertex3f(x1, y1, z1); - gGL.texCoord2f(tex_coord2*0.5f+0.5f, z*0.5f); + gGL.texCoord2f(tex_coord2 * 0.5f + 0.5f, z * 0.5f); gGL.vertex3f(x2, y2, z); - // - gGL.texCoord2f(tex_coord1*0.5f+0.5f, z*0.5f); + gGL.texCoord2f(tex_coord1 * 0.5f + 0.5f, z * 0.5f); gGL.vertex3f(x1, y1, z); } } @@ -704,10 +676,7 @@ void LLViewerParcelMgr::renderHighlightSegments(const U8* segments, LLViewerRegi if (!has_segments) { has_segments = true; - // Remove QUADS rendering mode - //gGL.begin(LLRender::QUADS); gGL.begin(LLRender::TRIANGLES); - // } // FIRE-10546: Show parcel boundary up to max. build level //renderOneSegment(x1, y1, x2, y2, PARCEL_POST_HEIGHT, SOUTH_MASK, regionp); @@ -726,10 +695,7 @@ void LLViewerParcelMgr::renderHighlightSegments(const U8* segments, LLViewerRegi if (!has_segments) { has_segments = true; - // Remove QUADS rendering mode - //gGL.begin(LLRender::QUADS); gGL.begin(LLRender::TRIANGLES); - // } // FIRE-10546: Show parcel boundary up to max. build level //renderOneSegment(x1, y1, x2, y2, PARCEL_POST_HEIGHT, WEST_MASK, regionp); @@ -788,10 +754,7 @@ void LLViewerParcelMgr::renderCollisionSegments(U8* segments, bool use_pass, LLV gGL.getTexUnit(0)->bind(mBlockedImage); } - // Remove QUADS rendering mode - //gGL.begin(LLRender::QUADS); gGL.begin(LLRender::TRIANGLES); - // for (y = 0; y < STRIDE; y++) { diff --git a/indra/newview/llhudeffectblob.cpp b/indra/newview/llhudeffectblob.cpp index b25d1e11dd..bdb21fd96e 100644 --- a/indra/newview/llhudeffectblob.cpp +++ b/indra/newview/llhudeffectblob.cpp @@ -78,17 +78,6 @@ void LLHUDEffectBlob::render() LLVector3 u_scale = pixel_right * (F32)mPixelSize; LLVector3 v_scale = pixel_up * (F32)mPixelSize; - // Remove QUADS rendering mode - //{ gGL.begin(LLRender::QUADS); - // gGL.texCoord2f(0.f, 1.f); - // gGL.vertex3fv((v_scale - u_scale).mV); - // gGL.texCoord2f(0.f, 0.f); - // gGL.vertex3fv((-v_scale - u_scale).mV); - // gGL.texCoord2f(1.f, 0.f); - // gGL.vertex3fv((-v_scale + u_scale).mV); - // gGL.texCoord2f(1.f, 1.f); - // gGL.vertex3fv((v_scale + u_scale).mV); - //} gGL.end(); gGL.begin(LLRender::TRIANGLES); { gGL.texCoord2f(0.f, 1.f); @@ -106,7 +95,6 @@ void LLHUDEffectBlob::render() gGL.vertex3fv((v_scale + u_scale).mV); } gGL.end(); - // } gGL.popMatrix(); } diff --git a/indra/newview/llhudicon.cpp b/indra/newview/llhudicon.cpp index 2661452322..7082845e13 100644 --- a/indra/newview/llhudicon.cpp +++ b/indra/newview/llhudicon.cpp @@ -157,19 +157,6 @@ void LLHUDIcon::render() gGL.getTexUnit(0)->bind(mImagep); } - // Remove QUADS rendering mode - //gGL.begin(LLRender::QUADS); - //{ - // gGL.texCoord2f(0.f, 1.f); - // gGL.vertex3fv(upper_left.mV); - // gGL.texCoord2f(0.f, 0.f); - // gGL.vertex3fv(lower_left.mV); - // gGL.texCoord2f(1.f, 0.f); - // gGL.vertex3fv(lower_right.mV); - // gGL.texCoord2f(1.f, 1.f); - // gGL.vertex3fv(upper_right.mV); - //} - //gGL.end(); gGL.begin(LLRender::TRIANGLES); { gGL.texCoord2f(0.f, 1.f); @@ -187,7 +174,6 @@ void LLHUDIcon::render() gGL.vertex3fv(upper_right.mV); } gGL.end(); - // } void LLHUDIcon::setImage(LLViewerTexture* imagep) diff --git a/indra/newview/lljoystickbutton.cpp b/indra/newview/lljoystickbutton.cpp index 3e6bb76f38..16867f88c7 100644 --- a/indra/newview/lljoystickbutton.cpp +++ b/indra/newview/lljoystickbutton.cpp @@ -657,51 +657,31 @@ void LLJoystickCameraRotate::drawRotatedImage( LLPointer image, S32 r gGL.color4fv(UI_VERTEX_COLOR.mV); - // Remove QUADS rendering mode - //gGL.begin(LLRender::QUADS); - //{ - // S32 scaledWidth = getLocalRect().getWidth(); - // S32 scaledHeight = getLocalRect().getHeight(); - - // gGL.texCoord2fv( uv[ (rotations + 0) % 4]); - // gGL.vertex2i(scaledWidth, scaledHeight ); - - // gGL.texCoord2fv( uv[ (rotations + 1) % 4]); - // gGL.vertex2i(0, scaledHeight ); - - // gGL.texCoord2fv( uv[ (rotations + 2) % 4]); - // gGL.vertex2i(0, 0); - - // gGL.texCoord2fv( uv[ (rotations + 3) % 4]); - // gGL.vertex2i(scaledWidth, 0); - //} - //gGL.end(); gGL.begin(LLRender::TRIANGLES); { S32 scaledWidth = getLocalRect().getWidth(); S32 scaledHeight = getLocalRect().getHeight(); - gGL.texCoord2fv( uv[ (rotations + 0) % 4]); + gGL.texCoord2fv(uv[(rotations + 0) % 4]); gGL.vertex2i(scaledWidth, scaledHeight ); - gGL.texCoord2fv( uv[ (rotations + 1) % 4]); + gGL.texCoord2fv(uv[(rotations + 1) % 4]); gGL.vertex2i(0, scaledHeight ); - gGL.texCoord2fv( uv[ (rotations + 2) % 4]); + gGL.texCoord2fv(uv[(rotations + 2) % 4]); gGL.vertex2i(0, 0); - gGL.texCoord2fv( uv[ (rotations + 0) % 4]); + gGL.texCoord2fv(uv[(rotations + 0) % 4]); gGL.vertex2i(scaledWidth, scaledHeight ); - gGL.texCoord2fv( uv[ (rotations + 2) % 4]); + gGL.texCoord2fv(uv[(rotations + 2) % 4]); gGL.vertex2i(0, 0); gGL.texCoord2fv( uv[ (rotations + 3) % 4]); gGL.vertex2i(scaledWidth, 0); } gGL.end(); - // } @@ -959,22 +939,6 @@ void LLJoystickQuaternion::drawRotatedImage(LLPointer image, S32 rota gGL.color4fv(UI_VERTEX_COLOR.mV); - // Remove QUADS rendering mode - //gGL.begin(LLRender::QUADS); - //{ - // gGL.texCoord2fv(uv[(rotations + 0) % 4]); - // gGL.vertex2i(width, height); - - // gGL.texCoord2fv(uv[(rotations + 1) % 4]); - // gGL.vertex2i(0, height); - - // gGL.texCoord2fv(uv[(rotations + 2) % 4]); - // gGL.vertex2i(0, 0); - - // gGL.texCoord2fv(uv[(rotations + 3) % 4]); - // gGL.vertex2i(width, 0); - //} - //gGL.end(); gGL.begin(LLRender::TRIANGLES); { gGL.texCoord2fv(uv[(rotations + 0) % 4]); @@ -996,7 +960,6 @@ void LLJoystickQuaternion::drawRotatedImage(LLPointer image, S32 rota gGL.vertex2i(width, 0); } gGL.end(); - // } void LLJoystickQuaternion::setRotation(const LLQuaternion &value) diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index a792ed02a0..02575db722 100644 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -630,46 +630,6 @@ void LLManipScale::renderFaces( const LLBBox& bbox ) { gGL.color4fv( default_normal_color.mV ); LLGLDepthTest gls_depth(GL_FALSE); - // Remove QUADS rendering mode - //gGL.begin(LLRender::QUADS); - //{ - // // Face 0 - // gGL.vertex3f(min.mV[VX], max.mV[VY], max.mV[VZ]); - // gGL.vertex3f(min.mV[VX], min.mV[VY], max.mV[VZ]); - // gGL.vertex3f(max.mV[VX], min.mV[VY], max.mV[VZ]); - // gGL.vertex3f(max.mV[VX], max.mV[VY], max.mV[VZ]); - - // // Face 1 - // gGL.vertex3f(max.mV[VX], min.mV[VY], max.mV[VZ]); - // gGL.vertex3f(max.mV[VX], min.mV[VY], min.mV[VZ]); - // gGL.vertex3f(max.mV[VX], max.mV[VY], min.mV[VZ]); - // gGL.vertex3f(max.mV[VX], max.mV[VY], max.mV[VZ]); - - // // Face 2 - // gGL.vertex3f(min.mV[VX], max.mV[VY], min.mV[VZ]); - // gGL.vertex3f(min.mV[VX], max.mV[VY], max.mV[VZ]); - // gGL.vertex3f(max.mV[VX], max.mV[VY], max.mV[VZ]); - // gGL.vertex3f(max.mV[VX], max.mV[VY], min.mV[VZ]); - - // // Face 3 - // gGL.vertex3f(min.mV[VX], max.mV[VY], max.mV[VZ]); - // gGL.vertex3f(min.mV[VX], max.mV[VY], min.mV[VZ]); - // gGL.vertex3f(min.mV[VX], min.mV[VY], min.mV[VZ]); - // gGL.vertex3f(min.mV[VX], min.mV[VY], max.mV[VZ]); - - // // Face 4 - // gGL.vertex3f(min.mV[VX], min.mV[VY], max.mV[VZ]); - // gGL.vertex3f(min.mV[VX], min.mV[VY], min.mV[VZ]); - // gGL.vertex3f(max.mV[VX], min.mV[VY], min.mV[VZ]); - // gGL.vertex3f(max.mV[VX], min.mV[VY], max.mV[VZ]); - - // // Face 5 - // gGL.vertex3f(min.mV[VX], min.mV[VY], min.mV[VZ]); - // gGL.vertex3f(min.mV[VX], max.mV[VY], min.mV[VZ]); - // gGL.vertex3f(max.mV[VX], max.mV[VY], min.mV[VZ]); - // gGL.vertex3f(max.mV[VX], min.mV[VY], min.mV[VZ]); - //} - //gGL.end(); gGL.begin(LLRender::TRIANGLE_STRIP); { gGL.vertex3f(min.mV[VX], max.mV[VY], min.mV[VZ]); @@ -688,7 +648,6 @@ void LLManipScale::renderFaces( const LLBBox& bbox ) gGL.vertex3f(max.mV[VX], max.mV[VY], max.mV[VZ]); } gGL.end(); - // } // Find nearest vertex diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 057df1aa54..317cf8b28d 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -894,10 +894,7 @@ void LLMediaCtrl::draw() calcOffsetsAndSize(&x_offset, &y_offset, &width, &height); // draw the browser - // Remove QUADS rendering mode - //gGL.begin( LLRender::QUADS ); - gGL.begin( LLRender::TRIANGLES ); - // + gGL.begin(LLRender::TRIANGLES); if (! media_plugin->getTextureCoordsOpenGL()) { // render using web browser reported width and height, instead of trying to invert GL scale @@ -910,13 +907,11 @@ void LLMediaCtrl::draw() gGL.texCoord2f( 0.f, max_v ); gGL.vertex2i( x_offset, y_offset ); - // Remove QUADS rendering mode - gGL.texCoord2f( max_u, 0.f ); - gGL.vertex2i( x_offset + width, y_offset + height ); + gGL.texCoord2f(max_u, 0.f); + gGL.vertex2i(x_offset + width, y_offset + height); - gGL.texCoord2f( 0.f, max_v ); - gGL.vertex2i( x_offset, y_offset ); - // + gGL.texCoord2f(0.f, max_v); + gGL.vertex2i(x_offset, y_offset); gGL.texCoord2f( max_u, max_v ); gGL.vertex2i( x_offset + width, y_offset ); @@ -933,13 +928,11 @@ void LLMediaCtrl::draw() gGL.texCoord2f( 0.f, 0.f ); gGL.vertex2i( x_offset, y_offset ); - // Remove QUADS rendering mode - gGL.texCoord2f( max_u, max_v ); - gGL.vertex2i( x_offset + width, y_offset + height ); + gGL.texCoord2f(max_u, max_v); + gGL.vertex2i(x_offset + width, y_offset + height); - gGL.texCoord2f( 0.f, 0.f ); - gGL.vertex2i( x_offset, y_offset ); - // + gGL.texCoord2f(0.f, 0.f); + gGL.vertex2i(x_offset, y_offset); gGL.texCoord2f( max_u, 0.f ); gGL.vertex2i( x_offset + width, y_offset ); diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 9d88773d90..edf9b92854 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -519,17 +519,6 @@ void LLNetMap::draw() // [/SL:KB] // Draw using texture. gGL.getTexUnit(0)->bind(regionp->getLand().getSTexture()); - // Remove QUADS rendering mode - //gGL.begin(LLRender::QUADS); - // gGL.texCoord2f(0.f, 1.f); - // gGL.vertex2f(left, top); - // gGL.texCoord2f(0.f, 0.f); - // gGL.vertex2f(left, bottom); - // gGL.texCoord2f(1.f, 0.f); - // gGL.vertex2f(right, bottom); - // gGL.texCoord2f(1.f, 1.f); - // gGL.vertex2f(right, top); - //gGL.end(); gGL.begin(LLRender::TRIANGLES); { gGL.texCoord2f(0.f, 1.f); @@ -547,7 +536,6 @@ void LLNetMap::draw() gGL.vertex2f(right, top); } gGL.end(); - // // [SL:KB] - Patch: World-MinimapOverlay | Checked: 2012-07-26 (Catznip-3.3) } gGL.flush(); @@ -636,18 +624,8 @@ void LLNetMap::draw() gGL.color4f(1.f, 1.f, 1.f, 1.f); gGL.getTexUnit(0)->bind(mObjectImagep); // [/SL:KB] - // Remove QUADS rendering mode - //gGL.begin(LLRender::QUADS); - // gGL.texCoord2f(0.f, 1.f); - // gGL.vertex2f(map_center_agent.mV[VX] - image_half_width, image_half_height + map_center_agent.mV[VY]); - // gGL.texCoord2f(0.f, 0.f); - // gGL.vertex2f(map_center_agent.mV[VX] - image_half_width, map_center_agent.mV[VY] - image_half_height); - // gGL.texCoord2f(1.f, 0.f); - // gGL.vertex2f(image_half_width + map_center_agent.mV[VX], map_center_agent.mV[VY] - image_half_height); - // gGL.texCoord2f(1.f, 1.f); - // gGL.vertex2f(image_half_width + map_center_agent.mV[VX], image_half_height + map_center_agent.mV[VY]); - //gGL.end(); gGL.begin(LLRender::TRIANGLES); + { gGL.texCoord2f(0.f, 1.f); gGL.vertex2f(map_center_agent.mV[VX] - image_half_width, image_half_height + map_center_agent.mV[VY]); gGL.texCoord2f(0.f, 0.f); @@ -661,8 +639,8 @@ void LLNetMap::draw() gGL.vertex2f(image_half_width + map_center_agent.mV[VX], map_center_agent.mV[VY] - image_half_height); gGL.texCoord2f(1.f, 1.f); gGL.vertex2f(image_half_width + map_center_agent.mV[VX], image_half_height + map_center_agent.mV[VY]); + } gGL.end(); - // // [SL:KB] - Patch: World-MinimapOverlay | Checked: 2012-07-26 (Catznip-3.3) } // [/SL:KB] diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index 1244630eb9..3ab3f89400 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -300,36 +300,20 @@ void LLSnapshotLivePreview::draw() gGL.pushMatrix(); { gGL.translatef((F32)rect.mLeft, (F32)rect.mBottom + TOP_PANEL_HEIGHT, 0.f); - // Remove QUADS rendering mode - //gGL.begin(LLRender::QUADS); - //{ - // gGL.texCoord2f(uv_width, uv_height); - // gGL.vertex2i(rect.getWidth(), rect.getHeight() ); - - // gGL.texCoord2f(0.f, uv_height); - // gGL.vertex2i(0, rect.getHeight() ); - - // gGL.texCoord2f(0.f, 0.f); - // gGL.vertex2i(0, 0); - - // gGL.texCoord2f(uv_width, 0.f); - // gGL.vertex2i(rect.getWidth(), 0); - //} - //gGL.end(); gGL.begin(LLRender::TRIANGLES); { gGL.texCoord2f(uv_width, uv_height); - gGL.vertex2i(rect.getWidth(), rect.getHeight() ); + gGL.vertex2i(rect.getWidth(), rect.getHeight()); gGL.texCoord2f(0.f, uv_height); - gGL.vertex2i(0, rect.getHeight() ); + gGL.vertex2i(0, rect.getHeight()); gGL.texCoord2f(0.f, 0.f); gGL.vertex2i(0, 0); gGL.texCoord2f(uv_width, uv_height); - gGL.vertex2i(rect.getWidth(), rect.getHeight() ); + gGL.vertex2i(rect.getWidth(), rect.getHeight()); gGL.texCoord2f(0.f, 0.f); gGL.vertex2i(0, 0); @@ -338,7 +322,6 @@ void LLSnapshotLivePreview::draw() gGL.vertex2i(rect.getWidth(), 0); } gGL.end(); - // } gGL.popMatrix(); @@ -386,24 +369,6 @@ void LLSnapshotLivePreview::draw() S32 y2 = gViewerWindow->getWindowHeightScaled() + TOP_PANEL_HEIGHT; gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - // Remove QUADS rendering mode - //gGL.begin(LLRender::QUADS); - //{ - // gGL.color4f(1.f, 1.f, 1.f, 0.f); - // gGL.vertex2i(x1, y1); - // gGL.vertex2i(x1 + gViewerWindow->getWindowWidthScaled(), y2); - // gGL.color4f(1.f, 1.f, 1.f, SHINE_OPACITY); - // gGL.vertex2i(x2 + gViewerWindow->getWindowWidthScaled(), y2); - // gGL.vertex2i(x2, y1); - - // gGL.color4f(1.f, 1.f, 1.f, SHINE_OPACITY); - // gGL.vertex2i(x2, y1); - // gGL.vertex2i(x2 + gViewerWindow->getWindowWidthScaled(), y2); - // gGL.color4f(1.f, 1.f, 1.f, 0.f); - // gGL.vertex2i(x3 + gViewerWindow->getWindowWidthScaled(), y2); - // gGL.vertex2i(x3, y1); - //} - //gGL.end(); gGL.begin(LLRender::TRIANGLES); { gGL.color4f(1.f, 1.f, 1.f, 0.f); @@ -432,7 +397,6 @@ void LLSnapshotLivePreview::draw() gGL.vertex2i(x3, y1); } gGL.end(); - // } // if we're at the end of the animation, stop @@ -465,35 +429,19 @@ void LLSnapshotLivePreview::draw() LLRect& rect = mImageRect[old_image_index]; gGL.translatef((F32)rect.mLeft, (F32)rect.mBottom - ll_round(getRect().getHeight() * 2.f * (fall_interp * fall_interp)), 0.f); gGL.rotatef(-45.f * fall_interp, 0.f, 0.f, 1.f); - // Remove QUADS rendering mode - //gGL.begin(LLRender::QUADS); - //{ - // gGL.texCoord2f(uv_width, uv_height); - // gGL.vertex2i(rect.getWidth(), rect.getHeight() ); - - // gGL.texCoord2f(0.f, uv_height); - // gGL.vertex2i(0, rect.getHeight() ); - - // gGL.texCoord2f(0.f, 0.f); - // gGL.vertex2i(0, 0); - - // gGL.texCoord2f(uv_width, 0.f); - // gGL.vertex2i(rect.getWidth(), 0); - //} - //gGL.end(); gGL.begin(LLRender::TRIANGLES); { gGL.texCoord2f(uv_width, uv_height); - gGL.vertex2i(rect.getWidth(), rect.getHeight() ); + gGL.vertex2i(rect.getWidth(), rect.getHeight()); gGL.texCoord2f(0.f, uv_height); - gGL.vertex2i(0, rect.getHeight() ); + gGL.vertex2i(0, rect.getHeight()); gGL.texCoord2f(0.f, 0.f); gGL.vertex2i(0, 0); gGL.texCoord2f(uv_width, uv_height); - gGL.vertex2i(rect.getWidth(), rect.getHeight() ); + gGL.vertex2i(rect.getWidth(), rect.getHeight()); gGL.texCoord2f(0.f, 0.f); gGL.vertex2i(0, 0); @@ -502,7 +450,6 @@ void LLSnapshotLivePreview::draw() gGL.vertex2i(rect.getWidth(), 0); } gGL.end(); - // } gGL.popMatrix(); } diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp index 8a5c3c3441..8deecd2126 100644 --- a/indra/newview/lltoolmorph.cpp +++ b/indra/newview/lltoolmorph.cpp @@ -291,19 +291,6 @@ void LLVisualParamHint::draw(F32 alpha) gGL.color4f(1.f, 1.f, 1.f, alpha); LLGLSUIDefault gls_ui; - // Remove QUADS rendering mode - //gGL.begin(LLRender::QUADS); - //{ - // gGL.texCoord2i(0, 1); - // gGL.vertex2i(0, mFullHeight); - // gGL.texCoord2i(0, 0); - // gGL.vertex2i(0, 0); - // gGL.texCoord2i(1, 0); - // gGL.vertex2i(mFullWidth, 0); - // gGL.texCoord2i(1, 1); - // gGL.vertex2i(mFullWidth, mFullHeight); - //} - //gGL.end(); gGL.begin(LLRender::TRIANGLES); { gGL.texCoord2i(0, 1); @@ -321,7 +308,6 @@ void LLVisualParamHint::draw(F32 alpha) gGL.vertex2i(mFullWidth, mFullHeight); } gGL.end(); - // gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); } diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp index e440b63394..b88bc2a56f 100644 --- a/indra/newview/llviewerjointattachment.cpp +++ b/indra/newview/llviewerjointattachment.cpp @@ -90,14 +90,6 @@ U32 LLViewerJointAttachment::drawShape( F32 pixelArea, bool first_pass, bool is_ LLGLDisable cull_face(GL_CULL_FACE); gGL.color4f(1.f, 1.f, 1.f, 1.f); - // Remove QUADS rendering mode - //gGL.begin(LLRender::QUADS); - //{ - // gGL.vertex3f(-0.1f, 0.1f, 0.f); - // gGL.vertex3f(-0.1f, -0.1f, 0.f); - // gGL.vertex3f(0.1f, -0.1f, 0.f); - // gGL.vertex3f(0.1f, 0.1f, 0.f); - //}gGL.end(); gGL.begin(LLRender::TRIANGLES); { gGL.vertex3f(-0.1f, 0.1f, 0.f); @@ -109,7 +101,6 @@ U32 LLViewerJointAttachment::drawShape( F32 pixelArea, bool first_pass, bool is_ gGL.vertex3f(0.1f, 0.1f, 0.f); } gGL.end(); - // } return 0; } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index cb61269580..e5bdf5cd22 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6076,14 +6076,6 @@ U32 LLVOAvatar::renderImpostor(LLColor4U color, S32 diffuse_channel) gGL.setSceneBlendType(LLRender::BT_ADD); gGL.getTexUnit(diffuse_channel)->unbind(LLTexUnit::TT_TEXTURE); - // gGL.begin(LLRender::QUADS); - // gGL.vertex3fv((pos+left-up).mV); - // gGL.vertex3fv((pos-left-up).mV); - // gGL.vertex3fv((pos-left+up).mV); - // gGL.vertex3fv((pos+left+up).mV); - // gGL.end(); - - gGL.begin(LLRender::LINES); gGL.color4f(1.f,1.f,1.f,1.f); F32 thickness = llmax(F32(5.0f-5.0f*(gFrameTimeSeconds-mLastImpostorUpdateFrameTime)),1.0f); @@ -6104,17 +6096,6 @@ U32 LLVOAvatar::renderImpostor(LLColor4U color, S32 diffuse_channel) gGL.color4ubv(color.mV); gGL.getTexUnit(diffuse_channel)->bind(&mImpostor); - // Remove QUADS rendering mode - //gGL.begin(LLRender::QUADS); - //gGL.texCoord2f(0,0); - //gGL.vertex3fv((pos+left-up).mV); - //gGL.texCoord2f(1,0); - //gGL.vertex3fv((pos-left-up).mV); - //gGL.texCoord2f(1,1); - //gGL.vertex3fv((pos-left+up).mV); - //gGL.texCoord2f(0,1); - //gGL.vertex3fv((pos+left+up).mV); - //gGL.end(); gGL.begin(LLRender::TRIANGLES); { gGL.texCoord2f(0.f, 0.f); @@ -6132,7 +6113,6 @@ U32 LLVOAvatar::renderImpostor(LLColor4U color, S32 diffuse_channel) gGL.vertex3fv((pos + left + up).mV); } gGL.end(); - // gGL.flush(); } diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 6e47e71929..4e100da0fc 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -493,13 +493,6 @@ void LLWorldMapView::draw() gGL.color4f(0.2f, 0.0f, 0.0f, 0.4f); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - // Remove QUADS rendering mode - //gGL.begin(LLRender::QUADS); - // gGL.vertex2f(left, top); - // gGL.vertex2f(left, bottom); - // gGL.vertex2f(right, bottom); - // gGL.vertex2f(right, top); - //gGL.end(); gGL.begin(LLRender::TRIANGLES); { gGL.vertex2f(left, top); @@ -511,7 +504,6 @@ void LLWorldMapView::draw() gGL.vertex2f(right, top); } gGL.end(); - // } // Aurora Sim #ifdef OPENSIM @@ -541,17 +533,6 @@ void LLWorldMapView::draw() { gGL.getTexUnit(0)->bind(overlayimage); gGL.color4f(1.f, 1.f, 1.f, 1.f); - // Remove QUADS rendering mode - //gGL.begin(LLRender::QUADS); - // gGL.texCoord2f(0.f, 1.f); - // gGL.vertex3f(left, top, -0.5f); - // gGL.texCoord2f(0.f, 0.f); - // gGL.vertex3f(left, bottom, -0.5f); - // gGL.texCoord2f(1.f, 0.f); - // gGL.vertex3f(right, bottom, -0.5f); - // gGL.texCoord2f(1.f, 1.f); - // gGL.vertex3f(right, top, -0.5f); - //gGL.end(); gGL.begin(LLRender::TRIANGLES); { gGL.texCoord2f(0.f, 1.f); @@ -569,7 +550,6 @@ void LLWorldMapView::draw() gGL.vertex3f(right, top, -0.5f); } gGL.end(); - // } } } @@ -861,17 +841,6 @@ bool LLWorldMapView::drawMipmapLevel(S32 width, S32 height, S32 level, bool load gGL.color4f(1.f, 1.0f, 1.0f, 1.0f); - // Remove QUADS rendering mode - //gGL.begin(LLRender::QUADS); - // gGL.texCoord2f(0.f, 1.f); - // gGL.vertex3f(left, top, 0.f); - // gGL.texCoord2f(0.f, 0.f); - // gGL.vertex3f(left, bottom, 0.f); - // gGL.texCoord2f(1.f, 0.f); - // gGL.vertex3f(right, bottom, 0.f); - // gGL.texCoord2f(1.f, 1.f); - // gGL.vertex3f(right, top, 0.f); - //gGL.end(); gGL.begin(LLRender::TRIANGLES); { gGL.texCoord2f(0.f, 1.f); @@ -889,7 +858,6 @@ bool LLWorldMapView::drawMipmapLevel(S32 width, S32 height, S32 level, bool load gGL.vertex3f(right, top, 0.f); } gGL.end(); - // #if DEBUG_DRAW_TILE drawTileOutline(level, top, left, bottom, right); #endif // DEBUG_DRAW_TILE diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 7c2819478f..074046ace5 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -11126,13 +11126,6 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar, bool preview_avatar, bool gGL.diffuseColor4fv(LLColor4::pink.mV ); } - // Remove QUADS rendering mode - //gGL.begin(LLRender::QUADS); - //gGL.vertex3f(-1, -1, clip_plane); - //gGL.vertex3f(1, -1, clip_plane); - //gGL.vertex3f(1, 1, clip_plane); - //gGL.vertex3f(-1, 1, clip_plane); - //gGL.end(); gGL.begin(LLRender::TRIANGLES); { gGL.vertex3f(-1.f, -1.f, clip_plane); @@ -11144,7 +11137,6 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar, bool preview_avatar, bool gGL.vertex3f(-1.f, 1.f, clip_plane); } gGL.end(); - // gGL.flush(); gDebugProgram.unbind(); diff --git a/indra/newview/skins/default/xui/en/floater_gltf_asset_editor.xml b/indra/newview/skins/default/xui/en/floater_gltf_asset_editor.xml index b17d0aa5b6..025d537804 100644 --- a/indra/newview/skins/default/xui/en/floater_gltf_asset_editor.xml +++ b/indra/newview/skins/default/xui/en/floater_gltf_asset_editor.xml @@ -11,10 +11,10 @@ name="gltf asset editor" title="[OBJECT_NAME]"> - - - - + + + +