diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 58c4f2a3a4..dde0b1cf29 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -343,7 +343,7 @@ public: // Don't actually crash in debug builds, in case this apparent deadlock is simply from // the developer actively debugging code #ifdef NDEBUG - // deadlockDetectionCrash(); + deadlockDetectionCrash(); #endif } } diff --git a/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.cpp b/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.cpp index 80ac4130b9..60aaefcb6f 100644 --- a/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.cpp @@ -65,7 +65,6 @@ const float MARCHING_CUBE_COLLISION_HULL_OFFSET = 0.5; - /* A PolyVoxEntity has several interdependent parts: @@ -737,39 +736,6 @@ void RenderablePolyVoxEntityItem::render(RenderArgs* args) { !mesh->getIndexBuffer()._buffer) { return; } - -/* if (!_pipelines[0]) { - gpu::ShaderPointer vertexShaders[2] = { gpu::Shader::createVertex(std::string(polyvox_vert)), gpu::Shader::createVertex(std::string(polyvox_fade_vert)) }; - gpu::ShaderPointer pixelShaders[2] = { gpu::Shader::createPixel(std::string(polyvox_frag)), gpu::Shader::createPixel(std::string(polyvox_fade_frag)) }; - - gpu::Shader::BindingSet slotBindings; - slotBindings.insert(gpu::Shader::Binding(std::string("materialBuffer"), MATERIAL_GPU_SLOT)); - slotBindings.insert(gpu::Shader::Binding(std::string("fadeParametersBuffer"), render::ShapePipeline::Slot::BUFFER::FADE_PARAMETERS)); - slotBindings.insert(gpu::Shader::Binding(std::string("xMap"), 0)); - slotBindings.insert(gpu::Shader::Binding(std::string("yMap"), 1)); - slotBindings.insert(gpu::Shader::Binding(std::string("zMap"), 2)); - slotBindings.insert(gpu::Shader::Binding(std::string("fadeMaskMap"), render::ShapePipeline::Slot::MAP::FADE_MASK)); - - auto state = std::make_shared(); - state->setCullMode(gpu::State::CULL_BACK); - state->setDepthTest(true, true, gpu::LESS_EQUAL); - PrepareStencil::testMaskDrawShape(*state); - - auto wireframeState = std::make_shared(); - wireframeState->setCullMode(gpu::State::CULL_BACK); - wireframeState->setDepthTest(true, true, gpu::LESS_EQUAL); - wireframeState->setFillMode(gpu::State::FILL_LINE); - PrepareStencil::testMaskDrawShape(*wireframeState); - - // Two sets of pipelines: normal and fading - for (auto i = 0; i < 2; i++) { - gpu::ShaderPointer program = gpu::Shader::createProgram(vertexShaders[i], pixelShaders[i]); - gpu::Shader::makeProgram(*program, slotBindings); - - _pipelines[i] = gpu::Pipeline::create(program, state); - _wireframePipelines[i] = gpu::Pipeline::create(program, wireframeState); - } - }*/ if (!_vertexFormat) { auto vf = std::make_shared(); @@ -780,12 +746,6 @@ void RenderablePolyVoxEntityItem::render(RenderArgs* args) { gpu::Batch& batch = *args->_batch; - // Pick correct Pipeline -// bool wireframe = (render::ShapeKey(args->_globalShapeKey).isWireframe()); -// auto pipelineVariation = isFading() & 1; -// auto pipeline = (wireframe ? _wireframePipelines[pipelineVariation]: _pipelines[pipelineVariation]); -// batch.setPipeline(pipeline); - Transform transform(voxelToWorldMatrix()); batch.setModelTransform(transform); batch.setInputFormat(_vertexFormat); @@ -1691,7 +1651,7 @@ void RenderablePolyVoxEntityItem::bonkNeighbors() { void RenderablePolyVoxEntityItem::locationChanged(bool tellPhysics) { EntityItem::locationChanged(tellPhysics); - if (/*!_pipelines[0] ||*/ !render::Item::isValidID(_myItem)) { + if (!render::Item::isValidID(_myItem)) { return; } render::ScenePointer scene = AbstractViewStateInterface::instance()->getMain3DScene(); diff --git a/libraries/render/src/render/DrawTask.cpp b/libraries/render/src/render/DrawTask.cpp index f7712f59e7..a3175ffdec 100755 --- a/libraries/render/src/render/DrawTask.cpp +++ b/libraries/render/src/render/DrawTask.cpp @@ -44,13 +44,6 @@ void renderShape(RenderArgs* args, const ShapePlumberPointer& shapeContext, cons auto key = item.getShapeKey() | globalKey; if (key.isValid() && !key.hasOwnPipeline()) { args->_shapePipeline = shapeContext->pickPipeline(args, key); - /* if (!args->_shapePipeline) { - if (key.isCustom()) { - if (item.defineCustomShapePipeline(*shapeContext, key)) { - args->_shapePipeline = shapeContext->pickPipeline(args, key); - } - } - }*/ if (args->_shapePipeline) { args->_shapePipeline->prepareShapeItem(args, key, item); item.render(args); @@ -119,18 +112,6 @@ void render::renderStateSortShapes(const RenderContextPointer& renderContext, auto& bucket = sortedShapes[pipelineKey]; args->_shapePipeline = shapeContext->pickPipeline(args, pipelineKey); if (!args->_shapePipeline) { - /* if (pipelineKey.isCustom()) { - if (bucket.front().defineCustomShapePipeline(*shapeContext, pipelineKey)) { - args->_shapePipeline = shapeContext->pickPipeline(args, pipelineKey); - if (!args->_shapePipeline) { - - } else { - continue; - } - } else { - continue; - } - }*/ continue; } for (auto& item : bucket) {