Merge branch 'master' of github.com:highfidelity/hifi into controller-dispatcher-1

This commit is contained in:
druiz17 2017-09-08 17:07:47 -07:00
commit bf1b5bd061
2 changed files with 13 additions and 5 deletions

View file

@ -648,7 +648,9 @@ void Avatar::render(RenderArgs* renderArgs) {
return;
}
fixupModelsInScene(renderArgs->_scene);
if (!isMyAvatar()) {
fixupModelsInScene(renderArgs->_scene);
}
if (showCollisionShapes && shouldRenderHead(renderArgs) && _skeletonModel->isRenderable()) {
PROFILE_RANGE_BATCH(batch, __FUNCTION__":skeletonBoundingCollisionShapes");

View file

@ -9,6 +9,8 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <LogHandler.h>
#include "DrawTask.h"
#include "Logging.h"
@ -48,12 +50,14 @@ void renderShape(RenderArgs* args, const ShapePlumberPointer& shapeContext, cons
if (args->_shapePipeline) {
args->_shapePipeline->prepareShapeItem(args, key, item);
item.render(args);
}
}
args->_shapePipeline = nullptr;
} else if (key.hasOwnPipeline()) {
item.render(args);
} else {
qCDebug(renderlogging) << "Item could not be rendered with invalid key" << key;
static QString repeatedCouldNotBeRendered = LogHandler::getInstance().addRepeatedMessageRegex(
"Item could not be rendered with invalid key.*");
}
args->_itemShapeKey = 0;
}
@ -62,7 +66,7 @@ void render::renderShapes(const RenderContextPointer& renderContext,
const ShapePlumberPointer& shapeContext, const ItemBounds& inItems, int maxDrawnItems, const ShapeKey& globalKey) {
auto& scene = renderContext->_scene;
RenderArgs* args = renderContext->args;
int numItemsToDraw = (int)inItems.size();
if (maxDrawnItems != -1) {
numItemsToDraw = glm::min(numItemsToDraw, maxDrawnItems);
@ -104,6 +108,8 @@ void render::renderStateSortShapes(const RenderContextPointer& renderContext,
} else if (key.hasOwnPipeline()) {
ownPipelineBucket.push_back( std::make_tuple(item, key) );
} else {
static QString repeatedCouldNotBeRendered = LogHandler::getInstance().addRepeatedMessageRegex(
"Item could not be rendered with invalid key.*");
qCDebug(renderlogging) << "Item could not be rendered with invalid key" << key;
}
}
@ -113,7 +119,7 @@ void render::renderStateSortShapes(const RenderContextPointer& renderContext,
for (auto& pipelineKey : sortedPipelines) {
auto& bucket = sortedShapes[pipelineKey];
args->_shapePipeline = shapeContext->pickPipeline(args, pipelineKey);
if (!args->_shapePipeline) {
if (!args->_shapePipeline) {
continue;
}
args->_itemShapeKey = pipelineKey._flags.to_ulong();
@ -182,7 +188,7 @@ void DrawBounds::run(const RenderContextPointer& renderContext,
if (!_drawBuffer) {
_drawBuffer = std::make_shared<gpu::Buffer>(sizeOfItemBound);
}
_drawBuffer->setData(numItems * sizeOfItemBound, (const gpu::Byte*) items.data());
gpu::doInBatch(args->_context, [&](gpu::Batch& batch) {