aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llmaniprotate.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:34 -0500
committerJacek Antonelli2008-08-15 23:45:34 -0500
commitcd17687f01420952712a500107e0f93e7ab8d5f8 (patch)
treece48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/newview/llmaniprotate.cpp
parentSecond Life viewer sources 1.19.0.5 (diff)
downloadmeta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz
Second Life viewer sources 1.19.1.0
Diffstat (limited to 'linden/indra/newview/llmaniprotate.cpp')
-rw-r--r--linden/indra/newview/llmaniprotate.cpp51
1 files changed, 26 insertions, 25 deletions
diff --git a/linden/indra/newview/llmaniprotate.cpp b/linden/indra/newview/llmaniprotate.cpp
index 66f21d7..bd951a6 100644
--- a/linden/indra/newview/llmaniprotate.cpp
+++ b/linden/indra/newview/llmaniprotate.cpp
@@ -36,6 +36,7 @@
36// library includes 36// library includes
37#include "llmath.h" 37#include "llmath.h"
38#include "llgl.h" 38#include "llgl.h"
39#include "llglimmediate.h"
39#include "v4color.h" 40#include "v4color.h"
40#include "llprimitive.h" 41#include "llprimitive.h"
41#include "llview.h" 42#include "llview.h"
@@ -205,7 +206,7 @@ void LLManipRotate::render()
205 206
206 if (mManipPart == LL_NO_PART) 207 if (mManipPart == LL_NO_PART)
207 { 208 {
208 glColor4f( 0.7f, 0.7f, 0.7f, 0.3f ); 209 gGL.color4f( 0.7f, 0.7f, 0.7f, 0.3f );
209 gl_circle_2d( 0, 0, mRadiusMeters, CIRCLE_STEPS, TRUE ); 210 gl_circle_2d( 0, 0, mRadiusMeters, CIRCLE_STEPS, TRUE );
210 } 211 }
211 212
@@ -839,7 +840,7 @@ void LLManipRotate::renderSnapGuides()
839 840
840 LLColor4 line_color = setupSnapGuideRenderPass(pass); 841 LLColor4 line_color = setupSnapGuideRenderPass(pass);
841 842
842 glColor4fv(line_color.mV); 843 gGL.color4fv(line_color.mV);
843 844
844 if (mCamEdgeOn) 845 if (mCamEdgeOn)
845 { 846 {
@@ -868,7 +869,7 @@ void LLManipRotate::renderSnapGuides()
868 LLVector3 outer_point; 869 LLVector3 outer_point;
869 LLVector3 text_point; 870 LLVector3 text_point;
870 LLQuaternion rot(deg * DEG_TO_RAD, constraint_axis); 871 LLQuaternion rot(deg * DEG_TO_RAD, constraint_axis);
871 glBegin(GL_LINES); 872 gGL.begin(GL_LINES);
872 { 873 {
873 inner_point = (projected_snap_axis * mRadiusMeters * SNAP_GUIDE_INNER_RADIUS * rot) + center; 874 inner_point = (projected_snap_axis * mRadiusMeters * SNAP_GUIDE_INNER_RADIUS * rot) + center;
874 F32 tick_length = 0.f; 875 F32 tick_length = 0.f;
@@ -921,10 +922,10 @@ void LLManipRotate::renderSnapGuides()
921 922
922 text_point = outer_point + (projected_snap_axis * mRadiusMeters * 0.1f) * rot; 923 text_point = outer_point + (projected_snap_axis * mRadiusMeters * 0.1f) * rot;
923 924
924 glVertex3fv(inner_point.mV); 925 gGL.vertex3fv(inner_point.mV);
925 glVertex3fv(outer_point.mV); 926 gGL.vertex3fv(outer_point.mV);
926 } 927 }
927 glEnd(); 928 gGL.end();
928 929
929 //RN: text rendering does own shadow pass, so only render once 930 //RN: text rendering does own shadow pass, so only render once
930 if (pass == 1 && render_text && i % 16 == 0) 931 if (pass == 1 && render_text && i % 16 == 0)
@@ -1029,7 +1030,7 @@ void LLManipRotate::renderSnapGuides()
1029 } 1030 }
1030 } 1031 }
1031 } 1032 }
1032 glColor4fv(line_color.mV); 1033 gGL.color4fv(line_color.mV);
1033 } 1034 }
1034 1035
1035 // now render projected object axis 1036 // now render projected object axis
@@ -1046,15 +1047,15 @@ void LLManipRotate::renderSnapGuides()
1046 object_axis = object_axis * SNAP_GUIDE_INNER_RADIUS * mRadiusMeters + center; 1047 object_axis = object_axis * SNAP_GUIDE_INNER_RADIUS * mRadiusMeters + center;
1047 LLVector3 line_start = center; 1048 LLVector3 line_start = center;
1048 1049
1049 glBegin(GL_LINES); 1050 gGL.begin(GL_LINES);
1050 { 1051 {
1051 glVertex3fv(line_start.mV); 1052 gGL.vertex3fv(line_start.mV);
1052 glVertex3fv(object_axis.mV); 1053 gGL.vertex3fv(object_axis.mV);
1053 } 1054 }
1054 glEnd(); 1055 gGL.end();
1055 1056
1056 // draw snap guide arrow 1057 // draw snap guide arrow
1057 glBegin(GL_TRIANGLES); 1058 gGL.begin(GL_TRIANGLES);
1058 { 1059 {
1059 LLVector3 arrow_dir; 1060 LLVector3 arrow_dir;
1060 LLVector3 arrow_span = (object_axis - line_start) % getConstraintAxis(); 1061 LLVector3 arrow_span = (object_axis - line_start) % getConstraintAxis();
@@ -1066,23 +1067,23 @@ void LLManipRotate::renderSnapGuides()
1066 { 1067 {
1067 arrow_dir *= -1.f; 1068 arrow_dir *= -1.f;
1068 } 1069 }
1069 glVertex3fv((object_axis + arrow_dir * mRadiusMeters * 0.1f).mV); 1070 gGL.vertex3fv((object_axis + arrow_dir * mRadiusMeters * 0.1f).mV);
1070 glVertex3fv((object_axis + arrow_span * mRadiusMeters * 0.1f).mV); 1071 gGL.vertex3fv((object_axis + arrow_span * mRadiusMeters * 0.1f).mV);
1071 glVertex3fv((object_axis - arrow_span * mRadiusMeters * 0.1f).mV); 1072 gGL.vertex3fv((object_axis - arrow_span * mRadiusMeters * 0.1f).mV);
1072 } 1073 }
1073 glEnd(); 1074 gGL.end();
1074 1075
1075 { 1076 {
1076 LLGLDepthTest gls_depth(GL_TRUE); 1077 LLGLDepthTest gls_depth(GL_TRUE);
1077 glBegin(GL_LINES); 1078 gGL.begin(GL_LINES);
1078 { 1079 {
1079 glVertex3fv(line_start.mV); 1080 gGL.vertex3fv(line_start.mV);
1080 glVertex3fv(object_axis.mV); 1081 gGL.vertex3fv(object_axis.mV);
1081 } 1082 }
1082 glEnd(); 1083 gGL.end();
1083 1084
1084 // draw snap guide arrow 1085 // draw snap guide arrow
1085 glBegin(GL_TRIANGLES); 1086 gGL.begin(GL_TRIANGLES);
1086 { 1087 {
1087 LLVector3 arrow_dir; 1088 LLVector3 arrow_dir;
1088 LLVector3 arrow_span = (object_axis - line_start) % getConstraintAxis(); 1089 LLVector3 arrow_span = (object_axis - line_start) % getConstraintAxis();
@@ -1095,11 +1096,11 @@ void LLManipRotate::renderSnapGuides()
1095 arrow_dir *= -1.f; 1096 arrow_dir *= -1.f;
1096 } 1097 }
1097 1098
1098 glVertex3fv((object_axis + arrow_dir * mRadiusMeters * 0.1f).mV); 1099 gGL.vertex3fv((object_axis + arrow_dir * mRadiusMeters * 0.1f).mV);
1099 glVertex3fv((object_axis + arrow_span * mRadiusMeters * 0.1f).mV); 1100 gGL.vertex3fv((object_axis + arrow_span * mRadiusMeters * 0.1f).mV);
1100 glVertex3fv((object_axis - arrow_span * mRadiusMeters * 0.1f).mV); 1101 gGL.vertex3fv((object_axis - arrow_span * mRadiusMeters * 0.1f).mV);
1101 } 1102 }
1102 glEnd(); 1103 gGL.end();
1103 } 1104 }
1104 } 1105 }
1105 } 1106 }