No need to change the matrix mode when it's not used
parent
c8bf7a4adf
commit
afdcfb4961
|
|
@ -1516,10 +1516,6 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
|
|||
LLGLEnable blend(GL_BLEND);
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
|
||||
// save current world matrix
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
gGL.pushMatrix();
|
||||
|
||||
LLColor4 avatar_color = LLNetMap::getAvatarColor(avatarp->getID());
|
||||
gGL.diffuseColor4f(avatar_color.mV[VRED], avatar_color.mV[VGREEN], avatar_color.mV[VBLUE], avatar_color.mV[VALPHA]);
|
||||
glLineWidth(2.0f);
|
||||
|
|
@ -1527,14 +1523,8 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
|
|||
LLQuaternion rot = avatarp->getRotationRegion();
|
||||
LLVector3 pos = avatarp->getPositionAgent();
|
||||
LLVector3 size = avatarp->getScale();
|
||||
|
||||
// *NOTE: Tried this so I wouldn't have to duplcate code, but I didn't find a way to rotate
|
||||
// the matrix by "rot" so the drawBoxOutline function would do the right thing. So
|
||||
// I settled for copying the code and rotating the 4 corner points individually. -Zi
|
||||
// gGL.translatef(pos.mV[VX],pos.mV[VY],pos.mV[VZ]);
|
||||
// gGL.rotatef(rot.mQ[VS]*RAD_TO_DEG,rot.mQ[VX],rot.mQ[VY],rot.mQ[VZ]);
|
||||
// drawBoxOutline(LLVector3::zero,size/2.0);
|
||||
// // drawBoxOutline partly copied from llspatialpartition.cpp below
|
||||
|
||||
// drawBoxOutline partly copied from llspatialpartition.cpp below
|
||||
|
||||
// set up and rotate hitbox to avatar orientation, half the avatar scale in either direction
|
||||
LLVector3 v1 = size.scaledVec(LLVector3( 0.5f, 0.5f, 0.5f)) * rot;
|
||||
|
|
@ -1581,9 +1571,6 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
|
|||
|
||||
gGL.end();
|
||||
|
||||
// restore world matrix
|
||||
gGL.popMatrix();
|
||||
|
||||
// unload debug shader
|
||||
if (LLGLSLShader::sNoFixedFunction)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue