aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerjoint.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2009-04-30 13:04:20 -0500
committerJacek Antonelli2009-04-30 13:07:16 -0500
commitca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e (patch)
tree8348301d0ac44a524f1819b777686bf086907d76 /linden/indra/newview/llviewerjoint.cpp
parentSecond Life viewer sources 1.22.11 (diff)
downloadmeta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.zip
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.gz
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.bz2
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.xz
Second Life viewer sources 1.23.0-RC
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llviewerjoint.cpp39
1 files changed, 28 insertions, 11 deletions
diff --git a/linden/indra/newview/llviewerjoint.cpp b/linden/indra/newview/llviewerjoint.cpp
index 31def8f..c2591ac 100644
--- a/linden/indra/newview/llviewerjoint.cpp
+++ b/linden/indra/newview/llviewerjoint.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -241,8 +242,10 @@ void LLViewerJoint::setValid( BOOL valid, BOOL recursive )
241//-------------------------------------------------------------------- 242//--------------------------------------------------------------------
242// render() 243// render()
243//-------------------------------------------------------------------- 244//--------------------------------------------------------------------
244U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass ) 245U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
245{ 246{
247 stop_glerror();
248
246 U32 triangle_count = 0; 249 U32 triangle_count = 0;
247 250
248 //---------------------------------------------------------------- 251 //----------------------------------------------------------------
@@ -256,9 +259,13 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass )
256 // if object is transparent, defer it, otherwise 259 // if object is transparent, defer it, otherwise
257 // give the joint subclass a chance to draw itself 260 // give the joint subclass a chance to draw itself
258 //---------------------------------------------------------------- 261 //----------------------------------------------------------------
259 if ( gRenderForSelect ) 262 if ( gRenderForSelect || is_dummy )
260 { 263 {
261 triangle_count += drawShape( pixelArea, first_pass ); 264 triangle_count += drawShape( pixelArea, first_pass, is_dummy );
265 }
266 else if (LLPipeline::sShadowRender)
267 {
268 triangle_count += drawShape(pixelArea, first_pass, is_dummy );
262 } 269 }
263 else if ( isTransparent() && !LLPipeline::sReflectionRender) 270 else if ( isTransparent() && !LLPipeline::sReflectionRender)
264 { 271 {
@@ -270,18 +277,18 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass )
270 // first pass renders without writing to the z buffer 277 // first pass renders without writing to the z buffer
271 { 278 {
272 LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); 279 LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
273 triangle_count += drawShape( pixelArea, first_pass); 280 triangle_count += drawShape( pixelArea, first_pass, is_dummy );
274 } 281 }
275 // second pass writes to z buffer only 282 // second pass writes to z buffer only
276 gGL.setColorMask(false, false); 283 gGL.setColorMask(false, false);
277 { 284 {
278 triangle_count += drawShape( pixelArea, FALSE ); 285 triangle_count += drawShape( pixelArea, FALSE, is_dummy );
279 } 286 }
280 // third past respects z buffer and writes color 287 // third past respects z buffer and writes color
281 gGL.setColorMask(true, false); 288 gGL.setColorMask(true, false);
282 { 289 {
283 LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); 290 LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
284 triangle_count += drawShape( pixelArea, FALSE ); 291 triangle_count += drawShape( pixelArea, FALSE, is_dummy );
285 } 292 }
286 } 293 }
287 else 294 else
@@ -290,12 +297,12 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass )
290 glCullFace(GL_FRONT); 297 glCullFace(GL_FRONT);
291 { 298 {
292 LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); 299 LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
293 triangle_count += drawShape( pixelArea, first_pass ); 300 triangle_count += drawShape( pixelArea, first_pass, is_dummy );
294 } 301 }
295 // Render Outside (write to the Z buffer) 302 // Render Outside (write to the Z buffer)
296 glCullFace(GL_BACK); 303 glCullFace(GL_BACK);
297 { 304 {
298 triangle_count += drawShape( pixelArea, FALSE ); 305 triangle_count += drawShape( pixelArea, FALSE, is_dummy );
299 } 306 }
300 } 307 }
301 } 308 }
@@ -316,7 +323,7 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass )
316 F32 jointLOD = joint->getLOD(); 323 F32 jointLOD = joint->getLOD();
317 if (pixelArea >= jointLOD || sDisableLOD) 324 if (pixelArea >= jointLOD || sDisableLOD)
318 { 325 {
319 triangle_count += joint->render( pixelArea ); 326 triangle_count += joint->render( pixelArea, TRUE, is_dummy );
320 327
321 if (jointLOD != DEFAULT_LOD) 328 if (jointLOD != DEFAULT_LOD)
322 { 329 {
@@ -397,7 +404,7 @@ BOOL LLViewerJoint::isTransparent()
397//-------------------------------------------------------------------- 404//--------------------------------------------------------------------
398// drawShape() 405// drawShape()
399//-------------------------------------------------------------------- 406//--------------------------------------------------------------------
400U32 LLViewerJoint::drawShape( F32 pixelArea, BOOL first_pass ) 407U32 LLViewerJoint::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy )
401{ 408{
402 return 0; 409 return 0;
403} 410}
@@ -507,6 +514,16 @@ void LLViewerJoint::setVisible(BOOL visible, BOOL recursive)
507 } 514 }
508} 515}
509 516
517
518void LLViewerJoint::setMeshesToChildren()
519{
520 removeAllChildren();
521 for (std::vector<LLViewerJointMesh*>::iterator iter = mMeshParts.begin();
522 iter != mMeshParts.end(); iter++)
523 {
524 addChild((LLViewerJointMesh *) *iter);
525 }
526}
510//----------------------------------------------------------------------------- 527//-----------------------------------------------------------------------------
511// LLViewerJointCollisionVolume() 528// LLViewerJointCollisionVolume()
512//----------------------------------------------------------------------------- 529//-----------------------------------------------------------------------------