Fixed the 2 remianing issues before PR, the shadow program needed to have the binding assigned and the Head of the avatar isn't getting it's BBox evaluated

This commit is contained in:
Sam Gateau 2015-02-27 17:11:16 -08:00
parent ea88cbd75f
commit 5ab3cbb7ec
4 changed files with 9 additions and 0 deletions

View file

@ -39,6 +39,8 @@ void FaceModel::simulate(float deltaTime, bool fullUpdate) {
setPupilDilation(_owningHead->getPupilDilation());
setBlendshapeCoefficients(_owningHead->getBlendshapeCoefficients());
invalidCalculatedMeshBoxes();
if (isActive()) {
setOffset(-_geometry->getFBXGeometry().neckPivot);
Model::simulateInternal(deltaTime);

View file

@ -251,6 +251,7 @@ void Head::render(float alpha, ViewFrustum* renderFrustum, Model::RenderMode mod
} else {
RenderArgs args;
args._viewFrustum = renderFrustum;
// _faceModel._calculatedMeshBoxesValid = false;
_faceModel.render(alpha, mode, &args);
}
}

View file

@ -336,6 +336,9 @@ void Model::init() {
_shadowProgram.addShaderFromSourceCode(QGLShader::Vertex, model_shadow_vert);
_shadowProgram.addShaderFromSourceCode(QGLShader::Fragment, model_shadow_frag);
// Shadow program uses the same locations as standard rendering path but we still need to set the bindings
Model::Locations tempLoc;
initProgram(_shadowProgram, tempLoc);
_skinProgram.addShaderFromSourceCode(QGLShader::Vertex, skin_model_vert);
_skinProgram.addShaderFromSourceCode(QGLShader::Fragment, model_frag);

View file

@ -269,6 +269,9 @@ protected:
/// first free ancestor.
float getLimbLength(int jointIndex) const;
/// Allow sub classes to force invalidating the bboxes
void invalidCalculatedMeshBoxes() { _calculatedMeshBoxesValid = false; }
private:
friend class AnimationHandle;