diff options
author | Jacek Antonelli | 2009-06-08 00:41:31 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-06-08 00:41:31 -0500 |
commit | 0e5df9bdf8d6b418bb6e25615e2ffc922d0f02aa (patch) | |
tree | 2c93d38e210832e737d09cff7561373d8d5453b2 /linden/indra/newview/llviewerjoint.cpp | |
parent | Imprudence 1.1.0 released. (diff) | |
parent | Updated Imprudence to be based on SL 1.22.11. (ChangeLog Entry) (diff) | |
download | meta-impy-0e5df9bdf8d6b418bb6e25615e2ffc922d0f02aa.zip meta-impy-0e5df9bdf8d6b418bb6e25615e2ffc922d0f02aa.tar.gz meta-impy-0e5df9bdf8d6b418bb6e25615e2ffc922d0f02aa.tar.bz2 meta-impy-0e5df9bdf8d6b418bb6e25615e2ffc922d0f02aa.tar.xz |
Merge branch 'sl-base-1.22' into next
Conflicts:
linden/indra/newview/English.lproj/InfoPlist.strings
linden/indra/newview/skins/default/xui/en-us/panel_chat_bar.xml
Diffstat (limited to 'linden/indra/newview/llviewerjoint.cpp')
-rw-r--r-- | linden/indra/newview/llviewerjoint.cpp | 73 |
1 files changed, 64 insertions, 9 deletions
diff --git a/linden/indra/newview/llviewerjoint.cpp b/linden/indra/newview/llviewerjoint.cpp index 914448e..31def8f 100644 --- a/linden/indra/newview/llviewerjoint.cpp +++ b/linden/indra/newview/llviewerjoint.cpp | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2001&license=viewergpl$ | 5 | * $LicenseInfo:firstyear=2001&license=viewergpl$ |
6 | * | 6 | * |
7 | * Copyright (c) 2001-2008, Linden Research, Inc. | 7 | * Copyright (c) 2001-2009, Linden Research, Inc. |
8 | * | 8 | * |
9 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
10 | * The source code in this file ("Source Code") is provided by Linden Lab | 10 | * The source code in this file ("Source Code") is provided by Linden Lab |
@@ -149,7 +149,7 @@ void LLViewerJoint::setValid( BOOL valid, BOOL recursive ) | |||
149 | // //---------------------------------------------------------------- | 149 | // //---------------------------------------------------------------- |
150 | // if (mComponents & SC_AXES) | 150 | // if (mComponents & SC_AXES) |
151 | // { | 151 | // { |
152 | // gGL.begin(LLVertexBuffer::LINES); | 152 | // gGL.begin(LLRender::LINES); |
153 | // gGL.color3f( 1.0f, 0.0f, 0.0f ); | 153 | // gGL.color3f( 1.0f, 0.0f, 0.0f ); |
154 | // gGL.vertex3f( 0.0f, 0.0f, 0.0f ); | 154 | // gGL.vertex3f( 0.0f, 0.0f, 0.0f ); |
155 | // gGL.vertex3f( 0.1f, 0.0f, 0.0f ); | 155 | // gGL.vertex3f( 0.1f, 0.0f, 0.0f ); |
@@ -171,7 +171,7 @@ void LLViewerJoint::setValid( BOOL valid, BOOL recursive ) | |||
171 | // { | 171 | // { |
172 | // gGL.color3f( 1.0f, 1.0f, 0.0f ); | 172 | // gGL.color3f( 1.0f, 1.0f, 0.0f ); |
173 | 173 | ||
174 | // gGL.begin(LLVertexBuffer::TRIANGLES); | 174 | // gGL.begin(LLRender::TRIANGLES); |
175 | 175 | ||
176 | // // joint top half | 176 | // // joint top half |
177 | // glNormal3f(nc, nc, nc); | 177 | // glNormal3f(nc, nc, nc); |
@@ -362,7 +362,7 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass ) | |||
362 | // // render the bone | 362 | // // render the bone |
363 | // gGL.color3f( 0.5f, 0.5f, 0.0f ); | 363 | // gGL.color3f( 0.5f, 0.5f, 0.0f ); |
364 | 364 | ||
365 | // gGL.begin(LLVertexBuffer::TRIANGLES); | 365 | // gGL.begin(LLRender::TRIANGLES); |
366 | 366 | ||
367 | // gGL.vertex3f( length, 0.0f, 0.0f); | 367 | // gGL.vertex3f( length, 0.0f, 0.0f); |
368 | // gGL.vertex3f( 0.0f, boneSize, 0.0f); | 368 | // gGL.vertex3f( 0.0f, boneSize, 0.0f); |
@@ -524,14 +524,69 @@ LLViewerJointCollisionVolume::LLViewerJointCollisionVolume(const std::string &na | |||
524 | void LLViewerJointCollisionVolume::renderCollision() | 524 | void LLViewerJointCollisionVolume::renderCollision() |
525 | { | 525 | { |
526 | updateWorldMatrix(); | 526 | updateWorldMatrix(); |
527 | glMatrixMode(GL_MODELVIEW); | 527 | |
528 | glPushMatrix(); | 528 | gGL.pushMatrix(); |
529 | glMultMatrixf( &mXform.getWorldMatrix().mMatrix[0][0] ); | 529 | glMultMatrixf( &mXform.getWorldMatrix().mMatrix[0][0] ); |
530 | 530 | ||
531 | glColor3f( 0.f, 0.f, 1.f ); | 531 | gGL.color3f( 0.f, 0.f, 1.f ); |
532 | gSphere.render(); | 532 | |
533 | gGL.begin(LLRender::LINES); | ||
534 | |||
535 | LLVector3 v[] = | ||
536 | { | ||
537 | LLVector3(1,0,0), | ||
538 | LLVector3(-1,0,0), | ||
539 | LLVector3(0,1,0), | ||
540 | LLVector3(0,-1,0), | ||
541 | |||
542 | LLVector3(0,0,-1), | ||
543 | LLVector3(0,0,1), | ||
544 | }; | ||
545 | |||
546 | //sides | ||
547 | gGL.vertex3fv(v[0].mV); | ||
548 | gGL.vertex3fv(v[2].mV); | ||
549 | |||
550 | gGL.vertex3fv(v[0].mV); | ||
551 | gGL.vertex3fv(v[3].mV); | ||
552 | |||
553 | gGL.vertex3fv(v[1].mV); | ||
554 | gGL.vertex3fv(v[2].mV); | ||
555 | |||
556 | gGL.vertex3fv(v[1].mV); | ||
557 | gGL.vertex3fv(v[3].mV); | ||
558 | |||
559 | |||
560 | //top | ||
561 | gGL.vertex3fv(v[0].mV); | ||
562 | gGL.vertex3fv(v[4].mV); | ||
563 | |||
564 | gGL.vertex3fv(v[1].mV); | ||
565 | gGL.vertex3fv(v[4].mV); | ||
566 | |||
567 | gGL.vertex3fv(v[2].mV); | ||
568 | gGL.vertex3fv(v[4].mV); | ||
569 | |||
570 | gGL.vertex3fv(v[3].mV); | ||
571 | gGL.vertex3fv(v[4].mV); | ||
572 | |||
573 | |||
574 | //bottom | ||
575 | gGL.vertex3fv(v[0].mV); | ||
576 | gGL.vertex3fv(v[5].mV); | ||
577 | |||
578 | gGL.vertex3fv(v[1].mV); | ||
579 | gGL.vertex3fv(v[5].mV); | ||
580 | |||
581 | gGL.vertex3fv(v[2].mV); | ||
582 | gGL.vertex3fv(v[5].mV); | ||
583 | |||
584 | gGL.vertex3fv(v[3].mV); | ||
585 | gGL.vertex3fv(v[5].mV); | ||
586 | |||
587 | gGL.end(); | ||
533 | 588 | ||
534 | glPopMatrix(); | 589 | gGL.popMatrix(); |
535 | } | 590 | } |
536 | 591 | ||
537 | LLVector3 LLViewerJointCollisionVolume::getVolumePos(LLVector3 &offset) | 592 | LLVector3 LLViewerJointCollisionVolume::getVolumePos(LLVector3 &offset) |