summaryrefslogtreecommitdiff
path: root/indra/newview/llmaniptranslate.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-09-14 16:30:45 -0500
committerDave Parks <davep@lindenlab.com>2011-09-14 16:30:45 -0500
commit7c95af74f195c9ec4ebc0fc0264d98cd4a85be49 (patch)
tree1bab2f431bd1df1e9f6f7058cad8d64119ec3bd3 /indra/newview/llmaniptranslate.cpp
parentc0ca2c62fd6b9a90542907ce46bf1fe0ab379e13 (diff)
SH-2243 work in progress -- application side matrix stack management
Diffstat (limited to 'indra/newview/llmaniptranslate.cpp')
-rw-r--r--indra/newview/llmaniptranslate.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index a9b14829b2..3a88fbd96d 100644
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -1066,12 +1066,12 @@ BOOL LLManipTranslate::handleMouseUp(S32 x, S32 y, MASK mask)
void LLManipTranslate::render()
{
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
{
F32 zoom = gAgentCamera.mHUDCurZoom;
- glScalef(zoom, zoom, zoom);
+ gGL.scalef(zoom, zoom, zoom);
}
{
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
@@ -1515,12 +1515,12 @@ void LLManipTranslate::renderSnapGuides()
F32 x,y,z,angle_radians;
grid_rotation.getAngleAxis(&angle_radians, &x, &y, &z);
gGL.translatef(selection_center.mV[VX], selection_center.mV[VY], selection_center.mV[VZ]);
- glRotatef(angle_radians * RAD_TO_DEG, x, y, z);
+ gGL.rotatef(angle_radians * RAD_TO_DEG, x, y, z);
F32 sz = mGridSizeMeters;
F32 tiles = sz;
- glMatrixMode(GL_TEXTURE);
+ gGL.matrixMode(LLRender::MM_TEXTURE);
gGL.pushMatrix();
usc = 1.0f/usc;
vsc = 1.0f/vsc;
@@ -1534,7 +1534,7 @@ void LLManipTranslate::renderSnapGuides()
vsc *= 0.5f;
}
- glScalef(usc, vsc, 1.0f);
+ gGL.scalef(usc, vsc, 1.0f);
gGL.translatef(u, v, 0);
float a = line_alpha;
@@ -1567,7 +1567,7 @@ void LLManipTranslate::renderSnapGuides()
renderGrid(u,v,tiles,1,1,1,a);
gGL.popMatrix();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.popMatrix();
}
@@ -1724,7 +1724,7 @@ void LLManipTranslate::highlightIntersection(LLVector3 normal,
F32 x,y,z,angle_radians;
grid_rotation.getAngleAxis(&angle_radians, &x, &y, &z);
gGL.translatef(selection_center.mV[VX], selection_center.mV[VY], selection_center.mV[VZ]);
- glRotatef(angle_radians * RAD_TO_DEG, x, y, z);
+ gGL.rotatef(angle_radians * RAD_TO_DEG, x, y, z);
F32 sz = mGridSizeMeters;
F32 tiles = sz;
@@ -1853,7 +1853,7 @@ void LLManipTranslate::renderTranslationHandles()
mGridSizeMeters = gSavedSettings.getF32("GridDrawSize");
mConeSize = mArrowLengthMeters / 4.f;
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
{
gGL.translatef(selection_center.mV[VX], selection_center.mV[VY], selection_center.mV[VZ]);
@@ -1861,7 +1861,7 @@ void LLManipTranslate::renderTranslationHandles()
F32 angle_radians, x, y, z;
grid_rotation.getAngleAxis(&angle_radians, &x, &y, &z);
- glRotatef(angle_radians * RAD_TO_DEG, x, y, z);
+ gGL.rotatef(angle_radians * RAD_TO_DEG, x, y, z);
LLQuaternion invRotation = grid_rotation;
invRotation.conjQuat();
@@ -1909,9 +1909,9 @@ void LLManipTranslate::renderTranslationHandles()
{
// render YZ plane manipulator
gGL.pushMatrix();
- glScalef(mPlaneManipPositions.mV[VX], mPlaneManipPositions.mV[VY], mPlaneManipPositions.mV[VZ]);
+ gGL.scalef(mPlaneManipPositions.mV[VX], mPlaneManipPositions.mV[VY], mPlaneManipPositions.mV[VZ]);
gGL.translatef(0.f, mPlaneManipOffsetMeters, mPlaneManipOffsetMeters);
- glScalef(mPlaneScales.mV[VX], mPlaneScales.mV[VX], mPlaneScales.mV[VX]);
+ gGL.scalef(mPlaneScales.mV[VX], mPlaneScales.mV[VX], mPlaneScales.mV[VX]);
if (mHighlightedPart == LL_YZ_PLANE)
{
color1.setVec(0.f, 1.f, 0.f, 1.f);
@@ -1963,9 +1963,9 @@ void LLManipTranslate::renderTranslationHandles()
{
// render XZ plane manipulator
gGL.pushMatrix();
- glScalef(mPlaneManipPositions.mV[VX], mPlaneManipPositions.mV[VY], mPlaneManipPositions.mV[VZ]);
+ gGL.scalef(mPlaneManipPositions.mV[VX], mPlaneManipPositions.mV[VY], mPlaneManipPositions.mV[VZ]);
gGL.translatef(mPlaneManipOffsetMeters, 0.f, mPlaneManipOffsetMeters);
- glScalef(mPlaneScales.mV[VY], mPlaneScales.mV[VY], mPlaneScales.mV[VY]);
+ gGL.scalef(mPlaneScales.mV[VY], mPlaneScales.mV[VY], mPlaneScales.mV[VY]);
if (mHighlightedPart == LL_XZ_PLANE)
{
color1.setVec(0.f, 0.f, 1.f, 1.f);
@@ -2019,7 +2019,7 @@ void LLManipTranslate::renderTranslationHandles()
{
// render XY plane manipulator
gGL.pushMatrix();
- glScalef(mPlaneManipPositions.mV[VX], mPlaneManipPositions.mV[VY], mPlaneManipPositions.mV[VZ]);
+ gGL.scalef(mPlaneManipPositions.mV[VX], mPlaneManipPositions.mV[VY], mPlaneManipPositions.mV[VZ]);
/* Y
^
@@ -2044,7 +2044,7 @@ void LLManipTranslate::renderTranslationHandles()
v2 = LLVector3(mPlaneManipOffsetMeters * ( PLANE_TICK_SIZE * 0.25f), mPlaneManipOffsetMeters * ( PLANE_TICK_SIZE * 0.25f), 0.f);
v3 = LLVector3(mPlaneManipOffsetMeters * (-PLANE_TICK_SIZE * 0.75f), mPlaneManipOffsetMeters * ( PLANE_TICK_SIZE * 0.25f), 0.f);
#endif
- glScalef(mPlaneScales.mV[VZ], mPlaneScales.mV[VZ], mPlaneScales.mV[VZ]);
+ gGL.scalef(mPlaneScales.mV[VZ], mPlaneScales.mV[VZ], mPlaneScales.mV[VZ]);
if (mHighlightedPart == LL_XY_PLANE)
{
color1.setVec(1.f, 0.f, 0.f, 1.f);
@@ -2216,7 +2216,7 @@ void LLManipTranslate::renderArrow(S32 which_arrow, S32 selected_arrow, F32 box_
}
gGL.translatef(vec.mV[0], vec.mV[1], vec.mV[2]);
- glScalef(handle_size, handle_size, handle_size);
+ gGL.scalef(handle_size, handle_size, handle_size);
F32 rot = 0.0f;
LLVector3 axis;
@@ -2241,8 +2241,8 @@ void LLManipTranslate::renderArrow(S32 which_arrow, S32 selected_arrow, F32 box_
}
gGL.diffuseColor4fv(color.mV);
- glRotatef(rot, axis.mV[0], axis.mV[1], axis.mV[2]);
- glScalef(mArrowScales.mV[index], mArrowScales.mV[index], mArrowScales.mV[index] * 1.5f);
+ gGL.rotatef(rot, axis.mV[0], axis.mV[1], axis.mV[2]);
+ gGL.scalef(mArrowScales.mV[index], mArrowScales.mV[index], mArrowScales.mV[index] * 1.5f);
gCone.render();