mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
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:
parent
ea88cbd75f
commit
5ab3cbb7ec
4 changed files with 9 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue