From 87951ff7b3bfd19f8d824fda7dfa11553aa49b49 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Fri, 12 Jun 2015 11:19:30 -0700 Subject: [PATCH 1/2] quick hack to fix stats texture bleed through --- interface/src/ui/Stats.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/interface/src/ui/Stats.cpp b/interface/src/ui/Stats.cpp index 32df75c46d..8d098b4dc8 100644 --- a/interface/src/ui/Stats.cpp +++ b/interface/src/ui/Stats.cpp @@ -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()->renderQuad(x, y, width, height, color); } From 7d7db65fd1550c0944c962c9a0313a69ea153b49 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Fri, 12 Jun 2015 11:42:38 -0700 Subject: [PATCH 2/2] fix avatar mesh boxes not staying in sync with avatar position --- libraries/render-utils/src/Model.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libraries/render-utils/src/Model.cpp b/libraries/render-utils/src/Model.cpp index 2379058b92..865c225445 100644 --- a/libraries/render-utils/src/Model.cpp +++ b/libraries/render-utils/src/Model.cpp @@ -1783,8 +1783,13 @@ AABox Model::getPartBounds(int meshIndex, int partIndex) { // // return calculateScaledOffsetAABox(_calculatedMeshPartBoxes[QPair(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(); }