History

Buffer usage flags

Brad Davis committed 8 years ago

Commit ea485d01 parent 935a4b348 files · +281 −332Browse files

Showing the changes to libraries/render/src/render/DrawSceneOctree.cpp (1 of 48 files). Show all

Unified · Split

libraries/render/src/render/DrawSceneOctree.cpp+5−4
@@ -73,6 +73,7 @@ void DrawSceneOctree::configure(const Config& config) { · 72 unmodified lines
73 _showLODReticle = config.showLODReticle;73 _showLODReticle = config.showLODReticle;
74}74}
75 75
76
76void DrawSceneOctree::run(const RenderContextPointer& renderContext, const ItemSpatialTree::ItemSelection& inSelection) {77void DrawSceneOctree::run(const RenderContextPointer& renderContext, const ItemSpatialTree::ItemSelection& inSelection) {
77 assert(renderContext->args);78 assert(renderContext->args);
78 assert(renderContext->args->hasViewFrustum());79 assert(renderContext->args->hasViewFrustum());
@@ -173,16 +174,16 @@ void DrawItemSelection::run(const RenderContextPointer& renderContext, const Ite · 94 unmodified lines
173 auto& scene = renderContext->_scene;174 auto& scene = renderContext->_scene;
174 175
175 if (!_boundsBufferInside) {176 if (!_boundsBufferInside) {
176 _boundsBufferInside = std::make_shared<gpu::Buffer>(sizeof(render::ItemBound));177 _boundsBufferInside = std::make_shared<gpu::Buffer>(gpu::Buffer::ResourceBuffer, sizeof(render::ItemBound));
177 }178 }
178 if (!_boundsBufferInsideSubcell) {179 if (!_boundsBufferInsideSubcell) {
179 _boundsBufferInsideSubcell = std::make_shared<gpu::Buffer>(sizeof(render::ItemBound));180 _boundsBufferInsideSubcell = std::make_shared<gpu::Buffer>(gpu::Buffer::ResourceBuffer, sizeof(render::ItemBound));
180 }181 }
181 if (!_boundsBufferPartial) {182 if (!_boundsBufferPartial) {
182 _boundsBufferPartial = std::make_shared<gpu::Buffer>(sizeof(render::ItemBound));183 _boundsBufferPartial = std::make_shared<gpu::Buffer>(gpu::Buffer::ResourceBuffer, sizeof(render::ItemBound));
183 }184 }
184 if (!_boundsBufferPartialSubcell) {185 if (!_boundsBufferPartialSubcell) {
185 _boundsBufferPartialSubcell = std::make_shared<gpu::Buffer>(sizeof(render::ItemBound));186 _boundsBufferPartialSubcell = std::make_shared<gpu::Buffer>(gpu::Buffer::ResourceBuffer, sizeof(render::ItemBound));
186 }187 }
187 188
188 gpu::doInBatch("DrawItemSelection::run", args->_context, [&](gpu::Batch& batch) {189 gpu::doInBatch("DrawItemSelection::run", args->_context, [&](gpu::Batch& batch) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t