Remove deprecated OpenGL QUADS rendering mode
parent
fb0b49352b
commit
0c4c1b5968
|
|
@ -257,9 +257,14 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
|
|||
const LLFontGlyphInfo* next_glyph = NULL;
|
||||
|
||||
const S32 GLYPH_BATCH_SIZE = 30;
|
||||
LLVector3 vertices[GLYPH_BATCH_SIZE * 4];
|
||||
LLVector2 uvs[GLYPH_BATCH_SIZE * 4];
|
||||
LLColor4U colors[GLYPH_BATCH_SIZE * 4];
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//LLVector3 vertices[GLYPH_BATCH_SIZE * 4];
|
||||
//LLVector2 uvs[GLYPH_BATCH_SIZE * 4];
|
||||
//LLColor4U colors[GLYPH_BATCH_SIZE * 4];
|
||||
LLVector3 vertices[GLYPH_BATCH_SIZE * 6];
|
||||
LLVector2 uvs[GLYPH_BATCH_SIZE * 6];
|
||||
LLColor4U colors[GLYPH_BATCH_SIZE * 6];
|
||||
// </FS:Ansariel>
|
||||
|
||||
LLColor4U text_color(color);
|
||||
|
||||
|
|
@ -288,11 +293,18 @@ 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)
|
||||
{
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> 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 * 4);
|
||||
gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 6);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
glyph_count = 0;
|
||||
}
|
||||
|
||||
|
|
@ -321,11 +333,18 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
|
|||
|
||||
if (glyph_count >= GLYPH_BATCH_SIZE)
|
||||
{
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> 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 * 4);
|
||||
gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 6);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
|
||||
glyph_count = 0;
|
||||
}
|
||||
|
|
@ -355,11 +374,18 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
|
|||
cur_render_y = cur_y;
|
||||
}
|
||||
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> 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 * 4);
|
||||
gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 6);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
|
||||
|
||||
if (right_x)
|
||||
|
|
@ -1184,7 +1210,31 @@ LLFontGL &LLFontGL::operator=(const LLFontGL &source)
|
|||
return *this;
|
||||
}
|
||||
|
||||
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
|
||||
// <FS:Ansariel> 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;
|
||||
|
||||
|
|
@ -1203,10 +1253,22 @@ void LLFontGL::renderQuad(LLVector3* vertex_out, LLVector2* uv_out, LLColor4U* c
|
|||
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.mTop, 0.f);
|
||||
uv_out[index] = LLVector2(uv_rect.mRight, uv_rect.mTop);
|
||||
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;
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
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
|
||||
{
|
||||
|
|
@ -1222,7 +1284,10 @@ 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);
|
||||
renderQuad(&vertex_out[glyph_count * 4], &uv_out[glyph_count * 4], &colors_out[glyph_count * 4], screen_rect_offset, uv_rect, color, slant_offset);
|
||||
// <FS:Ansariel> 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);
|
||||
// </FS:Ansariel>
|
||||
glyph_count++;
|
||||
}
|
||||
}
|
||||
|
|
@ -1253,10 +1318,16 @@ void LLFontGL::drawGlyph(S32& glyph_count, LLVector3* vertex_out, LLVector2* uv_
|
|||
break;
|
||||
}
|
||||
|
||||
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);
|
||||
// <FS:Ansariel> 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);
|
||||
// </FS:Ansariel>
|
||||
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);
|
||||
// <FS:Ansariel> 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);
|
||||
// </FS:Ansariel>
|
||||
glyph_count++;
|
||||
}
|
||||
else if (shadow == DROP_SHADOW)
|
||||
|
|
@ -1265,14 +1336,22 @@ 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);
|
||||
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);
|
||||
// <FS:Ansariel> 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++;
|
||||
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);
|
||||
// </FS:Ansariel>
|
||||
glyph_count++;
|
||||
}
|
||||
else // normal rendering
|
||||
{
|
||||
renderQuad(&vertex_out[glyph_count * 4], &uv_out[glyph_count * 4], &colors_out[glyph_count * 4], screen_rect, uv_rect, color, slant_offset);
|
||||
// <FS:Ansariel> 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);
|
||||
// </FS:Ansariel>
|
||||
glyph_count++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -225,7 +225,10 @@ private:
|
|||
LLFontDescriptor mFontDescriptor;
|
||||
LLPointer<LLFontFreetype> mFontFreetype;
|
||||
|
||||
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;
|
||||
// <FS:Ansariel> 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;
|
||||
// </FS:Ansariel>
|
||||
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.
|
||||
|
|
|
|||
|
|
@ -1028,7 +1028,7 @@ void LLLightState::setSpotDirection(const LLVector3& direction)
|
|||
LLRender::LLRender()
|
||||
: mDirty(false),
|
||||
mCount(0),
|
||||
mQuadCycle(0),
|
||||
//mQuadCycle(0), // <FS:Ansariel> Remove QUADS rendering mode
|
||||
mMode(LLRender::TRIANGLES),
|
||||
mCurrTextureUnitIndex(0),
|
||||
mMaxAnisotropy(0.f)
|
||||
|
|
@ -1808,12 +1808,14 @@ void LLRender::begin(const GLuint& mode)
|
|||
{
|
||||
if (mode != mMode)
|
||||
{
|
||||
if (mode == LLRender::QUADS)
|
||||
{
|
||||
mQuadCycle = 1;
|
||||
}
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//if (mode == LLRender::QUADS)
|
||||
//{
|
||||
// mQuadCycle = 1;
|
||||
//}
|
||||
// </FS:Ansariel>
|
||||
|
||||
if (mMode == LLRender::QUADS ||
|
||||
if (//mMode == LLRender::QUADS || // <FS:Ansariel> Remove QUADS rendering mode
|
||||
mMode == LLRender::LINES ||
|
||||
mMode == LLRender::TRIANGLES ||
|
||||
mMode == LLRender::POINTS)
|
||||
|
|
@ -1837,7 +1839,7 @@ void LLRender::end()
|
|||
//IMM_ERRS << "GL begin and end called with no vertices specified." << LL_ENDL;
|
||||
}
|
||||
|
||||
if ((mMode != LLRender::QUADS &&
|
||||
if ((//mMode != LLRender::QUADS && // <FS:Ansariel> Remove QUADS rendering mode
|
||||
mMode != LLRender::LINES &&
|
||||
mMode != LLRender::TRIANGLES &&
|
||||
mMode != LLRender::POINTS) ||
|
||||
|
|
@ -1901,14 +1903,16 @@ void LLRender::flush()
|
|||
//store mCount in a local variable to avoid re-entrance (drawArrays may call flush)
|
||||
U32 count = mCount;
|
||||
|
||||
if (mMode == LLRender::QUADS && !sGLCoreProfile)
|
||||
{
|
||||
if (mCount%4 != 0)
|
||||
{
|
||||
count -= (mCount % 4);
|
||||
LL_WARNS() << "Incomplete quad requested." << LL_ENDL;
|
||||
}
|
||||
}
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//if (mMode == LLRender::QUADS && !sGLCoreProfile)
|
||||
//{
|
||||
// if (mCount%4 != 0)
|
||||
// {
|
||||
// count -= (mCount % 4);
|
||||
// LL_WARNS() << "Incomplete quad requested." << LL_ENDL;
|
||||
// }
|
||||
//}
|
||||
// </FS:Ansariel>
|
||||
|
||||
if (mMode == LLRender::TRIANGLES)
|
||||
{
|
||||
|
|
@ -1940,12 +1944,14 @@ void LLRender::flush()
|
|||
mBuffer->flush();
|
||||
mBuffer->setBuffer(immediate_mask);
|
||||
|
||||
if (mMode == LLRender::QUADS && sGLCoreProfile)
|
||||
{
|
||||
mBuffer->drawArrays(LLRender::TRIANGLES, 0, count);
|
||||
mQuadCycle = 1;
|
||||
}
|
||||
else
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//if (mMode == LLRender::QUADS && sGLCoreProfile)
|
||||
//{
|
||||
// mBuffer->drawArrays(LLRender::TRIANGLES, 0, count);
|
||||
// mQuadCycle = 1;
|
||||
//}
|
||||
//else
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
mBuffer->drawArrays(mMode, 0, count);
|
||||
}
|
||||
|
|
@ -1967,7 +1973,8 @@ 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;
|
||||
case LLRender::QUADS: if(mCount%4 == 0) flush(); break;
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//case LLRender::QUADS: if(mCount%4 == 0) flush(); break;
|
||||
case LLRender::LINES: if (mCount%2 == 0) flush(); break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1988,24 +1995,26 @@ void LLRender::vertex3f(const GLfloat& x, const GLfloat& y, const GLfloat& z)
|
|||
mVerticesp[mCount] = vert;
|
||||
}
|
||||
|
||||
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];
|
||||
// <FS:Ansariel> 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-2];
|
||||
// mColorsp[mCount] = mColorsp[mCount-2];
|
||||
// mTexcoordsp[mCount] = mTexcoordsp[mCount-2];
|
||||
// }
|
||||
//}
|
||||
// </FS:Ansariel>
|
||||
|
||||
mCount++;
|
||||
mVerticesp[mCount] = mVerticesp[mCount-1];
|
||||
|
|
@ -2021,41 +2030,43 @@ void LLRender::vertexBatchPreTransformed(LLVector3* verts, S32 vert_count)
|
|||
return;
|
||||
}
|
||||
|
||||
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];
|
||||
// <FS:Ansariel> 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];
|
||||
|
||||
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];
|
||||
// //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
|
||||
// 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
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
for (S32 i = 0; i < vert_count; i++)
|
||||
{
|
||||
|
|
@ -2083,41 +2094,43 @@ void LLRender::vertexBatchPreTransformed(LLVector3* verts, LLVector2* uvs, S32 v
|
|||
return;
|
||||
}
|
||||
|
||||
if (sGLCoreProfile && mMode == LLRender::QUADS)
|
||||
{ //quads are deprecated, convert to triangle list
|
||||
S32 i = 0;
|
||||
// <FS:Ansariel> 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];
|
||||
// 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];
|
||||
|
||||
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];
|
||||
// //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];
|
||||
// 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
|
||||
// //copy last one
|
||||
// mVerticesp[mCount] = verts[i];
|
||||
// mTexcoordsp[mCount++] = uvs[i++];
|
||||
// mColorsp[mCount] = mColorsp[mCount-1];
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
for (S32 i = 0; i < vert_count; i++)
|
||||
{
|
||||
|
|
@ -2149,41 +2162,43 @@ void LLRender::vertexBatchPreTransformed(LLVector3* verts, LLVector2* uvs, LLCol
|
|||
}
|
||||
|
||||
|
||||
if (sGLCoreProfile && mMode == LLRender::QUADS)
|
||||
{ //quads are deprecated, convert to triangle list
|
||||
S32 i = 0;
|
||||
// <FS:Ansariel> 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++];
|
||||
// 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++];
|
||||
|
||||
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];
|
||||
// //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];
|
||||
// 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
|
||||
// //copy last one
|
||||
// mVerticesp[mCount] = verts[i];
|
||||
// mTexcoordsp[mCount] = uvs[i];
|
||||
// mColorsp[mCount++] = colors[i++];
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
for (S32 i = 0; i < vert_count; i++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -277,7 +277,8 @@ public:
|
|||
POINTS,
|
||||
LINES,
|
||||
LINE_STRIP,
|
||||
QUADS,
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//QUADS,
|
||||
LINE_LOOP,
|
||||
NUM_MODES
|
||||
} eGeomModes;
|
||||
|
|
@ -451,7 +452,8 @@ private:
|
|||
LLColor4 mAmbientLightColor;
|
||||
|
||||
bool mDirty;
|
||||
U32 mQuadCycle;
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//U32 mQuadCycle;
|
||||
U32 mCount;
|
||||
U32 mMode;
|
||||
U32 mCurrTextureUnitIndex;
|
||||
|
|
|
|||
|
|
@ -125,12 +125,25 @@ void gl_rect_2d(S32 left, S32 top, S32 right, S32 bottom, BOOL filled )
|
|||
// Counterclockwise quad will face the viewer
|
||||
if( filled )
|
||||
{
|
||||
gGL.begin( LLRender::QUADS );
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin( LLRender::QUADS );
|
||||
// gGL.vertex2i(left, top);
|
||||
// gGL.vertex2i(left, bottom);
|
||||
// gGL.vertex2i(right, bottom);
|
||||
// gGL.vertex2i(right, top);
|
||||
//gGL.end();
|
||||
gGL.begin( LLRender::TRIANGLES );
|
||||
{
|
||||
gGL.vertex2i(left, top);
|
||||
gGL.vertex2i(left, bottom);
|
||||
gGL.vertex2i(right, bottom);
|
||||
|
||||
gGL.vertex2i(right, bottom);
|
||||
gGL.vertex2i(left, top);
|
||||
gGL.vertex2i(right, top);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -201,7 +214,10 @@ 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;
|
||||
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
gGL.begin(LLRender::TRIANGLES);
|
||||
// </FS:Ansariel>
|
||||
|
||||
// Right edge, CCW faces screen
|
||||
gGL.color4fv(start_color.mV);
|
||||
|
|
@ -209,6 +225,12 @@ void gl_drop_shadow(S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &st
|
|||
gGL.vertex2i(right, bottom);
|
||||
gGL.color4fv(end_color.mV);
|
||||
gGL.vertex2i(right+lines, bottom);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.vertex2i(right+lines, bottom);
|
||||
gGL.color4fv(start_color.mV);
|
||||
gGL.vertex2i(right, top-lines);
|
||||
gGL.color4fv(end_color.mV);
|
||||
// </FS:Ansariel>
|
||||
gGL.vertex2i(right+lines, top-lines);
|
||||
|
||||
// Bottom edge, CCW faces screen
|
||||
|
|
@ -217,6 +239,12 @@ void gl_drop_shadow(S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &st
|
|||
gGL.vertex2i(left+lines, bottom);
|
||||
gGL.color4fv(end_color.mV);
|
||||
gGL.vertex2i(left+lines, bottom-lines);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.vertex2i(left+lines, bottom-lines);
|
||||
gGL.color4fv(start_color.mV);
|
||||
gGL.vertex2i(right, bottom);
|
||||
gGL.color4fv(end_color.mV);
|
||||
// </FS:Ansariel>
|
||||
gGL.vertex2i(right, bottom-lines);
|
||||
|
||||
// bottom left Corner
|
||||
|
|
@ -226,6 +254,12 @@ void gl_drop_shadow(S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &st
|
|||
gGL.vertex2i(left, bottom);
|
||||
// make the bottom left corner not sharp
|
||||
gGL.vertex2i(left+1, bottom-lines+1);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.vertex2i(left+1, bottom-lines+1);
|
||||
gGL.color4fv(start_color.mV);
|
||||
gGL.vertex2i(left+lines, bottom);
|
||||
gGL.color4fv(end_color.mV);
|
||||
// </FS:Ansariel>
|
||||
gGL.vertex2i(left+lines, bottom-lines);
|
||||
|
||||
// bottom right corner
|
||||
|
|
@ -235,6 +269,12 @@ void gl_drop_shadow(S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &st
|
|||
gGL.vertex2i(right, bottom-lines);
|
||||
// make the rightmost corner not sharp
|
||||
gGL.vertex2i(right+lines-1, bottom-lines+1);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.vertex2i(right+lines-1, bottom-lines+1);
|
||||
gGL.color4fv(start_color.mV);
|
||||
gGL.vertex2i(right, bottom);
|
||||
gGL.color4fv(end_color.mV);
|
||||
// </FS:Ansariel>
|
||||
gGL.vertex2i(right+lines, bottom);
|
||||
|
||||
// top right corner
|
||||
|
|
@ -244,6 +284,12 @@ void gl_drop_shadow(S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &st
|
|||
gGL.vertex2i( right+lines, top-lines );
|
||||
// make the corner not sharp
|
||||
gGL.vertex2i( right+lines-1, top-1 );
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.vertex2i( right+lines-1, top-1 );
|
||||
gGL.color4fv(start_color.mV);
|
||||
gGL.vertex2i( right, top-lines );
|
||||
gGL.color4fv(end_color.mV);
|
||||
// </FS:Ansariel>
|
||||
gGL.vertex2i( right, top );
|
||||
|
||||
gGL.end();
|
||||
|
|
@ -484,13 +530,19 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
|
|||
|
||||
gGL.color4fv(color.mV);
|
||||
|
||||
const S32 NUM_VERTICES = 9 * 4; // 9 quads
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//const S32 NUM_VERTICES = 9 * 4; // 9 quads
|
||||
const S32 NUM_VERTICES = 9 * 6; // 9 quads
|
||||
// </FS:Ansariel>
|
||||
LLVector2 uv[NUM_VERTICES];
|
||||
LLVector3 pos[NUM_VERTICES];
|
||||
|
||||
S32 index = 0;
|
||||
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
gGL.begin(LLRender::TRIANGLES);
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
// draw bottom left
|
||||
uv[index] = LLVector2(uv_outer_rect.mLeft, uv_outer_rect.mBottom);
|
||||
|
|
@ -505,6 +557,16 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
|
|||
pos[index] = LLVector3(draw_center_rect.mLeft, draw_center_rect.mBottom, 0.f);
|
||||
index++;
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
uv[index] = LLVector2(uv_center_rect.mLeft, uv_center_rect.mBottom);
|
||||
pos[index] = LLVector3(draw_center_rect.mLeft, draw_center_rect.mBottom, 0.f);
|
||||
index++;
|
||||
|
||||
uv[index] = LLVector2(uv_outer_rect.mLeft, uv_outer_rect.mBottom);
|
||||
pos[index] = LLVector3(draw_outer_rect.mLeft, draw_outer_rect.mBottom, 0.f);
|
||||
index++;
|
||||
// </FS:Ansariel>
|
||||
|
||||
uv[index] = LLVector2(uv_outer_rect.mLeft, uv_center_rect.mBottom);
|
||||
pos[index] = LLVector3(draw_outer_rect.mLeft, draw_center_rect.mBottom, 0.f);
|
||||
index++;
|
||||
|
|
@ -522,6 +584,16 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
|
|||
pos[index] = LLVector3(draw_center_rect.mRight, draw_center_rect.mBottom, 0.f);
|
||||
index++;
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
uv[index] = LLVector2(uv_center_rect.mRight, uv_center_rect.mBottom);
|
||||
pos[index] = LLVector3(draw_center_rect.mRight, draw_center_rect.mBottom, 0.f);
|
||||
index++;
|
||||
|
||||
uv[index] = LLVector2(uv_center_rect.mLeft, uv_outer_rect.mBottom);
|
||||
pos[index] = LLVector3(draw_center_rect.mLeft, draw_outer_rect.mBottom, 0.f);
|
||||
index++;
|
||||
// </FS:Ansariel>
|
||||
|
||||
uv[index] = LLVector2(uv_center_rect.mLeft, uv_center_rect.mBottom);
|
||||
pos[index] = LLVector3(draw_center_rect.mLeft, draw_center_rect.mBottom, 0.f);
|
||||
index++;
|
||||
|
|
@ -539,6 +611,16 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
|
|||
pos[index] = LLVector3(draw_outer_rect.mRight, draw_center_rect.mBottom, 0.f);
|
||||
index++;
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
uv[index] = LLVector2(uv_outer_rect.mRight, uv_center_rect.mBottom);
|
||||
pos[index] = LLVector3(draw_outer_rect.mRight, draw_center_rect.mBottom, 0.f);
|
||||
index++;
|
||||
|
||||
uv[index] = LLVector2(uv_center_rect.mRight, uv_outer_rect.mBottom);
|
||||
pos[index] = LLVector3(draw_center_rect.mRight, draw_outer_rect.mBottom, 0.f);
|
||||
index++;
|
||||
// </FS:Ansariel>
|
||||
|
||||
uv[index] = LLVector2(uv_center_rect.mRight, uv_center_rect.mBottom);
|
||||
pos[index] = LLVector3(draw_center_rect.mRight, draw_center_rect.mBottom, 0.f);
|
||||
index++;
|
||||
|
|
@ -556,6 +638,16 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
|
|||
pos[index] = LLVector3(draw_center_rect.mLeft, draw_center_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
uv[index] = LLVector2(uv_center_rect.mLeft, uv_center_rect.mTop);
|
||||
pos[index] = LLVector3(draw_center_rect.mLeft, draw_center_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
||||
uv[index] = LLVector2(uv_outer_rect.mLeft, uv_center_rect.mBottom);
|
||||
pos[index] = LLVector3(draw_outer_rect.mLeft, draw_center_rect.mBottom, 0.f);
|
||||
index++;
|
||||
// </FS:Ansariel>
|
||||
|
||||
uv[index] = LLVector2(uv_outer_rect.mLeft, uv_center_rect.mTop);
|
||||
pos[index] = LLVector3(draw_outer_rect.mLeft, draw_center_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
|
@ -573,6 +665,16 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
|
|||
pos[index] = LLVector3(draw_center_rect.mRight, draw_center_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
uv[index] = LLVector2(uv_center_rect.mRight, uv_center_rect.mTop);
|
||||
pos[index] = LLVector3(draw_center_rect.mRight, draw_center_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
||||
uv[index] = LLVector2(uv_center_rect.mLeft, uv_center_rect.mBottom);
|
||||
pos[index] = LLVector3(draw_center_rect.mLeft, draw_center_rect.mBottom, 0.f);
|
||||
index++;
|
||||
// </FS:Ansariel>
|
||||
|
||||
uv[index] = LLVector2(uv_center_rect.mLeft, uv_center_rect.mTop);
|
||||
pos[index] = LLVector3(draw_center_rect.mLeft, draw_center_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
|
@ -590,6 +692,16 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
|
|||
pos[index] = LLVector3(draw_outer_rect.mRight, draw_center_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
uv[index] = LLVector2(uv_outer_rect.mRight, uv_center_rect.mTop);
|
||||
pos[index] = LLVector3(draw_outer_rect.mRight, draw_center_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
||||
uv[index] = LLVector2(uv_center_rect.mRight, uv_center_rect.mBottom);
|
||||
pos[index] = LLVector3(draw_center_rect.mRight, draw_center_rect.mBottom, 0.f);
|
||||
index++;
|
||||
// </FS:Ansariel>
|
||||
|
||||
uv[index] = LLVector2(uv_center_rect.mRight, uv_center_rect.mTop);
|
||||
pos[index] = LLVector3(draw_center_rect.mRight, draw_center_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
|
@ -607,6 +719,16 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
|
|||
pos[index] = LLVector3(draw_center_rect.mLeft, draw_outer_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
uv[index] = LLVector2(uv_center_rect.mLeft, uv_outer_rect.mTop);
|
||||
pos[index] = LLVector3(draw_center_rect.mLeft, draw_outer_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
||||
uv[index] = LLVector2(uv_outer_rect.mLeft, uv_center_rect.mTop);
|
||||
pos[index] = LLVector3(draw_outer_rect.mLeft, draw_center_rect.mTop, 0.f);
|
||||
index++;
|
||||
// </FS:Ansariel>
|
||||
|
||||
uv[index] = LLVector2(uv_outer_rect.mLeft, uv_outer_rect.mTop);
|
||||
pos[index] = LLVector3(draw_outer_rect.mLeft, draw_outer_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
|
@ -624,6 +746,16 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
|
|||
pos[index] = LLVector3(draw_center_rect.mRight, draw_outer_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
uv[index] = LLVector2(uv_center_rect.mRight, uv_outer_rect.mTop);
|
||||
pos[index] = LLVector3(draw_center_rect.mRight, draw_outer_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
||||
uv[index] = LLVector2(uv_center_rect.mLeft, uv_center_rect.mTop);
|
||||
pos[index] = LLVector3(draw_center_rect.mLeft, draw_center_rect.mTop, 0.f);
|
||||
index++;
|
||||
// </FS:Ansariel>
|
||||
|
||||
uv[index] = LLVector2(uv_center_rect.mLeft, uv_outer_rect.mTop);
|
||||
pos[index] = LLVector3(draw_center_rect.mLeft, draw_outer_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
|
@ -641,6 +773,16 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
|
|||
pos[index] = LLVector3(draw_outer_rect.mRight, draw_outer_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
uv[index] = LLVector2(uv_outer_rect.mRight, uv_outer_rect.mTop);
|
||||
pos[index] = LLVector3(draw_outer_rect.mRight, draw_outer_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
||||
uv[index] = LLVector2(uv_center_rect.mRight, uv_center_rect.mTop);
|
||||
pos[index] = LLVector3(draw_center_rect.mRight, draw_center_rect.mTop, 0.f);
|
||||
index++;
|
||||
// </FS:Ansariel>
|
||||
|
||||
uv[index] = LLVector2(uv_center_rect.mRight, uv_outer_rect.mTop);
|
||||
pos[index] = LLVector3(draw_center_rect.mRight, draw_outer_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
|
@ -691,11 +833,17 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre
|
|||
|
||||
if (degrees == 0.f)
|
||||
{
|
||||
const S32 NUM_VERTICES = 4; // 9 quads
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//const S32 NUM_VERTICES = 4; // 9 quads
|
||||
const S32 NUM_VERTICES = 6; // 9 quads
|
||||
// </FS:Ansariel>
|
||||
LLVector2 uv[NUM_VERTICES];
|
||||
LLVector3 pos[NUM_VERTICES];
|
||||
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
gGL.begin(LLRender::TRIANGLES);
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
LLVector3 ui_scale = gGL.getUIScale();
|
||||
LLVector3 ui_translation = gGL.getUITranslation();
|
||||
|
|
@ -718,6 +866,16 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre
|
|||
pos[index] = LLVector3(ui_translation.mV[VX], ui_translation.mV[VY], 0.f);
|
||||
index++;
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
uv[index] = LLVector2(uv_rect.mLeft, uv_rect.mBottom);
|
||||
pos[index] = LLVector3(ui_translation.mV[VX], ui_translation.mV[VY], 0.f);
|
||||
index++;
|
||||
|
||||
uv[index] = LLVector2(uv_rect.mRight, uv_rect.mTop);
|
||||
pos[index] = LLVector3(ui_translation.mV[VX] + scaled_width, ui_translation.mV[VY] + scaled_height, 0.f);
|
||||
index++;
|
||||
// </FS:Ansariel>
|
||||
|
||||
uv[index] = LLVector2(uv_rect.mRight, uv_rect.mBottom);
|
||||
pos[index] = LLVector3(ui_translation.mV[VX] + scaled_width, ui_translation.mV[VY], 0.f);
|
||||
index++;
|
||||
|
|
@ -749,27 +907,56 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre
|
|||
|
||||
gGL.color4fv(color.mV);
|
||||
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
//{
|
||||
// LLVector3 v;
|
||||
|
||||
// v = LLVector3(offset_x, offset_y, 0.f) * quat;
|
||||
// gGL.texCoord2f(uv_rect.mRight, uv_rect.mTop);
|
||||
// gGL.vertex2f(v.mV[0], v.mV[1] );
|
||||
|
||||
// v = LLVector3(-offset_x, offset_y, 0.f) * quat;
|
||||
// gGL.texCoord2f(uv_rect.mLeft, uv_rect.mTop);
|
||||
// gGL.vertex2f(v.mV[0], v.mV[1] );
|
||||
|
||||
// v = LLVector3(-offset_x, -offset_y, 0.f) * quat;
|
||||
// gGL.texCoord2f(uv_rect.mLeft, uv_rect.mBottom);
|
||||
// gGL.vertex2f(v.mV[0], v.mV[1] );
|
||||
|
||||
// v = LLVector3(offset_x, -offset_y, 0.f) * quat;
|
||||
// gGL.texCoord2f(uv_rect.mRight, uv_rect.mBottom);
|
||||
// gGL.vertex2f(v.mV[0], v.mV[1] );
|
||||
//}
|
||||
//gGL.end();
|
||||
gGL.begin(LLRender::TRIANGLES);
|
||||
{
|
||||
LLVector3 v;
|
||||
LLVector3 v1 = LLVector3(offset_x, offset_y, 0.f) * quat;
|
||||
LLVector3 v2 = LLVector3(-offset_x, offset_y, 0.f) * quat;
|
||||
LLVector3 v3 = LLVector3(-offset_x, -offset_y, 0.f) * quat;
|
||||
LLVector3 v4 = LLVector3(offset_x, -offset_y, 0.f) * quat;
|
||||
|
||||
v = LLVector3(offset_x, offset_y, 0.f) * quat;
|
||||
gGL.texCoord2f(uv_rect.mRight, uv_rect.mTop);
|
||||
gGL.vertex2f(v.mV[0], v.mV[1] );
|
||||
gGL.vertex2f(v1.mV[0], v1.mV[1] );
|
||||
|
||||
v = LLVector3(-offset_x, offset_y, 0.f) * quat;
|
||||
gGL.texCoord2f(uv_rect.mLeft, uv_rect.mTop);
|
||||
gGL.vertex2f(v.mV[0], v.mV[1] );
|
||||
gGL.vertex2f(v2.mV[0], v2.mV[1] );
|
||||
|
||||
v = LLVector3(-offset_x, -offset_y, 0.f) * quat;
|
||||
gGL.texCoord2f(uv_rect.mLeft, uv_rect.mBottom);
|
||||
gGL.vertex2f(v.mV[0], v.mV[1] );
|
||||
gGL.vertex2f(v3.mV[0], v3.mV[1] );
|
||||
|
||||
|
||||
gGL.texCoord2f(uv_rect.mLeft, uv_rect.mBottom);
|
||||
gGL.vertex2f(v3.mV[0], v3.mV[1] );
|
||||
|
||||
gGL.texCoord2f(uv_rect.mRight, uv_rect.mTop);
|
||||
gGL.vertex2f(v1.mV[0], v1.mV[1] );
|
||||
|
||||
v = LLVector3(offset_x, -offset_y, 0.f) * quat;
|
||||
gGL.texCoord2f(uv_rect.mRight, uv_rect.mBottom);
|
||||
gGL.vertex2f(v.mV[0], v.mV[1] );
|
||||
gGL.vertex2f(v4.mV[0], v4.mV[1] );
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
gGL.popUIMatrix();
|
||||
}
|
||||
}
|
||||
|
|
@ -1058,8 +1245,24 @@ void gl_washer_segment_2d(F32 outer_radius, F32 inner_radius, F32 start_radians,
|
|||
|
||||
void gl_rect_2d_simple_tex( S32 width, S32 height )
|
||||
{
|
||||
gGL.begin( LLRender::QUADS );
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin( LLRender::QUADS );
|
||||
|
||||
// gGL.texCoord2f(1.f, 1.f);
|
||||
// gGL.vertex2i(width, height);
|
||||
|
||||
// gGL.texCoord2f(0.f, 1.f);
|
||||
// gGL.vertex2i(0, height);
|
||||
|
||||
// gGL.texCoord2f(0.f, 0.f);
|
||||
// gGL.vertex2i(0, 0);
|
||||
|
||||
// gGL.texCoord2f(1.f, 0.f);
|
||||
// gGL.vertex2i(width, 0);
|
||||
//
|
||||
//gGL.end();
|
||||
gGL.begin( LLRender::TRIANGLES );
|
||||
{
|
||||
gGL.texCoord2f(1.f, 1.f);
|
||||
gGL.vertex2i(width, height);
|
||||
|
||||
|
|
@ -1069,20 +1272,41 @@ void gl_rect_2d_simple_tex( S32 width, S32 height )
|
|||
gGL.texCoord2f(0.f, 0.f);
|
||||
gGL.vertex2i(0, 0);
|
||||
|
||||
|
||||
gGL.texCoord2f(0.f, 0.f);
|
||||
gGL.vertex2i(0, 0);
|
||||
|
||||
gGL.texCoord2f(1.f, 1.f);
|
||||
gGL.vertex2i(width, height);
|
||||
|
||||
gGL.texCoord2f(1.f, 0.f);
|
||||
gGL.vertex2i(width, 0);
|
||||
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
void gl_rect_2d_simple( S32 width, S32 height )
|
||||
{
|
||||
gGL.begin( LLRender::QUADS );
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin( LLRender::QUADS );
|
||||
// gGL.vertex2i(width, height);
|
||||
// gGL.vertex2i(0, height);
|
||||
// gGL.vertex2i(0, 0);
|
||||
// gGL.vertex2i(width, 0);
|
||||
//gGL.end();
|
||||
gGL.begin( LLRender::TRIANGLES );
|
||||
{
|
||||
gGL.vertex2i(width, height);
|
||||
gGL.vertex2i(0, height);
|
||||
gGL.vertex2i(0, 0);
|
||||
|
||||
gGL.vertex2i(0, 0);
|
||||
gGL.vertex2i(width, height);
|
||||
gGL.vertex2i(width, 0);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_RENDER_SEGMENTED_RECT ("Render segmented rectangle");
|
||||
|
|
@ -1123,7 +1347,10 @@ void gl_segmented_rect_2d_tex(const S32 left,
|
|||
LLVector2 width_vec((F32)width, 0.f);
|
||||
LLVector2 height_vec(0.f, (F32)height);
|
||||
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
gGL.begin(LLRender::TRIANGLES);
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
// draw bottom left
|
||||
gGL.texCoord2f(0.f, 0.f);
|
||||
|
|
@ -1135,6 +1362,14 @@ void gl_segmented_rect_2d_tex(const S32 left,
|
|||
gGL.texCoord2f(border_uv_scale.mV[VX], border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((border_width_left + border_height_bottom).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((border_width_left + border_height_bottom).mV);
|
||||
|
||||
gGL.texCoord2f(0.f, 0.f);
|
||||
gGL.vertex2f(0.f, 0.f);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(0.f, border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv(border_height_bottom.mV);
|
||||
|
||||
|
|
@ -1148,6 +1383,14 @@ void gl_segmented_rect_2d_tex(const S32 left,
|
|||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((width_vec - border_width_right + border_height_bottom).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((width_vec - border_width_right + border_height_bottom).mV);
|
||||
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], 0.f);
|
||||
gGL.vertex2fv(border_width_left.mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((border_width_left + border_height_bottom).mV);
|
||||
|
||||
|
|
@ -1161,6 +1404,14 @@ void gl_segmented_rect_2d_tex(const S32 left,
|
|||
gGL.texCoord2f(1.f, border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((width_vec + border_height_bottom).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(1.f, border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((width_vec + border_height_bottom).mV);
|
||||
|
||||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], 0.f);
|
||||
gGL.vertex2fv((width_vec - border_width_right).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((width_vec - border_width_right + border_height_bottom).mV);
|
||||
|
||||
|
|
@ -1174,6 +1425,14 @@ void gl_segmented_rect_2d_tex(const S32 left,
|
|||
gGL.texCoord2f(border_uv_scale.mV[VX], 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((border_width_left + height_vec - border_height_top).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((border_width_left + height_vec - border_height_top).mV);
|
||||
|
||||
gGL.texCoord2f(0.f, border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv(border_height_bottom.mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(0.f, 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((height_vec - border_height_top).mV);
|
||||
|
||||
|
|
@ -1187,6 +1446,14 @@ void gl_segmented_rect_2d_tex(const S32 left,
|
|||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((width_vec - border_width_right + height_vec - border_height_top).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((width_vec - border_width_right + height_vec - border_height_top).mV);
|
||||
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((border_width_left + border_height_bottom).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((border_width_left + height_vec - border_height_top).mV);
|
||||
|
||||
|
|
@ -1200,6 +1467,14 @@ void gl_segmented_rect_2d_tex(const S32 left,
|
|||
gGL.texCoord2f(1.f, 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((width_vec + height_vec - border_height_top).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(1.f, 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((width_vec + height_vec - border_height_top).mV);
|
||||
|
||||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((width_vec - border_width_right + border_height_bottom).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((width_vec - border_width_right + height_vec - border_height_top).mV);
|
||||
|
||||
|
|
@ -1213,6 +1488,14 @@ void gl_segmented_rect_2d_tex(const S32 left,
|
|||
gGL.texCoord2f(border_uv_scale.mV[VX], 1.f);
|
||||
gGL.vertex2fv((border_width_left + height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], 1.f);
|
||||
gGL.vertex2fv((border_width_left + height_vec).mV);
|
||||
|
||||
gGL.texCoord2f(0.f, 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((height_vec - border_height_top).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(0.f, 1.f);
|
||||
gGL.vertex2fv((height_vec).mV);
|
||||
|
||||
|
|
@ -1226,6 +1509,14 @@ void gl_segmented_rect_2d_tex(const S32 left,
|
|||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], 1.f);
|
||||
gGL.vertex2fv((width_vec - border_width_right + height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], 1.f);
|
||||
gGL.vertex2fv((width_vec - border_width_right + height_vec).mV);
|
||||
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((border_width_left + height_vec - border_height_top).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], 1.f);
|
||||
gGL.vertex2fv((border_width_left + height_vec).mV);
|
||||
|
||||
|
|
@ -1239,6 +1530,14 @@ void gl_segmented_rect_2d_tex(const S32 left,
|
|||
gGL.texCoord2f(1.f, 1.f);
|
||||
gGL.vertex2fv((width_vec + height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(1.f, 1.f);
|
||||
gGL.vertex2fv((width_vec + height_vec).mV);
|
||||
|
||||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((width_vec - border_width_right + height_vec - border_height_top).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], 1.f);
|
||||
gGL.vertex2fv((width_vec - border_width_right + height_vec).mV);
|
||||
}
|
||||
|
|
@ -1293,7 +1592,10 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect,
|
|||
LLVector2 x_min;
|
||||
LLVector2 x_max;
|
||||
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
gGL.begin(LLRender::TRIANGLES);
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
if (start_fragment < middle_start)
|
||||
{
|
||||
|
|
@ -1312,6 +1614,14 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect,
|
|||
gGL.texCoord2f(u_max, border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_max + border_height_bottom).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(u_max, border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_max + border_height_bottom).mV);
|
||||
|
||||
gGL.texCoord2f(u_min, 0.f);
|
||||
gGL.vertex2fv(x_min.mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(u_min, border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_min + border_height_bottom).mV);
|
||||
|
||||
|
|
@ -1325,6 +1635,14 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect,
|
|||
gGL.texCoord2f(u_max, 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_max + height_vec - border_height_top).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(u_max, 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_max + height_vec - border_height_top).mV);
|
||||
|
||||
gGL.texCoord2f(u_min, border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_min + border_height_bottom).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(u_min, 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_min + height_vec - border_height_top).mV);
|
||||
|
||||
|
|
@ -1338,6 +1656,14 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect,
|
|||
gGL.texCoord2f(u_max, 1.f);
|
||||
gGL.vertex2fv((x_max + height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(u_max, 1.f);
|
||||
gGL.vertex2fv((x_max + height_vec).mV);
|
||||
|
||||
gGL.texCoord2f(u_min, 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_min + height_vec - border_height_top).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(u_min, 1.f);
|
||||
gGL.vertex2fv((x_min + height_vec).mV);
|
||||
}
|
||||
|
|
@ -1357,6 +1683,14 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect,
|
|||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_max + border_height_bottom).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_max + border_height_bottom).mV);
|
||||
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], 0.f);
|
||||
gGL.vertex2fv(x_min.mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_min + border_height_bottom).mV);
|
||||
|
||||
|
|
@ -1370,6 +1704,14 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect,
|
|||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_max + height_vec - border_height_top).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_max + height_vec - border_height_top).mV);
|
||||
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_min + border_height_bottom).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_min + height_vec - border_height_top).mV);
|
||||
|
||||
|
|
@ -1383,6 +1725,14 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect,
|
|||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], 1.f);
|
||||
gGL.vertex2fv((x_max + height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], 1.f);
|
||||
gGL.vertex2fv((x_max + height_vec).mV);
|
||||
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_min + height_vec - border_height_top).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], 1.f);
|
||||
gGL.vertex2fv((x_min + height_vec).mV);
|
||||
}
|
||||
|
|
@ -1404,6 +1754,14 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect,
|
|||
gGL.texCoord2f(u_max, border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_max + border_height_bottom).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(u_max, border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_max + border_height_bottom).mV);
|
||||
|
||||
gGL.texCoord2f(u_min, 0.f);
|
||||
gGL.vertex2fv((x_min).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(u_min, border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_min + border_height_bottom).mV);
|
||||
|
||||
|
|
@ -1417,6 +1775,14 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect,
|
|||
gGL.texCoord2f(u_max, 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_max + height_vec - border_height_top).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(u_max, 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_max + height_vec - border_height_top).mV);
|
||||
|
||||
gGL.texCoord2f(u_min, border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_min + border_height_bottom).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(u_min, 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_min + height_vec - border_height_top).mV);
|
||||
|
||||
|
|
@ -1430,6 +1796,14 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect,
|
|||
gGL.texCoord2f(u_max, 1.f);
|
||||
gGL.vertex2fv((x_max + height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(u_max, 1.f);
|
||||
gGL.vertex2fv((x_max + height_vec).mV);
|
||||
|
||||
gGL.texCoord2f(u_min, 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_min + height_vec - border_height_top).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(u_min, 1.f);
|
||||
gGL.vertex2fv((x_min + height_vec).mV);
|
||||
}
|
||||
|
|
@ -1444,7 +1818,10 @@ void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv
|
|||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_SEGMENTED_RECT);
|
||||
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
gGL.begin(LLRender::TRIANGLES);
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
// draw bottom left
|
||||
gGL.texCoord2f(clip_rect.mLeft, clip_rect.mBottom);
|
||||
|
|
@ -1456,6 +1833,14 @@ void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv
|
|||
gGL.texCoord2f(center_uv_rect.mLeft, center_uv_rect.mBottom);
|
||||
gGL.vertex3fv((center_draw_rect.mLeft * width_vec + center_draw_rect.mBottom * height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(center_uv_rect.mLeft, center_uv_rect.mBottom);
|
||||
gGL.vertex3fv((center_draw_rect.mLeft * width_vec + center_draw_rect.mBottom * height_vec).mV);
|
||||
|
||||
gGL.texCoord2f(clip_rect.mLeft, clip_rect.mBottom);
|
||||
gGL.vertex3f(0.f, 0.f, 0.f);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(clip_rect.mLeft, center_uv_rect.mBottom);
|
||||
gGL.vertex3fv((center_draw_rect.mBottom * height_vec).mV);
|
||||
|
||||
|
|
@ -1469,6 +1854,14 @@ void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv
|
|||
gGL.texCoord2f(center_uv_rect.mRight, center_uv_rect.mBottom);
|
||||
gGL.vertex3fv((center_draw_rect.mRight * width_vec + center_draw_rect.mBottom * height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(center_uv_rect.mRight, center_uv_rect.mBottom);
|
||||
gGL.vertex3fv((center_draw_rect.mRight * width_vec + center_draw_rect.mBottom * height_vec).mV);
|
||||
|
||||
gGL.texCoord2f(center_uv_rect.mLeft, clip_rect.mBottom);
|
||||
gGL.vertex3fv((center_draw_rect.mLeft * width_vec).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(center_uv_rect.mLeft, center_uv_rect.mBottom);
|
||||
gGL.vertex3fv((center_draw_rect.mLeft * width_vec + center_draw_rect.mBottom * height_vec).mV);
|
||||
|
||||
|
|
@ -1482,6 +1875,14 @@ void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv
|
|||
gGL.texCoord2f(clip_rect.mRight, center_uv_rect.mBottom);
|
||||
gGL.vertex3fv((width_vec + center_draw_rect.mBottom * height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(clip_rect.mRight, center_uv_rect.mBottom);
|
||||
gGL.vertex3fv((width_vec + center_draw_rect.mBottom * height_vec).mV);
|
||||
|
||||
gGL.texCoord2f(center_uv_rect.mRight, clip_rect.mBottom);
|
||||
gGL.vertex3fv((center_draw_rect.mRight * width_vec).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(center_uv_rect.mRight, center_uv_rect.mBottom);
|
||||
gGL.vertex3fv((center_draw_rect.mRight * width_vec + center_draw_rect.mBottom * height_vec).mV);
|
||||
|
||||
|
|
@ -1495,6 +1896,14 @@ void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv
|
|||
gGL.texCoord2f(center_uv_rect.mLeft, center_uv_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mLeft * width_vec + center_draw_rect.mTop * height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(center_uv_rect.mLeft, center_uv_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mLeft * width_vec + center_draw_rect.mTop * height_vec).mV);
|
||||
|
||||
gGL.texCoord2f(clip_rect.mLeft, center_uv_rect.mBottom);
|
||||
gGL.vertex3fv((center_draw_rect.mBottom * height_vec).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(clip_rect.mLeft, center_uv_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mTop * height_vec).mV);
|
||||
|
||||
|
|
@ -1508,6 +1917,14 @@ void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv
|
|||
gGL.texCoord2f(center_uv_rect.mRight, center_uv_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mRight * width_vec + center_draw_rect.mTop * height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(center_uv_rect.mRight, center_uv_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mRight * width_vec + center_draw_rect.mTop * height_vec).mV);
|
||||
|
||||
gGL.texCoord2f(center_uv_rect.mLeft, center_uv_rect.mBottom);
|
||||
gGL.vertex3fv((center_draw_rect.mLeft * width_vec + center_draw_rect.mBottom * height_vec).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(center_uv_rect.mLeft, center_uv_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mLeft * width_vec + center_draw_rect.mTop * height_vec).mV);
|
||||
|
||||
|
|
@ -1521,6 +1938,14 @@ void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv
|
|||
gGL.texCoord2f(clip_rect.mRight, center_uv_rect.mTop);
|
||||
gGL.vertex3fv((width_vec + center_draw_rect.mTop * height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(clip_rect.mRight, center_uv_rect.mTop);
|
||||
gGL.vertex3fv((width_vec + center_draw_rect.mTop * height_vec).mV);
|
||||
|
||||
gGL.texCoord2f(center_uv_rect.mRight, center_uv_rect.mBottom);
|
||||
gGL.vertex3fv((center_draw_rect.mRight * width_vec + center_draw_rect.mBottom * height_vec).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(center_uv_rect.mRight, center_uv_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mRight * width_vec + center_draw_rect.mTop * height_vec).mV);
|
||||
|
||||
|
|
@ -1534,6 +1959,14 @@ void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv
|
|||
gGL.texCoord2f(center_uv_rect.mLeft, clip_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mLeft * width_vec + height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(center_uv_rect.mLeft, clip_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mLeft * width_vec + height_vec).mV);
|
||||
|
||||
gGL.texCoord2f(clip_rect.mLeft, center_uv_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mTop * height_vec).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(clip_rect.mLeft, clip_rect.mTop);
|
||||
gGL.vertex3fv((height_vec).mV);
|
||||
|
||||
|
|
@ -1547,6 +1980,14 @@ void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv
|
|||
gGL.texCoord2f(center_uv_rect.mRight, clip_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mRight * width_vec + height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(center_uv_rect.mRight, clip_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mRight * width_vec + height_vec).mV);
|
||||
|
||||
gGL.texCoord2f(center_uv_rect.mLeft, center_uv_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mLeft * width_vec + center_draw_rect.mTop * height_vec).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(center_uv_rect.mLeft, clip_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mLeft * width_vec + height_vec).mV);
|
||||
|
||||
|
|
@ -1560,6 +2001,14 @@ void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv
|
|||
gGL.texCoord2f(clip_rect.mRight, clip_rect.mTop);
|
||||
gGL.vertex3fv((width_vec + height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(clip_rect.mRight, clip_rect.mTop);
|
||||
gGL.vertex3fv((width_vec + height_vec).mV);
|
||||
|
||||
gGL.texCoord2f(center_uv_rect.mRight, center_uv_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mRight * width_vec + center_draw_rect.mTop * height_vec).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(center_uv_rect.mRight, clip_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mRight * width_vec + height_vec).mV);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -368,7 +368,7 @@ U32 LLVertexBuffer::sGLMode[LLRender::NUM_MODES] =
|
|||
GL_POINTS,
|
||||
GL_LINES,
|
||||
GL_LINE_STRIP,
|
||||
GL_QUADS,
|
||||
//GL_QUADS, // <FS:Ansariel> Remove QUADS rendering mode
|
||||
GL_LINE_LOOP,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -202,16 +202,28 @@ void renderBadgeBackground(F32 centerX, F32 centerY, F32 width, F32 height, cons
|
|||
ll_round(y) + height);
|
||||
|
||||
LLVector3 vertices[4];
|
||||
vertices[0] = LLVector3(screen_rect.mRight, screen_rect.mTop, 1.0f);
|
||||
vertices[1] = LLVector3(screen_rect.mLeft, screen_rect.mTop, 1.0f);
|
||||
// <FS:Ansariel> 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);
|
||||
vertices[3] = LLVector3(screen_rect.mRight, screen_rect.mBottom, 1.0f);
|
||||
|
||||
gGL.begin(LLRender::QUADS);
|
||||
gGL.begin(LLRender::TRIANGLE_STRIP);
|
||||
{
|
||||
gGL.vertexBatchPreTransformed(vertices, 4);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.popUIMatrix();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -519,7 +519,10 @@ void LLStatBar::draw()
|
|||
max_value = 0.f;
|
||||
|
||||
gGL.color4f(1.f, 0.f, 0.f, 1.f);
|
||||
gGL.begin( LLRender::QUADS );
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin( LLRender::QUADS );
|
||||
gGL.begin( LLRender::TRIANGLES );
|
||||
// </FS:Ansariel>
|
||||
const S32 max_frame = llmin(num_frames, num_values);
|
||||
U32 num_samples = 0;
|
||||
for (S32 i = 1; i <= max_frame; i++)
|
||||
|
|
@ -559,17 +562,35 @@ void LLStatBar::draw()
|
|||
F32 max = llmax(min + 1, (max_value - mCurMinBar) * value_scale);
|
||||
if (mOrientation == HORIZONTAL)
|
||||
{
|
||||
// <FS:Ansariel> 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);
|
||||
|
||||
gGL.vertex2f((F32)bar_rect.mRight - offset - 1, min);
|
||||
gGL.vertex2f((F32)bar_rect.mRight - offset, max);
|
||||
gGL.vertex2f((F32)bar_rect.mRight - offset - 1, max);
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
else
|
||||
{
|
||||
// <FS:Ansariel> 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(max, (F32)bar_rect.mBottom + offset);
|
||||
gGL.vertex2f(min, (F32)bar_rect.mBottom + offset + 1);
|
||||
gGL.vertex2f(max, (F32)bar_rect.mBottom + offset + 1 );
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
}
|
||||
gGL.end();
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ void AnimationExplorer::draw()
|
|||
|
||||
gGL.color3f(1.0f, 1.0f, 1.0f);
|
||||
gGL.getTexUnit(0)->bind(mAnimationPreview);
|
||||
gGL.begin(LLRender::QUADS);
|
||||
gGL.begin(LLRender::TRIANGLES);
|
||||
{
|
||||
gGL.texCoord2f(0.0f, 1.0f);
|
||||
gGL.vertex2i(r.mLeft, r.mTop);
|
||||
|
|
@ -248,6 +248,11 @@ void AnimationExplorer::draw()
|
|||
gGL.vertex2i(r.mLeft, r.mBottom);
|
||||
gGL.texCoord2f(1.0f, 0.0f);
|
||||
gGL.vertex2i(r.mRight, r.mBottom);
|
||||
|
||||
gGL.texCoord2f(0.0f, 1.0f);
|
||||
gGL.vertex2i(r.mLeft, r.mTop);
|
||||
gGL.texCoord2f(1.0f, 0.0f);
|
||||
gGL.vertex2i(r.mRight, r.mBottom);
|
||||
gGL.texCoord2f(1.0f, 1.0f);
|
||||
gGL.vertex2i(r.mRight, r.mTop);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ void lggBeamColorMapFloater::draw()
|
|||
{
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
LLGLEnable(GL_CULL_FACE);
|
||||
gGL.begin(LLRender::QUADS);
|
||||
gGL.begin(LLRender::TRIANGLE_STRIP);
|
||||
{
|
||||
F32 r = bColor.mV[0];
|
||||
F32 g = bColor.mV[1];
|
||||
|
|
@ -74,31 +74,24 @@ void lggBeamColorMapFloater::draw()
|
|||
|
||||
gGL.color4f(r, g, b, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mTop);
|
||||
gGL.color4f(r, g, b, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
gGL.color4f(r, g, b, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mTop);
|
||||
gGL.color4f(r, g, b, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
|
||||
gGL.color4f(r, g, b, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom);
|
||||
gGL.color4f(r, g, b, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.color4f(r, g, b, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mBottom);
|
||||
gGL.color4f(r, g, b, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.color4f(r, g, b, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mTop);
|
||||
|
||||
gGL.color4f(r, g, b, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
gGL.color4f(r, g, b, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mTop);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom);
|
||||
|
||||
gGL.color4f(r, g, b, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.color4f(r, g, b, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom);
|
||||
gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
}
|
||||
gGL.end();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,35 +43,28 @@ void lggBeamMapFloater::draw()
|
|||
{
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
LLGLEnable(GL_CULL_FACE);
|
||||
gGL.begin(LLRender::QUADS);
|
||||
gGL.begin(LLRender::TRIANGLE_STRIP);
|
||||
{
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mTop);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mTop);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom);
|
||||
gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
}
|
||||
gGL.end();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,17 +76,37 @@ void LLBox::renderface(S32 which_face)
|
|||
{7, 4, 0, 3}
|
||||
};
|
||||
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> 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,0);
|
||||
gGL.texCoord2f(1, 0);
|
||||
gGL.vertex3fv(&mVertex[ faces[which_face][0] ][0]);
|
||||
gGL.texCoord2f(1,1);
|
||||
gGL.texCoord2f(1, 1);
|
||||
gGL.vertex3fv(&mVertex[ faces[which_face][1] ][0]);
|
||||
gGL.texCoord2f(0,1);
|
||||
gGL.texCoord2f(0, 1);
|
||||
gGL.vertex3fv(&mVertex[ faces[which_face][2] ][0]);
|
||||
gGL.texCoord2f(0,0);
|
||||
|
||||
gGL.texCoord2f(0, 1);
|
||||
gGL.vertex3fv(&mVertex[ faces[which_face][2] ][0]);
|
||||
gGL.texCoord2f(1, 0);
|
||||
gGL.vertex3fv(&mVertex[ faces[which_face][0] ][0]);
|
||||
gGL.texCoord2f(0, 0);
|
||||
gGL.vertex3fv(&mVertex[ faces[which_face][3] ][0]);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
void LLBox::render()
|
||||
|
|
|
|||
|
|
@ -531,37 +531,63 @@ void LLFloaterAvatarPicker::drawFrustum()
|
|||
{
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
LLGLEnable(GL_CULL_FACE);
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
//{
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(origin_rect.mLeft, origin_rect.mTop);
|
||||
// gGL.vertex2i(origin_rect.mRight, origin_rect.mTop);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(origin_rect.mLeft, origin_rect.mBottom);
|
||||
// gGL.vertex2i(origin_rect.mLeft, origin_rect.mTop);
|
||||
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(origin_rect.mRight, origin_rect.mTop);
|
||||
// gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom);
|
||||
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom);
|
||||
// gGL.vertex2i(origin_rect.mLeft, origin_rect.mBottom);
|
||||
//}
|
||||
//gGL.end();
|
||||
gGL.begin(LLRender::TRIANGLE_STRIP);
|
||||
{
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mLeft, origin_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mRight, origin_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mLeft, origin_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mLeft, origin_rect.mTop);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mRight, origin_rect.mTop);
|
||||
gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom);
|
||||
gGL.vertex2i(origin_rect.mLeft, origin_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
if (gFocusMgr.childHasMouseCapture(getDragHandle()))
|
||||
|
|
|
|||
|
|
@ -529,7 +529,20 @@ void LLFloaterBvhPreview::draw()
|
|||
// </FS>
|
||||
gGL.color3f(1.f, 1.f, 1.f);
|
||||
gGL.getTexUnit(0)->bind(mAnimPreview);
|
||||
gGL.begin( LLRender::QUADS );
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin( LLRender::QUADS );
|
||||
//{
|
||||
// gGL.texCoord2f(0.f, 1.f);
|
||||
// gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
|
||||
// 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);
|
||||
//}
|
||||
//gGL.end();
|
||||
gGL.begin( LLRender::TRIANGLES );
|
||||
{
|
||||
gGL.texCoord2f(0.f, 1.f);
|
||||
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
|
||||
|
|
@ -537,10 +550,16 @@ void LLFloaterBvhPreview::draw()
|
|||
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, 0.f);
|
||||
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
|
||||
gGL.texCoord2f(0.f, 1.f);
|
||||
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
|
||||
gGL.texCoord2f(1.f, 1.f);
|
||||
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
// <FS> Preview on own avatar
|
||||
//LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar();
|
||||
|
|
|
|||
|
|
@ -506,37 +506,63 @@ void LLFloaterColorPicker::draw()
|
|||
{
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
LLGLEnable(GL_CULL_FACE);
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
//{
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mTop);
|
||||
// gGL.vertex2i(swatch_rect.mRight, swatch_rect.mTop);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mBottom);
|
||||
// gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mTop);
|
||||
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(swatch_rect.mRight, swatch_rect.mTop);
|
||||
// gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom);
|
||||
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom);
|
||||
// gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mBottom);
|
||||
//}
|
||||
//gGL.end();
|
||||
gGL.begin(LLRender::TRIANGLE_STRIP);
|
||||
{
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mTop);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mTop);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom);
|
||||
gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
if (gFocusMgr.childHasMouseCapture(getDragHandle()))
|
||||
|
|
|
|||
|
|
@ -85,37 +85,63 @@ void LLFloaterExperiencePicker::drawFrustum()
|
|||
{
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
LLGLEnable(GL_CULL_FACE);
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
//{
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(origin_rect.mLeft, origin_rect.mTop);
|
||||
// gGL.vertex2i(origin_rect.mRight, origin_rect.mTop);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(origin_rect.mLeft, origin_rect.mBottom);
|
||||
// gGL.vertex2i(origin_rect.mLeft, origin_rect.mTop);
|
||||
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(origin_rect.mRight, origin_rect.mTop);
|
||||
// gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom);
|
||||
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom);
|
||||
// gGL.vertex2i(origin_rect.mLeft, origin_rect.mBottom);
|
||||
//}
|
||||
//gGL.end();
|
||||
gGL.begin(LLRender::TRIANGLE_STRIP);
|
||||
{
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mLeft, origin_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mRight, origin_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mLeft, origin_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mLeft, origin_rect.mTop);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mRight, origin_rect.mTop);
|
||||
gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom);
|
||||
gGL.vertex2i(origin_rect.mLeft, origin_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
if (gFocusMgr.childHasMouseCapture(getDragHandle()))
|
||||
|
|
|
|||
|
|
@ -283,7 +283,20 @@ void LLFloaterImagePreview::draw()
|
|||
}
|
||||
|
||||
gGL.color3f(1.f, 1.f, 1.f);
|
||||
gGL.begin( LLRender::QUADS );
|
||||
// <FS:Ansariel> 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();
|
||||
gGL.begin( LLRender::TRIANGLES );
|
||||
{
|
||||
gGL.texCoord2f(mPreviewImageRect.mLeft, mPreviewImageRect.mTop);
|
||||
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
|
||||
|
|
@ -291,10 +304,16 @@ void LLFloaterImagePreview::draw()
|
|||
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.mBottom);
|
||||
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
|
||||
gGL.texCoord2f(mPreviewImageRect.mLeft, mPreviewImageRect.mTop);
|
||||
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
|
||||
gGL.texCoord2f(mPreviewImageRect.mRight, mPreviewImageRect.mTop);
|
||||
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
|
||||
|
|
@ -315,7 +334,20 @@ void LLFloaterImagePreview::draw()
|
|||
gGL.getTexUnit(0)->bind(mAvatarPreview);
|
||||
}
|
||||
|
||||
gGL.begin( LLRender::QUADS );
|
||||
// <FS:Ansariel> 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.texCoord2f(0.f, 1.f);
|
||||
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
|
||||
|
|
@ -323,10 +355,16 @@ void LLFloaterImagePreview::draw()
|
|||
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, 0.f);
|
||||
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
|
||||
gGL.texCoord2f(0.f, 1.f);
|
||||
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
|
||||
gGL.texCoord2f(1.f, 1.f);
|
||||
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -757,7 +757,20 @@ void LLFloaterModelPreview::draw()
|
|||
mPreviewRect = preview_panel->getRect();
|
||||
}
|
||||
|
||||
gGL.begin( LLRender::QUADS );
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin( LLRender::QUADS );
|
||||
//{
|
||||
// gGL.texCoord2f(0.f, 1.f);
|
||||
// gGL.vertex2i(mPreviewRect.mLeft, mPreviewRect.mTop-1);
|
||||
// gGL.texCoord2f(0.f, 0.f);
|
||||
// gGL.vertex2i(mPreviewRect.mLeft, mPreviewRect.mBottom);
|
||||
// gGL.texCoord2f(1.f, 0.f);
|
||||
// gGL.vertex2i(mPreviewRect.mRight-1, mPreviewRect.mBottom);
|
||||
// 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);
|
||||
gGL.vertex2i(mPreviewRect.mLeft, mPreviewRect.mTop-1);
|
||||
|
|
@ -765,10 +778,16 @@ void LLFloaterModelPreview::draw()
|
|||
gGL.vertex2i(mPreviewRect.mLeft, mPreviewRect.mBottom);
|
||||
gGL.texCoord2f(1.f, 0.f);
|
||||
gGL.vertex2i(mPreviewRect.mRight-1, mPreviewRect.mBottom);
|
||||
|
||||
gGL.texCoord2f(1.f, 0.f);
|
||||
gGL.vertex2i(mPreviewRect.mRight-1, mPreviewRect.mBottom);
|
||||
gGL.texCoord2f(0.f, 1.f);
|
||||
gGL.vertex2i(mPreviewRect.mLeft, mPreviewRect.mTop-1);
|
||||
gGL.texCoord2f(1.f, 1.f);
|
||||
gGL.vertex2i(mPreviewRect.mRight-1, mPreviewRect.mTop-1);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -409,29 +409,45 @@ void LLViewerParcelMgr::renderRect(const LLVector3d &west_south_bottom_global,
|
|||
gGL.end();
|
||||
|
||||
gGL.color4f(1.f, 1.f, 0.f, 0.2f);
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> 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(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, 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(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.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);
|
||||
gGL.vertex3f(west, north, nw_top);
|
||||
gGL.vertex3f(east, north, ne_bottom);
|
||||
gGL.vertex3f(east, north, ne_top);
|
||||
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, north, nw_top);
|
||||
gGL.vertex3f(west, north, nw_bottom);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
|
||||
LLUI::setLineWidth(1.f);
|
||||
}
|
||||
|
|
@ -573,6 +589,11 @@ void LLViewerParcelMgr::renderOneSegment(F32 x1, F32 y1, F32 x2, F32 y2, F32 hei
|
|||
|
||||
gGL.vertex3f(x2, y2, z2);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.vertex3f(x2, y2, z2);
|
||||
gGL.vertex3f(x1, y1, z);
|
||||
// </FS:Ansariel>
|
||||
|
||||
// <FS:Ansariel> FIRE-10546: Show parcel boundary up to max. build level
|
||||
//z = z2+height;
|
||||
z = absolute_height ? height : z2+height;
|
||||
|
|
@ -620,6 +641,14 @@ void LLViewerParcelMgr::renderOneSegment(F32 x1, F32 y1, F32 x2, F32 y2, F32 hei
|
|||
gGL.texCoord2f(tex_coord2*0.5f+0.5f, z*0.5f);
|
||||
gGL.vertex3f(x2, y2, z);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(tex_coord2*0.5f+0.5f, z*0.5f);
|
||||
gGL.vertex3f(x2, y2, z);
|
||||
|
||||
gGL.texCoord2f(tex_coord1*0.5f+0.5f, z1*0.5f);
|
||||
gGL.vertex3f(x1, y1, z1);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(tex_coord1*0.5f+0.5f, z*0.5f);
|
||||
gGL.vertex3f(x1, y1, z);
|
||||
}
|
||||
|
|
@ -668,7 +697,10 @@ void LLViewerParcelMgr::renderHighlightSegments(const U8* segments, LLViewerRegi
|
|||
if (!has_segments)
|
||||
{
|
||||
has_segments = true;
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
gGL.begin(LLRender::TRIANGLES);
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
// <FS:Ansariel> FIRE-10546: Show parcel boundary up to max. build level
|
||||
//renderOneSegment(x1, y1, x2, y2, PARCEL_POST_HEIGHT, SOUTH_MASK, regionp);
|
||||
|
|
@ -687,7 +719,10 @@ void LLViewerParcelMgr::renderHighlightSegments(const U8* segments, LLViewerRegi
|
|||
if (!has_segments)
|
||||
{
|
||||
has_segments = true;
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
gGL.begin(LLRender::TRIANGLES);
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
// <FS:Ansariel> FIRE-10546: Show parcel boundary up to max. build level
|
||||
//renderOneSegment(x1, y1, x2, y2, PARCEL_POST_HEIGHT, WEST_MASK, regionp);
|
||||
|
|
@ -746,7 +781,10 @@ void LLViewerParcelMgr::renderCollisionSegments(U8* segments, BOOL use_pass, LLV
|
|||
gGL.getTexUnit(0)->bind(mBlockedImage);
|
||||
}
|
||||
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
gGL.begin(LLRender::TRIANGLES);
|
||||
// </FS:Ansariel>
|
||||
|
||||
for (y = 0; y < STRIDE; y++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -78,16 +78,35 @@ void LLHUDEffectBlob::render()
|
|||
LLVector3 u_scale = pixel_right * (F32)mPixelSize;
|
||||
LLVector3 v_scale = pixel_up * (F32)mPixelSize;
|
||||
|
||||
{ gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> 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);
|
||||
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, 0.f);
|
||||
gGL.vertex3fv((-v_scale + u_scale).mV);
|
||||
gGL.texCoord2f(0.f, 1.f);
|
||||
gGL.vertex3fv((v_scale - u_scale).mV);
|
||||
gGL.texCoord2f(1.f, 1.f);
|
||||
gGL.vertex3fv((v_scale + u_scale).mV);
|
||||
} gGL.end();
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
|
||||
} gGL.popMatrix();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -168,7 +168,20 @@ void LLHUDIcon::renderIcon(BOOL for_select)
|
|||
gGL.getTexUnit(0)->bind(mImagep);
|
||||
}
|
||||
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> 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);
|
||||
gGL.vertex3fv(upper_left.mV);
|
||||
|
|
@ -176,10 +189,16 @@ void LLHUDIcon::renderIcon(BOOL for_select)
|
|||
gGL.vertex3fv(lower_left.mV);
|
||||
gGL.texCoord2f(1.f, 0.f);
|
||||
gGL.vertex3fv(lower_right.mV);
|
||||
|
||||
gGL.texCoord2f(1.f, 0.f);
|
||||
gGL.vertex3fv(lower_right.mV);
|
||||
gGL.texCoord2f(0.f, 1.f);
|
||||
gGL.vertex3fv(upper_left.mV);
|
||||
gGL.texCoord2f(1.f, 1.f);
|
||||
gGL.vertex3fv(upper_right.mV);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
void LLHUDIcon::setImage(LLViewerTexture* imagep)
|
||||
|
|
|
|||
|
|
@ -583,7 +583,26 @@ void LLJoystickCameraRotate::drawRotatedImage( LLPointer<LLUIImage> image, S32 r
|
|||
|
||||
gGL.color4fv(UI_VERTEX_COLOR.mV);
|
||||
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> 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();
|
||||
|
|
@ -597,10 +616,18 @@ void LLJoystickCameraRotate::drawRotatedImage( LLPointer<LLUIImage> image, S32 r
|
|||
gGL.texCoord2fv( uv[ (rotations + 2) % 4]);
|
||||
gGL.vertex2i(0, 0);
|
||||
|
||||
|
||||
gGL.texCoord2fv( uv[ (rotations + 2) % 4]);
|
||||
gGL.vertex2i(0, 0);
|
||||
|
||||
gGL.texCoord2fv( uv[ (rotations + 0) % 4]);
|
||||
gGL.vertex2i(scaledWidth, scaledHeight );
|
||||
|
||||
gGL.texCoord2fv( uv[ (rotations + 3) % 4]);
|
||||
gGL.vertex2i(scaledWidth, 0);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -628,45 +628,65 @@ void LLManipScale::renderFaces( const LLBBox& bbox )
|
|||
{
|
||||
gGL.color4fv( default_normal_color.mV );
|
||||
LLGLDepthTest gls_depth(GL_FALSE);
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> 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);
|
||||
{
|
||||
// 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.vertex3f(max.mV[VX], max.mV[VY], max.mV[VZ]);
|
||||
gGL.vertex3f(min.mV[VX], max.mV[VY], min.mV[VZ]);
|
||||
gGL.vertex3f(min.mV[VX], max.mV[VY], max.mV[VZ]);
|
||||
gGL.vertex3f(min.mV[VX], min.mV[VY], min.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(min.mV[VX], max.mV[VY], max.mV[VZ]);
|
||||
gGL.vertex3f(max.mV[VX], max.mV[VY], max.mV[VZ]);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
// Find nearest vertex
|
||||
|
|
|
|||
|
|
@ -879,7 +879,10 @@ void LLMediaCtrl::draw()
|
|||
// </FS:ND>
|
||||
#endif
|
||||
// draw the browser
|
||||
gGL.begin( LLRender::QUADS );
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin( LLRender::QUADS );
|
||||
gGL.begin( LLRender::TRIANGLES );
|
||||
// </FS:Ansariel>
|
||||
if (! media_plugin->getTextureCoordsOpenGL())
|
||||
{
|
||||
// render using web browser reported width and height, instead of trying to invert GL scale
|
||||
|
|
@ -892,6 +895,14 @@ void LLMediaCtrl::draw()
|
|||
gGL.texCoord2f( 0.f, max_v );
|
||||
gGL.vertex2i( x_offset, y_offset );
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f( 0.f, max_v );
|
||||
gGL.vertex2i( x_offset, y_offset );
|
||||
|
||||
gGL.texCoord2f( max_u, 0.f );
|
||||
gGL.vertex2i( x_offset + width, y_offset + height );
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f( max_u, max_v );
|
||||
gGL.vertex2i( x_offset + width, y_offset );
|
||||
}
|
||||
|
|
@ -907,6 +918,14 @@ void LLMediaCtrl::draw()
|
|||
gGL.texCoord2f( 0.f, 0.f );
|
||||
gGL.vertex2i( x_offset, y_offset );
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f( 0.f, 0.f );
|
||||
gGL.vertex2i( x_offset, y_offset );
|
||||
|
||||
gGL.texCoord2f( max_u, max_v );
|
||||
gGL.vertex2i( x_offset + width, y_offset + height );
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f( max_u, 0.f );
|
||||
gGL.vertex2i( x_offset + width, y_offset );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -437,15 +437,22 @@ void LLNetMap::draw()
|
|||
if (pRegionImage && pRegionImage->hasGLTexture())
|
||||
{
|
||||
gGL.getTexUnit(0)->bind(pRegionImage);
|
||||
gGL.begin(LLRender::QUADS);
|
||||
gGL.begin(LLRender::TRIANGLES);
|
||||
{
|
||||
gGL.texCoord2f(0.f, 1.f);
|
||||
gGL.vertex2f(local_left, local_top);
|
||||
gGL.texCoord2f(0.f, 0.f);
|
||||
gGL.vertex2f(local_left, local_bottom);
|
||||
gGL.texCoord2f(1.f, 0.f);
|
||||
gGL.vertex2f(local_right, local_bottom);
|
||||
|
||||
gGL.texCoord2f(0.f, 1.f);
|
||||
gGL.vertex2f(local_left, local_top);
|
||||
gGL.texCoord2f(1.f, 0.f);
|
||||
gGL.vertex2f(local_right, local_bottom);
|
||||
gGL.texCoord2f(1.f, 1.f);
|
||||
gGL.vertex2f(local_right, local_top);
|
||||
}
|
||||
gGL.end();
|
||||
|
||||
pRegionImage->setBoostLevel(LLViewerTexture::BOOST_MAP_VISIBLE);
|
||||
|
|
@ -461,16 +468,35 @@ void LLNetMap::draw()
|
|||
// [/SL:KB]
|
||||
// Draw using texture.
|
||||
gGL.getTexUnit(0)->bind(regionp->getLand().getSTexture());
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> 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);
|
||||
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(0.f, 1.f);
|
||||
gGL.vertex2f(left, top);
|
||||
gGL.texCoord2f(1.f, 0.f);
|
||||
gGL.vertex2f(right, bottom);
|
||||
gGL.texCoord2f(1.f, 1.f);
|
||||
gGL.vertex2f(right, top);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
|
||||
// Draw water
|
||||
gGL.setAlphaRejectSettings(LLRender::CF_GREATER, ABOVE_WATERLINE_ALPHA / 255.f);
|
||||
|
|
@ -478,16 +504,35 @@ void LLNetMap::draw()
|
|||
if (regionp->getLand().getWaterTexture())
|
||||
{
|
||||
gGL.getTexUnit(0)->bind(regionp->getLand().getWaterTexture());
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> 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);
|
||||
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(0.f, 1.f);
|
||||
gGL.vertex2f(left, top);
|
||||
gGL.texCoord2f(1.f, 0.f);
|
||||
gGL.vertex2f(right, bottom);
|
||||
gGL.texCoord2f(1.f, 1.f);
|
||||
gGL.vertex2f(right, top);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
}
|
||||
gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT);
|
||||
|
|
@ -578,16 +623,33 @@ void LLNetMap::draw()
|
|||
gGL.color4f(1.f, 1.f, 1.f, 1.f);
|
||||
gGL.getTexUnit(0)->bind(mObjectImagep);
|
||||
// [/SL:KB]
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> 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);
|
||||
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(0.f, 1.f);
|
||||
gGL.vertex2f(map_center_agent.mV[VX] - image_half_width, image_half_height + map_center_agent.mV[VY]);
|
||||
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();
|
||||
// </FS:Ansariel>
|
||||
// [SL:KB] - Patch: World-MinimapOverlay | Checked: 2012-07-26 (Catznip-3.3)
|
||||
}
|
||||
// [/SL:KB]
|
||||
|
|
@ -601,13 +663,18 @@ void LLNetMap::draw()
|
|||
|
||||
gGL.color4f(1.f, 1.f, 1.f, 1.f);
|
||||
gGL.getTexUnit(0)->bind(mParcelImagep);
|
||||
gGL.begin(LLRender::QUADS);
|
||||
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);
|
||||
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(0.f, 1.f);
|
||||
gGL.vertex2f(map_center_agent.mV[VX] - image_half_width, image_half_height + map_center_agent.mV[VY]);
|
||||
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();
|
||||
|
|
|
|||
|
|
@ -298,7 +298,23 @@ void LLSnapshotLivePreview::draw()
|
|||
gGL.pushMatrix();
|
||||
{
|
||||
gGL.translatef((F32)rect.mLeft, (F32)rect.mBottom, 0.f);
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> 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() );
|
||||
|
|
@ -309,10 +325,18 @@ void LLSnapshotLivePreview::draw()
|
|||
gGL.texCoord2f(0.f, 0.f);
|
||||
gGL.vertex2i(0, 0);
|
||||
|
||||
|
||||
gGL.texCoord2f(0.f, 0.f);
|
||||
gGL.vertex2i(0, 0);
|
||||
|
||||
gGL.texCoord2f(uv_width, uv_height);
|
||||
gGL.vertex2i(rect.getWidth(), rect.getHeight() );
|
||||
|
||||
gGL.texCoord2f(uv_width, 0.f);
|
||||
gGL.vertex2i(rect.getWidth(), 0);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
gGL.popMatrix();
|
||||
|
||||
|
|
@ -359,23 +383,51 @@ void LLSnapshotLivePreview::draw()
|
|||
S32 y2 = gViewerWindow->getWindowHeightScaled();
|
||||
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> 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);
|
||||
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 + gViewerWindow->getWindowWidthScaled(), y2);
|
||||
gGL.vertex2i(x2, y1);
|
||||
gGL.color4f(1.f, 1.f, 1.f, 0.f);
|
||||
gGL.vertex2i(x1, 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 + gViewerWindow->getWindowWidthScaled(), y2);
|
||||
gGL.vertex2i(x3, y1);
|
||||
gGL.color4f(1.f, 1.f, 1.f, SHINE_OPACITY);
|
||||
gGL.vertex2i(x2, y1);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
// if we're at the end of the animation, stop
|
||||
|
|
@ -391,29 +443,45 @@ void LLSnapshotLivePreview::draw()
|
|||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
gGL.color4f(1.f, 1.f, 1.f, 1.f);
|
||||
const LLRect& outline_rect = getImageRect();
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
//{
|
||||
// gGL.vertex2i(outline_rect.mLeft - BORDER_WIDTH, outline_rect.mTop + BORDER_WIDTH);
|
||||
// gGL.vertex2i(outline_rect.mRight + BORDER_WIDTH, outline_rect.mTop + BORDER_WIDTH);
|
||||
// gGL.vertex2i(outline_rect.mRight, outline_rect.mTop);
|
||||
// gGL.vertex2i(outline_rect.mLeft, outline_rect.mTop);
|
||||
|
||||
// gGL.vertex2i(outline_rect.mLeft, outline_rect.mBottom);
|
||||
// gGL.vertex2i(outline_rect.mRight, outline_rect.mBottom);
|
||||
// gGL.vertex2i(outline_rect.mRight + BORDER_WIDTH, outline_rect.mBottom - BORDER_WIDTH);
|
||||
// gGL.vertex2i(outline_rect.mLeft - BORDER_WIDTH, outline_rect.mBottom - BORDER_WIDTH);
|
||||
|
||||
// gGL.vertex2i(outline_rect.mLeft, outline_rect.mTop);
|
||||
// gGL.vertex2i(outline_rect.mLeft, outline_rect.mBottom);
|
||||
// gGL.vertex2i(outline_rect.mLeft - BORDER_WIDTH, outline_rect.mBottom - BORDER_WIDTH);
|
||||
// gGL.vertex2i(outline_rect.mLeft - BORDER_WIDTH, outline_rect.mTop + BORDER_WIDTH);
|
||||
|
||||
// gGL.vertex2i(outline_rect.mRight, outline_rect.mBottom);
|
||||
// gGL.vertex2i(outline_rect.mRight, outline_rect.mTop);
|
||||
// gGL.vertex2i(outline_rect.mRight + BORDER_WIDTH, outline_rect.mTop + BORDER_WIDTH);
|
||||
// gGL.vertex2i(outline_rect.mRight + BORDER_WIDTH, outline_rect.mBottom - BORDER_WIDTH);
|
||||
//}
|
||||
//gGL.end();
|
||||
gGL.begin(LLRender::TRIANGLE_STRIP);
|
||||
{
|
||||
gGL.vertex2i(outline_rect.mLeft - BORDER_WIDTH, outline_rect.mTop + BORDER_WIDTH);
|
||||
gGL.vertex2i(outline_rect.mRight + BORDER_WIDTH, outline_rect.mTop + BORDER_WIDTH);
|
||||
gGL.vertex2i(outline_rect.mRight, outline_rect.mTop);
|
||||
gGL.vertex2i(outline_rect.mLeft, outline_rect.mTop);
|
||||
|
||||
gGL.vertex2i(outline_rect.mLeft, outline_rect.mBottom);
|
||||
gGL.vertex2i(outline_rect.mRight, outline_rect.mBottom);
|
||||
gGL.vertex2i(outline_rect.mRight + BORDER_WIDTH, outline_rect.mBottom - BORDER_WIDTH);
|
||||
gGL.vertex2i(outline_rect.mLeft - BORDER_WIDTH, outline_rect.mBottom - BORDER_WIDTH);
|
||||
|
||||
gGL.vertex2i(outline_rect.mLeft, outline_rect.mTop);
|
||||
gGL.vertex2i(outline_rect.mLeft, outline_rect.mBottom);
|
||||
gGL.vertex2i(outline_rect.mLeft - BORDER_WIDTH, outline_rect.mBottom - BORDER_WIDTH);
|
||||
gGL.vertex2i(outline_rect.mLeft - BORDER_WIDTH, outline_rect.mTop + BORDER_WIDTH);
|
||||
|
||||
gGL.vertex2i(outline_rect.mRight, outline_rect.mBottom);
|
||||
gGL.vertex2i(outline_rect.mRight, outline_rect.mTop);
|
||||
gGL.vertex2i(outline_rect.mRight + BORDER_WIDTH, outline_rect.mTop + BORDER_WIDTH);
|
||||
gGL.vertex2i(outline_rect.mRight, outline_rect.mBottom);
|
||||
gGL.vertex2i(outline_rect.mRight + BORDER_WIDTH, outline_rect.mBottom - BORDER_WIDTH);
|
||||
gGL.vertex2i(outline_rect.mLeft, outline_rect.mBottom);
|
||||
gGL.vertex2i(outline_rect.mLeft - BORDER_WIDTH, outline_rect.mBottom - BORDER_WIDTH);
|
||||
gGL.vertex2i(outline_rect.mLeft, outline_rect.mTop);
|
||||
gGL.vertex2i(outline_rect.mLeft - BORDER_WIDTH, outline_rect.mTop + BORDER_WIDTH);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
// draw old image dropping away
|
||||
|
|
@ -438,7 +506,23 @@ 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);
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> 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() );
|
||||
|
|
@ -449,10 +533,17 @@ void LLSnapshotLivePreview::draw()
|
|||
gGL.texCoord2f(0.f, 0.f);
|
||||
gGL.vertex2i(0, 0);
|
||||
|
||||
gGL.texCoord2f(0.f, 0.f);
|
||||
gGL.vertex2i(0, 0);
|
||||
|
||||
gGL.texCoord2f(uv_width, uv_height);
|
||||
gGL.vertex2i(rect.getWidth(), rect.getHeight() );
|
||||
|
||||
gGL.texCoord2f(uv_width, 0.f);
|
||||
gGL.vertex2i(rect.getWidth(), 0);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
gGL.popMatrix();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -445,38 +445,64 @@ void LLFloaterTexturePicker::draw()
|
|||
{
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
LLGLEnable(GL_CULL_FACE);
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
//{
|
||||
// gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
// gGL.vertex2i(owner_rect.mLeft, owner_rect.mTop);
|
||||
// gGL.vertex2i(owner_rect.mRight, owner_rect.mTop);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
|
||||
// gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
// gGL.vertex2i(owner_rect.mLeft, owner_rect.mBottom);
|
||||
// gGL.vertex2i(owner_rect.mLeft, owner_rect.mTop);
|
||||
|
||||
// gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
// gGL.vertex2i(owner_rect.mRight, owner_rect.mTop);
|
||||
// gGL.vertex2i(owner_rect.mRight, owner_rect.mBottom);
|
||||
|
||||
|
||||
// gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
// 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, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(owner_rect.mLeft, owner_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(owner_rect.mRight, owner_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(owner_rect.mRight, owner_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(owner_rect.mLeft, owner_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(owner_rect.mLeft, owner_rect.mTop);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(owner_rect.mRight, owner_rect.mTop);
|
||||
gGL.vertex2i(owner_rect.mRight, owner_rect.mBottom);
|
||||
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(owner_rect.mRight, owner_rect.mBottom);
|
||||
gGL.vertex2i(owner_rect.mLeft, owner_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -280,7 +280,20 @@ void LLVisualParamHint::draw(F32 alpha)
|
|||
gGL.color4f(1.f, 1.f, 1.f, alpha);
|
||||
|
||||
LLGLSUIDefault gls_ui;
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> 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);
|
||||
gGL.vertex2i(0, mFullHeight);
|
||||
|
|
@ -288,10 +301,16 @@ void LLVisualParamHint::draw(F32 alpha)
|
|||
gGL.vertex2i(0, 0);
|
||||
gGL.texCoord2i(1, 0);
|
||||
gGL.vertex2i(mFullWidth, 0);
|
||||
|
||||
gGL.texCoord2i(1, 0);
|
||||
gGL.vertex2i(mFullWidth, 0);
|
||||
gGL.texCoord2i(0, 1);
|
||||
gGL.vertex2i(0, mFullHeight);
|
||||
gGL.texCoord2i(1, 1);
|
||||
gGL.vertex2i(mFullWidth, mFullHeight);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,13 +90,26 @@ 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);
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> 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);
|
||||
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.vertex3f(0.1f, 0.1f, 0.f);
|
||||
}gGL.end();
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5077,16 +5077,35 @@ U32 LLVOAvatar::renderImpostor(LLColor4U color, S32 diffuse_channel)
|
|||
|
||||
gGL.color4ubv(color.mV);
|
||||
gGL.getTexUnit(diffuse_channel)->bind(&mImpostor);
|
||||
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);
|
||||
// <FS:Ansariel> 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, 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(1, 1);
|
||||
gGL.vertex3fv((pos - left + up).mV);
|
||||
gGL.texCoord2f(0, 0);
|
||||
gGL.vertex3fv((pos + left - up).mV);
|
||||
gGL.texCoord2f(0, 1);
|
||||
gGL.vertex3fv((pos + left + up).mV);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
gGL.flush();
|
||||
|
||||
return 6;
|
||||
|
|
|
|||
|
|
@ -426,12 +426,25 @@ void LLWorldMapView::draw()
|
|||
gGL.color4f(0.2f, 0.0f, 0.0f, 0.4f);
|
||||
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> 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);
|
||||
gGL.vertex2f(left, bottom);
|
||||
gGL.vertex2f(right, bottom);
|
||||
|
||||
gGL.vertex2f(right, bottom);
|
||||
gGL.vertex2f(left, top);
|
||||
gGL.vertex2f(right, top);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
// As part of the AO project, we no longer want to draw access indicators;
|
||||
// it's too complicated to get all the rules straight and will only
|
||||
|
|
@ -480,16 +493,35 @@ void LLWorldMapView::draw()
|
|||
gGL.blendFunc(LLRender::BF_SOURCE_ALPHA, LLRender::BF_ONE_MINUS_SOURCE_ALPHA);
|
||||
gGL.getTexUnit(0)->bind(overlayimage);
|
||||
gGL.color4f(1.f, 1.f, 1.f, 1.f);
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> 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);
|
||||
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, 0.f);
|
||||
gGL.vertex3f(right, bottom, -0.5f);
|
||||
gGL.texCoord2f(0.f, 1.f);
|
||||
gGL.vertex3f(left, top, -0.5f);
|
||||
gGL.texCoord2f(1.f, 1.f);
|
||||
gGL.vertex3f(right, top, -0.5f);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -776,16 +808,35 @@ bool LLWorldMapView::drawMipmapLevel(S32 width, S32 height, S32 level, bool load
|
|||
gGL.setSceneBlendType(LLRender::BT_ALPHA);
|
||||
gGL.color4f(1.f, 1.0f, 1.0f, 1.0f);
|
||||
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> 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);
|
||||
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, 0.f);
|
||||
gGL.vertex3f(right, bottom, 0.f);
|
||||
gGL.texCoord2f(0.f, 1.f);
|
||||
gGL.vertex3f(left, top, 0.f);
|
||||
gGL.texCoord2f(1.f, 1.f);
|
||||
gGL.vertex3f(right, top, 0.f);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
#if DEBUG_DRAW_TILE
|
||||
drawTileOutline(level, top, left, bottom, right);
|
||||
#endif // DEBUG_DRAW_TILE
|
||||
|
|
|
|||
|
|
@ -11710,12 +11710,25 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
|
|||
}
|
||||
|
||||
{
|
||||
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);
|
||||
// <FS:Ansariel> 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, -1, clip_plane);
|
||||
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.vertex3f(-1, 1, clip_plane);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
gGL.flush();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue