History

Update primitive instance rendering calls

Atlante45 committed 10 years ago

Commit 7e8ea4d1 parent 1658c1513 files · +87 −90Browse files

Showing the changes to interface/src/avatar/SkeletonModel.cpp (1 of 13 files). Show all

Unified · Split

interface/src/avatar/SkeletonModel.cpp+4−6
@@ -349,17 +349,15 @@ void SkeletonModel::renderBoundingCollisionShapes(gpu::Batch& batch, float scale · 348 unmodified lines
349349 // draw a blue sphere at the capsule top point
350350 glm::vec3 topPoint = _translation + getRotation() * (scale * (_boundingCapsuleLocalOffset + (0.5f * _boundingCapsuleHeight) * Vectors::UNIT_Y));
351351
352− geometryCache->renderSolidSphereInstance(batch,
353− Transform().setTranslation(topPoint).postScale(scale * _boundingCapsuleRadius),
354− glm::vec4(0.6f, 0.6f, 0.8f, alpha));
352+ batch.setModelTransform(Transform().setTranslation(topPoint).postScale(scale * _boundingCapsuleRadius));
353+ geometryCache->renderSolidSphereInstance(batch, glm::vec4(0.6f, 0.6f, 0.8f, alpha));
355354
356355 // draw a yellow sphere at the capsule bottom point
357356 glm::vec3 bottomPoint = topPoint - glm::vec3(0.0f, scale * _boundingCapsuleHeight, 0.0f);
358357 glm::vec3 axis = topPoint - bottomPoint;
359358
360− geometryCache->renderSolidSphereInstance(batch,
361− Transform().setTranslation(bottomPoint).postScale(scale * _boundingCapsuleRadius),
362− glm::vec4(0.8f, 0.8f, 0.6f, alpha));
359+ batch.setModelTransform(Transform().setTranslation(bottomPoint).postScale(scale * _boundingCapsuleRadius));
360+ geometryCache->renderSolidSphereInstance(batch, glm::vec4(0.8f, 0.8f, 0.6f, alpha));
363361
364362 // draw a green cylinder between the two points
365363 glm::vec3 origin(0.0f);