Don't render neck/neck base when blend face is active.

This commit is contained in:
Andrzej Kapolka 2013-09-20 17:55:31 -07:00
parent 133ba3a00a
commit 24bf1e2036
3 changed files with 10 additions and 0 deletions

View file

@ -699,6 +699,10 @@ void Avatar::renderBody(bool lookingInMirror, bool renderAvatarBalls) {
SKIN_COLOR[1] - _bodyBall[b].touchForce * 0.2f,
SKIN_COLOR[2] - _bodyBall[b].touchForce * 0.1f);
if (b == BODY_BALL_NECK_BASE && _head.getBlendFace().isActive()) {
continue; // don't render the neck if we have a face model
}
if ((b != BODY_BALL_HEAD_TOP )
&& (b != BODY_BALL_HEAD_BASE )) {
glPushMatrix();

View file

@ -30,6 +30,8 @@ public:
BlendFace(Head* owningHead);
~BlendFace();
bool isActive() const { return _iboID != 0; }
bool render(float alpha);
Q_INVOKABLE void setModelURL(const QUrl& url);

View file

@ -567,6 +567,10 @@ void MyAvatar::renderBody(bool lookingInMirror, bool renderAvatarBalls) {
alpha);
}
if (b == BODY_BALL_NECK_BASE && _head.getBlendFace().isActive()) {
continue; // don't render the neck if we have a face model
}
if ((b != BODY_BALL_HEAD_TOP )
&& (b != BODY_BALL_HEAD_BASE )) {
glPushMatrix();