Showing the changes to libraries/script-engine/src/ModelScriptingInterface.cpp (1 of 5 files). Show all
Unified · Split
| @@ -61,7 +61,12 @@ QScriptValue ModelScriptingInterface::appendMeshes(MeshProxyList in) { · 60 unmodified lines | |||
| 61 | foreach (const MeshProxy* meshProxy, in) { | 61 | foreach (const MeshProxy* meshProxy, in) { |
| 62 | MeshPointer mesh = meshProxy->getMeshPointer(); | 62 | MeshPointer mesh = meshProxy->getMeshPointer(); |
| 63 | totalVertexCount += mesh->getNumVertices(); | 63 | totalVertexCount += mesh->getNumVertices(); |
| 64 | totalAttributeCount += mesh->getNumAttributes(); | 64 | |
| 65 | int attributeTypeNormal = gpu::Stream::InputSlot::NORMAL; // libraries/gpu/src/gpu/Stream.h | ||
| 66 | const gpu::BufferView& normalsBufferView = mesh->getAttributeBuffer(attributeTypeNormal); | ||
| 67 | gpu::BufferView::Index numNormals = (gpu::BufferView::Index)normalsBufferView.getNumElements(); | ||
| 68 | totalAttributeCount += numNormals; | ||
| 69 | |||
| 65 | totalIndexCount += mesh->getNumIndices(); | 70 | totalIndexCount += mesh->getNumIndices(); |
| 66 | } | 71 | } |
| 67 | 72 | ||