History

merge with hifi/plugins

Sam Gondelman committed 11 years ago

Commit f69b7552 parents 8fbbb26 95000ee231 files · +6439 −5987Browse files

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

Unified · Split

interface/src/avatar/SkeletonModel.cpp+6−8
@@ -780,7 +780,7 @@ void SkeletonModel::resetShapePositionsToDefaultPose() { · 779 unmodified lines
780780 _boundingShape.setRotation(_rotation);
781781 }
782782
783−void SkeletonModel::renderBoundingCollisionShapes(float alpha) {
783+void SkeletonModel::renderBoundingCollisionShapes(gpu::Batch& batch, float alpha) {
784784 const int BALL_SUBDIVISIONS = 10;
785785 #if 0
786786 if (_shapes.isEmpty()) {
@@ -788,17 +788,17 @@ void SkeletonModel::renderBoundingCollisionShapes(float alpha) { · 1 unmodified line
788788 // so no need to render it
789789 return;
790790 }
791− glPushMatrix();
792−
793791 Application::getInstance()->loadTranslatedViewMatrix(_translation);
794792
795793 // draw a blue sphere at the capsule endpoint
796794 glm::vec3 endPoint;
797795 _boundingShape.getEndPoint(endPoint);
798796 endPoint = endPoint - _translation;
799− glTranslatef(endPoint.x, endPoint.y, endPoint.z);
797+ Transform transform = Transform();
798+ transform.setTranslation(endPoint);
799+ batch.setModelTransform(transform);
800800 auto geometryCache = DependencyManager::get<GeometryCache>();
801− geometryCache->renderSphere(_boundingShape.getRadius(), BALL_SUBDIVISIONS, BALL_SUBDIVISIONS, glm::vec4(0.6f, 0.6f, 0.8f, alpha));
801+ geometryCache->renderSphere(batch, _boundingShape.getRadius(), BALL_SUBDIVISIONS, BALL_SUBDIVISIONS, glm::vec4(0.6f, 0.6f, 0.8f, alpha));
802802
803803 // draw a yellow sphere at the capsule startpoint
804804 glm::vec3 startPoint;
@@ -810,9 +810,7 @@ void SkeletonModel::renderBoundingCollisionShapes(float alpha) { · 5 unmodified lines
810810
811811 // draw a green cylinder between the two points
812812 glm::vec3 origin(0.0f);
813− Avatar::renderJointConnectingCone( origin, axis, _boundingShape.getRadius(), _boundingShape.getRadius(), glm::vec4(0.6f, 0.8f, 0.6f, alpha));
814−
815− glPopMatrix();
813+ Avatar::renderJointConnectingCone(batch, origin, axis, _boundingShape.getRadius(), _boundingShape.getRadius(), glm::vec4(0.6f, 0.8f, 0.6f, alpha));
816814 #endif
817815 }
818816

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