Showing the changes to libraries/render-utils/src/GeometryCache.cpp (1 of 1 file). Show all
Unified · Split
| @@ -120,7 +120,7 @@ void GeometryCache::ShapeData::setupBatch(gpu::Batch& batch) const { · 119 unmodified lines | |||
| 120 | } | 120 | } |
| 121 | 121 | ||
| 122 | void GeometryCache::ShapeData::draw(gpu::Batch& batch) const { | 122 | void GeometryCache::ShapeData::draw(gpu::Batch& batch) const { |
| 123 | gpu::Buffer::Size numIndices = _indicesView.getNumElements(); | 123 | uint32_t numIndices = (uint32_t)_indicesView.getNumElements(); |
| 124 | if (numIndices > 0) { | 124 | if (numIndices > 0) { |
| 125 | setupBatch(batch); | 125 | setupBatch(batch); |
| 126 | batch.drawIndexed(gpu::TRIANGLES, numIndices, 0); | 126 | batch.drawIndexed(gpu::TRIANGLES, numIndices, 0); |
| @@ -128,7 +128,7 @@ void GeometryCache::ShapeData::draw(gpu::Batch& batch) const { · 1 unmodified line | |||
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | void GeometryCache::ShapeData::drawWire(gpu::Batch& batch) const { | 130 | void GeometryCache::ShapeData::drawWire(gpu::Batch& batch) const { |
| 131 | gpu::Buffer::Size numIndices = _wireIndicesView.getNumElements(); | 131 | uint32_t numIndices = (uint32_t)_wireIndicesView.getNumElements(); |
| 132 | if (numIndices > 0) { | 132 | if (numIndices > 0) { |
| 133 | batch.setInputBuffer(gpu::Stream::POSITION, _positionView); | 133 | batch.setInputBuffer(gpu::Stream::POSITION, _positionView); |
| 134 | batch.setInputBuffer(gpu::Stream::NORMAL, _normalView); | 134 | batch.setInputBuffer(gpu::Stream::NORMAL, _normalView); |
| @@ -138,7 +138,7 @@ void GeometryCache::ShapeData::drawWire(gpu::Batch& batch) const { · 3 unmodified lines | |||
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | void GeometryCache::ShapeData::drawInstances(gpu::Batch& batch, size_t count) const { | 140 | void GeometryCache::ShapeData::drawInstances(gpu::Batch& batch, size_t count) const { |
| 141 | gpu::Buffer::Size numIndices = _indicesView.getNumElements(); | 141 | uint32_t numIndices = (uint32_t)_indicesView.getNumElements(); |
| 142 | if (numIndices > 0) { | 142 | if (numIndices > 0) { |
| 143 | setupBatch(batch); | 143 | setupBatch(batch); |
| 144 | batch.drawIndexedInstanced((gpu::uint32)count, gpu::TRIANGLES, numIndices, 0); | 144 | batch.drawIndexedInstanced((gpu::uint32)count, gpu::TRIANGLES, numIndices, 0); |
| @@ -146,7 +146,7 @@ void GeometryCache::ShapeData::drawInstances(gpu::Batch& batch, size_t count) co · 1 unmodified line | |||
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | void GeometryCache::ShapeData::drawWireInstances(gpu::Batch& batch, size_t count) const { | 148 | void GeometryCache::ShapeData::drawWireInstances(gpu::Batch& batch, size_t count) const { |
| 149 | gpu::Buffer::Size numIndices = _wireIndicesView.getNumElements(); | 149 | uint32_t numIndices = (uint32_t)_wireIndicesView.getNumElements(); |
| 150 | if (numIndices > 0) { | 150 | if (numIndices > 0) { |
| 151 | batch.setInputBuffer(gpu::Stream::POSITION, _positionView); | 151 | batch.setInputBuffer(gpu::Stream::POSITION, _positionView); |
| 152 | batch.setInputBuffer(gpu::Stream::NORMAL, _normalView); | 152 | batch.setInputBuffer(gpu::Stream::NORMAL, _normalView); |