Merge pull request #5118 from ZappoMan/cullingBugs

fix some avatar part culling issues
This commit is contained in:
Philip Rosedale 2015-06-12 11:59:03 -07:00
commit 243b9ee8cf
2 changed files with 10 additions and 1 deletions

View file

@ -161,6 +161,10 @@ void Stats::drawBackground(unsigned int rgba, int x, int y, int width, int heigh
((rgba >> 8) & 0xff) / 255.0f,
(rgba & 0xff) / 255.0f);
// FIX ME: is this correct? It seems to work to fix textures bleeding into us...
glBindTexture(GL_TEXTURE_2D, 0);
glDisable(GL_TEXTURE_2D);
DependencyManager::get<GeometryCache>()->renderQuad(x, y, width, height, color);
}

View file

@ -1783,8 +1783,13 @@ AABox Model::getPartBounds(int meshIndex, int partIndex) {
//
// return calculateScaledOffsetAABox(_calculatedMeshPartBoxes[QPair<int,int>(meshIndex, partIndex)]);
//
// NOTE: we also don't want to use the _calculatedMeshBoxes[] because they don't handle avatar moving correctly
// without recalculating them...
// return _calculatedMeshBoxes[meshIndex];
//
// If we not skinned use the bounds of the subMesh for all it's parts
return _calculatedMeshBoxes[meshIndex];
const FBXMesh& mesh = _geometry->getFBXGeometry().meshes.at(meshIndex);
return calculateScaledOffsetExtents(mesh.meshExtents);
}
return AABox();
}