Merge branch 'UICleanup' of git://github.com/Shyotl/SingularityViewer
Conflicts: indra/llappearance/llwearable.h indra/llui/llcombobox.h indra/newview/jcfloaterareasearch.cpp indra/newview/jcfloaterareasearch.h indra/newview/llpanelgrouproles.cpp indra/newview/llpanelgrouproles.h indra/newview/llviewermenu.cpp - Plugged in new MenuFloaterDict for AssetBlacklist and SoundExplorer in menu_viewer.xml and removed the old listeners for them. indra/newview/skins/default/xui/es/floater_inventory.xml Compile Fixes: indra/llcommon/llstl.h - error: expected nested-name-specifier before ‘const’ indra/llui/llmultisliderctrl.cpp:283:12: error: ‘caller’ was not declared in this scope indra/llui/lltexteditor.cpp - error: operands to ?: have different types ‘const LLPointer<LLTextSegment>’ and ‘long int’ - error: passing ‘const LLPointer<LLTextSegment>’ as ‘this’ argument of ‘LLPointer<Type>& LLPointer<Type>::operator=(const LLPointer<Type>&) [with Type = LLTextSegment]’ discards qualifiers indra/newview/llfloaterpermissionsmgr.cpp - Silly Shyotl, boost bind, not std bind. indra/newview/llfloaterproperties.* - error: ‘LLInstanceTracker<LLFloaterProperties, LLUUID>’ is an inaccessible base of ‘LLFloaterProperties’ indra/newview/llgivemoney.cpp - Again, boost::ref, not std::ref indra/newview/llpreviewscript.cpp - no known conversion for argument 1 from ‘std::vector<const LLPointer<LLTextSegment> >’ to ‘std::vector<LLPointer<LLTextSegment> >&
This commit is contained in:
@@ -100,22 +100,21 @@ void gl_rect_2d_offset_local( S32 left, S32 top, S32 right, S32 bottom, const LL
|
||||
|
||||
void gl_rect_2d_offset_local( S32 left, S32 top, S32 right, S32 bottom, S32 pixel_offset, BOOL filled)
|
||||
{
|
||||
gGL.pushMatrix();
|
||||
gGL.pushUIMatrix();
|
||||
left += LLFontGL::sCurOrigin.mX;
|
||||
right += LLFontGL::sCurOrigin.mX;
|
||||
bottom += LLFontGL::sCurOrigin.mY;
|
||||
top += LLFontGL::sCurOrigin.mY;
|
||||
|
||||
gGL.loadIdentity();
|
||||
gGL.loadUIIdentity();
|
||||
gl_rect_2d(llfloor((F32)left * LLRender2D::sGLScaleFactor.mV[VX]) - pixel_offset,
|
||||
llfloor((F32)top * LLRender2D::sGLScaleFactor.mV[VY]) + pixel_offset,
|
||||
llfloor((F32)right * LLRender2D::sGLScaleFactor.mV[VX]) + pixel_offset,
|
||||
llfloor((F32)bottom * LLRender2D::sGLScaleFactor.mV[VY]) - pixel_offset,
|
||||
filled);
|
||||
gGL.popMatrix();
|
||||
gGL.popUIMatrix();
|
||||
}
|
||||
|
||||
|
||||
void gl_rect_2d(S32 left, S32 top, S32 right, S32 bottom, BOOL filled )
|
||||
{
|
||||
stop_glerror();
|
||||
@@ -386,8 +385,8 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
|
||||
}
|
||||
|
||||
// add in offset of current image to current UI translation
|
||||
const LLVector3 ui_scale = LLVector3(1.f,1.f,1.f);//gGL.getUIScale();
|
||||
const LLVector3 ui_translation = LLVector3(x,y,0.f);//(gGL.getUITranslation() + LLVector3(x, y, 0.f)).scaledVec(ui_scale);
|
||||
const LLVector3 ui_scale = gGL.getUIScale();
|
||||
const LLVector3 ui_translation = (gGL.getUITranslation() + LLVector3(x, y, 0.f)).scaledVec(ui_scale);
|
||||
|
||||
F32 uv_width = uv_outer_rect.getWidth();
|
||||
F32 uv_height = uv_outer_rect.getHeight();
|
||||
@@ -659,8 +658,8 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre
|
||||
|
||||
gGL.begin(LLRender::QUADS);
|
||||
{
|
||||
LLVector3 ui_scale = LLVector3(1.f,1.f,1.f);//gGL.getUIScale();
|
||||
LLVector3 ui_translation = LLVector3(0.f,0.f,0.f); //gGL.getUITranslation();
|
||||
LLVector3 ui_scale = gGL.getUIScale();
|
||||
LLVector3 ui_translation = gGL.getUITranslation();
|
||||
ui_translation.mV[VX] += x;
|
||||
ui_translation.mV[VY] += y;
|
||||
ui_translation.scaleVec(ui_scale);
|
||||
@@ -690,13 +689,13 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre
|
||||
}
|
||||
else
|
||||
{
|
||||
gGL.pushMatrix();
|
||||
gGL.translatef((F32)x, (F32)y, 0.f);
|
||||
gGL.pushUIMatrix();
|
||||
gGL.translateUI((F32)x, (F32)y, 0.f);
|
||||
|
||||
F32 offset_x = F32(width/2);
|
||||
F32 offset_y = F32(height/2);
|
||||
|
||||
gGL.translatef(offset_x, offset_y, 0.f);
|
||||
gGL.translateUI(offset_x, offset_y, 0.f);
|
||||
|
||||
LLMatrix3 quat(0.f, 0.f, degrees*DEG_TO_RAD);
|
||||
|
||||
@@ -725,7 +724,7 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre
|
||||
gGL.vertex2f(v.mV[0], v.mV[1] );
|
||||
}
|
||||
gGL.end();
|
||||
gGL.popMatrix();
|
||||
gGL.popUIMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -766,9 +765,9 @@ void gl_arc_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, BOOL filled, F
|
||||
end_angle += F_TWO_PI;
|
||||
}
|
||||
|
||||
gGL.pushMatrix();
|
||||
gGL.pushUIMatrix();
|
||||
{
|
||||
gGL.translatef(center_x, center_y, 0.f);
|
||||
gGL.translateUI(center_x, center_y, 0.f);
|
||||
|
||||
// Inexact, but reasonably fast.
|
||||
F32 delta = (end_angle - start_angle) / steps;
|
||||
@@ -799,15 +798,15 @@ void gl_arc_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, BOOL filled, F
|
||||
}
|
||||
gGL.end();
|
||||
}
|
||||
gGL.popMatrix();
|
||||
gGL.popUIMatrix();
|
||||
}
|
||||
|
||||
void gl_circle_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, BOOL filled)
|
||||
{
|
||||
gGL.pushMatrix();
|
||||
gGL.pushUIMatrix();
|
||||
{
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
gGL.translatef(center_x, center_y, 0.f);
|
||||
gGL.translateUI(center_x, center_y, 0.f);
|
||||
|
||||
// Inexact, but reasonably fast.
|
||||
F32 delta = F_TWO_PI / steps;
|
||||
@@ -838,7 +837,7 @@ void gl_circle_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, BOOL filled
|
||||
}
|
||||
gGL.end();
|
||||
}
|
||||
gGL.popMatrix();
|
||||
gGL.popUIMatrix();
|
||||
}
|
||||
|
||||
// Renders a ring with sides (tube shape)
|
||||
@@ -865,9 +864,9 @@ void gl_deep_circle( F32 radius, F32 depth, S32 steps )
|
||||
|
||||
void gl_ring( F32 radius, F32 width, const LLColor4& center_color, const LLColor4& side_color, S32 steps, BOOL render_center )
|
||||
{
|
||||
gGL.pushMatrix();
|
||||
gGL.pushUIMatrix();
|
||||
{
|
||||
gGL.translatef(0.f, 0.f, -width / 2);
|
||||
gGL.translateUI(0.f, 0.f, -width / 2);
|
||||
if( render_center )
|
||||
{
|
||||
gGL.color4fv(center_color.mV);
|
||||
@@ -878,11 +877,11 @@ void gl_ring( F32 radius, F32 width, const LLColor4& center_color, const LLColor
|
||||
{
|
||||
gGL.diffuseColor4fv(side_color.mV);
|
||||
gl_washer_2d(radius, radius - width, steps, side_color, side_color);
|
||||
gGL.translatef(0.f, 0.f, width);
|
||||
gGL.translateUI(0.f, 0.f, width);
|
||||
gl_washer_2d(radius - width, radius, steps, side_color, side_color);
|
||||
}
|
||||
}
|
||||
gGL.popMatrix();
|
||||
gGL.popUIMatrix();
|
||||
}
|
||||
|
||||
// Draw gray and white checkerboard with black border
|
||||
@@ -1057,9 +1056,9 @@ void gl_segmented_rect_2d_tex(const S32 left,
|
||||
S32 width = llabs(right - left);
|
||||
S32 height = llabs(top - bottom);
|
||||
|
||||
gGL.pushMatrix();
|
||||
gGL.pushUIMatrix();
|
||||
|
||||
gGL.translatef((F32)left, (F32)bottom, 0.f);
|
||||
gGL.translateUI((F32)left, (F32)bottom, 0.f);
|
||||
LLVector2 border_uv_scale((F32)border_size / (F32)texture_width, (F32)border_size / (F32)texture_height);
|
||||
|
||||
if (border_uv_scale.mV[VX] > 0.5f)
|
||||
@@ -1200,7 +1199,7 @@ void gl_segmented_rect_2d_tex(const S32 left,
|
||||
}
|
||||
gGL.end();
|
||||
|
||||
gGL.popMatrix();
|
||||
gGL.popUIMatrix();
|
||||
}
|
||||
|
||||
//FIXME: rewrite to use scissor?
|
||||
@@ -1218,9 +1217,9 @@ void gl_segmented_rect_2d_fragment_tex(const S32 left,
|
||||
S32 width = llabs(right - left);
|
||||
S32 height = llabs(top - bottom);
|
||||
|
||||
gGL.pushMatrix();
|
||||
gGL.pushUIMatrix();
|
||||
|
||||
gGL.translatef((F32)left, (F32)bottom, 0.f);
|
||||
gGL.translateUI((F32)left, (F32)bottom, 0.f);
|
||||
LLVector2 border_uv_scale((F32)border_size / (F32)texture_width, (F32)border_size / (F32)texture_height);
|
||||
|
||||
if (border_uv_scale.mV[VX] > 0.5f)
|
||||
@@ -1391,7 +1390,7 @@ void gl_segmented_rect_2d_fragment_tex(const S32 left,
|
||||
}
|
||||
gGL.end();
|
||||
|
||||
gGL.popMatrix();
|
||||
gGL.popUIMatrix();
|
||||
}
|
||||
|
||||
void gl_segmented_rect_3d_tex(const LLVector2& border_scale, const LLVector3& border_width,
|
||||
@@ -1554,7 +1553,7 @@ void LLRender2D::cleanupClass()
|
||||
//static
|
||||
void LLRender2D::translate(F32 x, F32 y, F32 z)
|
||||
{
|
||||
gGL.translatef(x,y,z);
|
||||
gGL.translateUI(x,y,z);
|
||||
LLFontGL::sCurOrigin.mX += (S32) x;
|
||||
LLFontGL::sCurOrigin.mY += (S32) y;
|
||||
LLFontGL::sCurDepth += z;
|
||||
@@ -1563,14 +1562,14 @@ void LLRender2D::translate(F32 x, F32 y, F32 z)
|
||||
//static
|
||||
void LLRender2D::pushMatrix()
|
||||
{
|
||||
gGL.pushMatrix();
|
||||
gGL.pushUIMatrix();
|
||||
LLFontGL::sOriginStack.push_back(std::make_pair(LLFontGL::sCurOrigin, LLFontGL::sCurDepth));
|
||||
}
|
||||
|
||||
//static
|
||||
void LLRender2D::popMatrix()
|
||||
{
|
||||
gGL.popMatrix();
|
||||
gGL.popUIMatrix();
|
||||
LLFontGL::sCurOrigin = LLFontGL::sOriginStack.back().first;
|
||||
LLFontGL::sCurDepth = LLFontGL::sOriginStack.back().second;
|
||||
LLFontGL::sOriginStack.pop_back();
|
||||
@@ -1579,7 +1578,7 @@ void LLRender2D::popMatrix()
|
||||
//static
|
||||
void LLRender2D::loadIdentity()
|
||||
{
|
||||
gGL.loadIdentity();
|
||||
gGL.loadUIIdentity();
|
||||
LLFontGL::sCurOrigin.mX = 0;
|
||||
LLFontGL::sCurOrigin.mY = 0;
|
||||
LLFontGL::sCurDepth = 0.f;
|
||||
|
||||
Reference in New Issue
Block a user