History

remove more naked gl

ZappoMan committed 11 years ago

Commit 7795eaa1 parent d1e511e1 file · +9 −4Browse files

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

Unified · Split

interface/src/avatar/SkeletonModel.cpp+9−4
@@ -791,19 +791,24 @@ void SkeletonModel::renderBoundingCollisionShapes(gpu::Batch& batch, float alpha · 790 unmodified lines
791 transform.setTranslation(endPoint);791 transform.setTranslation(endPoint);
792 batch.setModelTransform(transform);792 batch.setModelTransform(transform);
793 auto geometryCache = DependencyManager::get<GeometryCache>();793 auto geometryCache = DependencyManager::get<GeometryCache>();
794 geometryCache->renderSphere(batch, _boundingShape.getRadius(), BALL_SUBDIVISIONS, BALL_SUBDIVISIONS, glm::vec4(0.6f, 0.6f, 0.8f, alpha));794 geometryCache->renderSphere(batch, _boundingShape.getRadius(), BALL_SUBDIVISIONS, BALL_SUBDIVISIONS,
795 glm::vec4(0.6f, 0.6f, 0.8f, alpha));
795 796
796 // draw a yellow sphere at the capsule startpoint797 // draw a yellow sphere at the capsule startpoint
797 glm::vec3 startPoint;798 glm::vec3 startPoint;
798 _boundingShape.getStartPoint(startPoint);799 _boundingShape.getStartPoint(startPoint);
799 startPoint = startPoint - _translation;800 startPoint = startPoint - _translation;
800 glm::vec3 axis = endPoint - startPoint;801 glm::vec3 axis = endPoint - startPoint;
801 glTranslatef(-axis.x, -axis.y, -axis.z);802 Transform axisTransform = Transform();
802 geometryCache->renderSphere(_boundingShape.getRadius(), BALL_SUBDIVISIONS, BALL_SUBDIVISIONS, glm::vec4(0.8f, 0.8f, 0.6f, alpha));803 axisTransform.setTranslation(-axis);
804 batch.setModelTransform(axisTransform);
805 geometryCache->renderSphere(batch, _boundingShape.getRadius(), BALL_SUBDIVISIONS, BALL_SUBDIVISIONS,
806 glm::vec4(0.8f, 0.8f, 0.6f, alpha));
803 807
804 // draw a green cylinder between the two points808 // draw a green cylinder between the two points
805 glm::vec3 origin(0.0f);809 glm::vec3 origin(0.0f);
806 Avatar::renderJointConnectingCone(batch, origin, axis, _boundingShape.getRadius(), _boundingShape.getRadius(), glm::vec4(0.6f, 0.8f, 0.6f, alpha));810 Avatar::renderJointConnectingCone(batch, origin, axis, _boundingShape.getRadius(), _boundingShape.getRadius(),
811 glm::vec4(0.6f, 0.8f, 0.6f, alpha));
807}812}
808 813
809bool SkeletonModel::hasSkeleton() {814bool SkeletonModel::hasSkeleton() {

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