Showing the changes to libraries/render/src/render/DrawSceneOctree.cpp (1 of 33 files). Show all
Unified · Split
| @@ -24,6 +24,15 @@ · 23 unmodified lines | ||
| 24 | 24 | |
| 25 | 25 | using namespace render; |
| 26 | 26 | |
| 27 | +gpu::PipelinePointer DrawSceneOctree::_drawCellBoundsPipeline; | |
| 28 | +gpu::PipelinePointer DrawSceneOctree::_drawLODReticlePipeline; | |
| 29 | +gpu::PipelinePointer DrawSceneOctree::_drawItemBoundPipeline; | |
| 30 | +gpu::Stream::FormatPointer DrawSceneOctree::_cellBoundsFormat = std::make_shared<gpu::Stream::Format>(); | |
| 31 | + | |
| 32 | +DrawSceneOctree::DrawSceneOctree() { | |
| 33 | + _cellBoundsFormat->setAttribute(0, 0, gpu::Element(gpu::VEC4, gpu::INT32, gpu::XYZW), 0, gpu::Stream::PER_INSTANCE); | |
| 34 | +} | |
| 35 | + | |
| 27 | 36 | const gpu::PipelinePointer DrawSceneOctree::getDrawCellBoundsPipeline() { |
| 28 | 37 | if (!_drawCellBoundsPipeline) { |
| 29 | 38 | gpu::ShaderPointer program = gpu::Shader::createProgram(shader::render::program::drawCellBounds); |
| @@ -36,9 +45,6 @@ const gpu::PipelinePointer DrawSceneOctree::getDrawCellBoundsPipeline() { · 6 unmodified lines | ||
| 36 | 45 | |
| 37 | 46 | // Good to go add the brand new pipeline |
| 38 | 47 | _drawCellBoundsPipeline = gpu::Pipeline::create(program, state); |
| 39 | − _cellBoundsFormat = std::make_shared<gpu::Stream::Format>(); | |
| 40 | − _cellBoundsFormat->setAttribute(0, 0, gpu::Element(gpu::VEC4, gpu::INT32, gpu::XYZW), 0, gpu::Stream::PER_INSTANCE); | |
| 41 | − _cellBoundsBuffer = std::make_shared<gpu::Buffer>(); | |
| 42 | 48 | } |
| 43 | 49 | return _drawCellBoundsPipeline; |
| 44 | 50 | } |
| @@ -62,7 +68,6 @@ void DrawSceneOctree::configure(const Config& config) { · 17 unmodified lines | ||
| 62 | 68 | _showEmptyCells = config.showEmptyCells; |
| 63 | 69 | } |
| 64 | 70 | |
| 65 | − | |
| 66 | 71 | void DrawSceneOctree::run(const RenderContextPointer& renderContext, const ItemSpatialTree::ItemSelection& inSelection) { |
| 67 | 72 | assert(renderContext->args); |
| 68 | 73 | assert(renderContext->args->hasViewFrustum()); |
| @@ -132,6 +137,8 @@ void DrawSceneOctree::run(const RenderContextPointer& renderContext, const ItemS · 63 unmodified lines | ||
| 132 | 137 | }); |
| 133 | 138 | } |
| 134 | 139 | |
| 140 | +gpu::PipelinePointer DrawItemSelection::_drawItemBoundPipeline; | |
| 141 | + | |
| 135 | 142 | const gpu::PipelinePointer DrawItemSelection::getDrawItemBoundPipeline() { |
| 136 | 143 | if (!_drawItemBoundPipeline) { |
| 137 | 144 | gpu::ShaderPointer program = gpu::Shader::createProgram(shader::render::program::drawItemBounds); |