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
349 // draw a blue sphere at the capsule top point349 // draw a blue sphere at the capsule top point
350 glm::vec3 topPoint = _translation + getRotation() * (scale * (_boundingCapsuleLocalOffset + (0.5f * _boundingCapsuleHeight) * Vectors::UNIT_Y));350 glm::vec3 topPoint = _translation + getRotation() * (scale * (_boundingCapsuleLocalOffset + (0.5f * _boundingCapsuleHeight) * Vectors::UNIT_Y));
351 351
352 geometryCache->renderSolidSphereInstance(batch,352 batch.setModelTransform(Transform().setTranslation(topPoint).postScale(scale * _boundingCapsuleRadius));
353 Transform().setTranslation(topPoint).postScale(scale * _boundingCapsuleRadius),353 geometryCache->renderSolidSphereInstance(batch, glm::vec4(0.6f, 0.6f, 0.8f, alpha));
354 glm::vec4(0.6f, 0.6f, 0.8f, alpha));
355 354
356 // draw a yellow sphere at the capsule bottom point355 // draw a yellow sphere at the capsule bottom point
357 glm::vec3 bottomPoint = topPoint - glm::vec3(0.0f, scale * _boundingCapsuleHeight, 0.0f);356 glm::vec3 bottomPoint = topPoint - glm::vec3(0.0f, scale * _boundingCapsuleHeight, 0.0f);
358 glm::vec3 axis = topPoint - bottomPoint;357 glm::vec3 axis = topPoint - bottomPoint;
359 358
360 geometryCache->renderSolidSphereInstance(batch,359 batch.setModelTransform(Transform().setTranslation(bottomPoint).postScale(scale * _boundingCapsuleRadius));
361 Transform().setTranslation(bottomPoint).postScale(scale * _boundingCapsuleRadius),360 geometryCache->renderSolidSphereInstance(batch, glm::vec4(0.8f, 0.8f, 0.6f, alpha));
362 glm::vec4(0.8f, 0.8f, 0.6f, alpha));
363 361
364 // draw a green cylinder between the two points362 // draw a green cylinder between the two points
365 glm::vec3 origin(0.0f);363 glm::vec3 origin(0.0f);