aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llmanip.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/llmanip.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/llmanip.cpp')
-rw-r--r--linden/indra/newview/llmanip.cpp45
1 files changed, 22 insertions, 23 deletions
diff --git a/linden/indra/newview/llmanip.cpp b/linden/indra/newview/llmanip.cpp
index 2cf450d..9d9103f 100644
--- a/linden/indra/newview/llmanip.cpp
+++ b/linden/indra/newview/llmanip.cpp
@@ -35,8 +35,8 @@
35 35
36#include "llmath.h" 36#include "llmath.h"
37#include "v3math.h" 37#include "v3math.h"
38//#include "llquaternion.h"
39#include "llgl.h" 38#include "llgl.h"
39#include "llglimmediate.h"
40#include "llprimitive.h" 40#include "llprimitive.h"
41#include "llview.h" 41#include "llview.h"
42#include "llviewerimagelist.h" 42#include "llviewerimagelist.h"
@@ -78,11 +78,13 @@ void LLManip::rebuild(LLViewerObject* vobj)
78 { 78 {
79 79
80 gPipeline.markRebuild(drawablep,LLDrawable::REBUILD_VOLUME, TRUE); 80 gPipeline.markRebuild(drawablep,LLDrawable::REBUILD_VOLUME, TRUE);
81 //gPipeline.markMoved(drawablep, FALSE);
82 //gPipeline.updateMoveNormalAsync(vobj->mDrawable);
83
84 drawablep->setState(LLDrawable::MOVE_UNDAMPED); // force to UNDAMPED 81 drawablep->setState(LLDrawable::MOVE_UNDAMPED); // force to UNDAMPED
85 drawablep->updateMove(); 82 drawablep->updateMove();
83 LLSpatialGroup* group = drawablep->getSpatialGroup();
84 if (group)
85 {
86 group->dirtyGeom();
87 }
86 } 88 }
87} 89}
88 90
@@ -388,29 +390,29 @@ void LLManip::renderGuidelines(BOOL draw_x, BOOL draw_y, BOOL draw_z)
388 390
389 if (draw_x) 391 if (draw_x)
390 { 392 {
391 glColor4f(1.f, 0.f, 0.f, LINE_ALPHA); 393 gGL.color4f(1.f, 0.f, 0.f, LINE_ALPHA);
392 glBegin(GL_LINES); 394 gGL.begin(GL_LINES);
393 glVertex3f( -region_size, 0.f, 0.f ); 395 gGL.vertex3f( -region_size, 0.f, 0.f );
394 glVertex3f( region_size, 0.f, 0.f ); 396 gGL.vertex3f( region_size, 0.f, 0.f );
395 glEnd(); 397 gGL.end();
396 } 398 }
397 399
398 if (draw_y) 400 if (draw_y)
399 { 401 {
400 glColor4f(0.f, 1.f, 0.f, LINE_ALPHA); 402 gGL.color4f(0.f, 1.f, 0.f, LINE_ALPHA);
401 glBegin(GL_LINES); 403 gGL.begin(GL_LINES);
402 glVertex3f( 0.f, -region_size, 0.f ); 404 gGL.vertex3f( 0.f, -region_size, 0.f );
403 glVertex3f( 0.f, region_size, 0.f ); 405 gGL.vertex3f( 0.f, region_size, 0.f );
404 glEnd(); 406 gGL.end();
405 } 407 }
406 408
407 if (draw_z) 409 if (draw_z)
408 { 410 {
409 glColor4f(0.f, 0.f, 1.f, LINE_ALPHA); 411 gGL.color4f(0.f, 0.f, 1.f, LINE_ALPHA);
410 glBegin(GL_LINES); 412 gGL.begin(GL_LINES);
411 glVertex3f( 0.f, 0.f, -region_size ); 413 gGL.vertex3f( 0.f, 0.f, -region_size );
412 glVertex3f( 0.f, 0.f, region_size ); 414 gGL.vertex3f( 0.f, 0.f, region_size );
413 glEnd(); 415 gGL.end();
414 } 416 }
415 LLUI::setLineWidth(1.0f); 417 LLUI::setLineWidth(1.0f);
416 } 418 }
@@ -435,7 +437,7 @@ void LLManip::renderXYZ(const LLVector3 &vec)
435 gViewerWindow->setup2DRender(); 437 gViewerWindow->setup2DRender();
436 const LLVector2& display_scale = gViewerWindow->getDisplayScale(); 438 const LLVector2& display_scale = gViewerWindow->getDisplayScale();
437 glScalef(display_scale.mV[VX], display_scale.mV[VY], 1.f); 439 glScalef(display_scale.mV[VX], display_scale.mV[VY], 1.f);
438 glColor4f(0.f, 0.f, 0.f, 0.7f); 440 gGL.color4f(0.f, 0.f, 0.f, 0.7f);
439 441
440 gl_draw_scaled_image_with_border(window_center_x - 115, 442 gl_draw_scaled_image_with_border(window_center_x - 115,
441 window_center_y + vertical_offset - PAD, 443 window_center_y + vertical_offset - PAD,
@@ -453,7 +455,6 @@ void LLManip::renderXYZ(const LLVector3 &vec)
453 { 455 {
454 LLLocale locale(LLLocale::USER_LOCALE); 456 LLLocale locale(LLLocale::USER_LOCALE);
455 LLGLDepthTest gls_depth(GL_FALSE); 457 LLGLDepthTest gls_depth(GL_FALSE);
456 LLGLEnable tex(GL_TEXTURE_2D);
457 // render drop shadowed text 458 // render drop shadowed text
458 snprintf(feedback_string, sizeof(feedback_string), "X: %.3f", vec.mV[VX]); /* Flawfinder: ignore */ 459 snprintf(feedback_string, sizeof(feedback_string), "X: %.3f", vec.mV[VX]); /* Flawfinder: ignore */
459 hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *gResMgr->getRes( LLFONT_SANSSERIF ), LLFontGL::NORMAL, -102.f + 1.f, (F32)vertical_offset - 1.f, LLColor4::black, FALSE); 460 hud_render_text(utf8str_to_wstring(feedback_string), camera_pos, *gResMgr->getRes( LLFONT_SANSSERIF ), LLFontGL::NORMAL, -102.f + 1.f, (F32)vertical_offset - 1.f, LLColor4::black, FALSE);
@@ -497,7 +498,6 @@ void LLManip::renderTickText(const LLVector3& pos, const char* text, const LLCol
497 498
498 // render shadow first 499 // render shadow first
499 LLColor4 shadow_color = LLColor4::black; 500 LLColor4 shadow_color = LLColor4::black;
500 LLGLEnable tex(GL_TEXTURE_2D);
501 shadow_color.mV[VALPHA] = color.mV[VALPHA] * 0.5f; 501 shadow_color.mV[VALPHA] = color.mV[VALPHA] * 0.5f;
502 gViewerWindow->setupViewport(1, -1); 502 gViewerWindow->setupViewport(1, -1);
503 hud_render_utf8text(text, render_pos, *big_fontp, LLFontGL::NORMAL, -0.5f * big_fontp->getWidthF32(text), 3.f, shadow_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD); 503 hud_render_utf8text(text, render_pos, *big_fontp, LLFontGL::NORMAL, -0.5f * big_fontp->getWidthF32(text), 3.f, shadow_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD);
@@ -557,7 +557,6 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const char* suffi
557 LLColor4 shadow_color = LLColor4::black; 557 LLColor4 shadow_color = LLColor4::black;
558 shadow_color.mV[VALPHA] = color.mV[VALPHA] * 0.5f; 558 shadow_color.mV[VALPHA] = color.mV[VALPHA] * 0.5f;
559 559
560 LLGLEnable tex(GL_TEXTURE_2D);
561 if (fractional_portion != 0) 560 if (fractional_portion != 0)
562 { 561 {
563 snprintf(fraction_string, sizeof(fraction_string), "%c%02d%s", gResMgr->getDecimalPoint(), fractional_portion, suffix); /* Flawfinder: ignore */ 562 snprintf(fraction_string, sizeof(fraction_string), "%c%02d%s", gResMgr->getDecimalPoint(), fractional_portion, suffix); /* Flawfinder: ignore */