History

fix warning about implicit cast from 64 to 32 bits

Andrew Meadows committed 9 years ago

Commit d9ba75c1 parent 886422c1 file · +4 −4Browse files

Showing the changes to libraries/render-utils/src/GeometryCache.cpp (1 of 1 file). Show all

Unified · Split

libraries/render-utils/src/GeometryCache.cpp+4−4
@@ -120,7 +120,7 @@ void GeometryCache::ShapeData::setupBatch(gpu::Batch& batch) const { · 119 unmodified lines
120}120}
121 121
122void GeometryCache::ShapeData::draw(gpu::Batch& batch) const {122void 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
130void GeometryCache::ShapeData::drawWire(gpu::Batch& batch) const {130void 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
140void GeometryCache::ShapeData::drawInstances(gpu::Batch& batch, size_t count) const {140void 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
148void GeometryCache::ShapeData::drawWireInstances(gpu::Batch& batch, size_t count) const {148void 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);

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