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
791791 transform.setTranslation(endPoint);
792792 batch.setModelTransform(transform);
793793 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));
795796
796797 // draw a yellow sphere at the capsule startpoint
797798 glm::vec3 startPoint;
798799 _boundingShape.getStartPoint(startPoint);
799800 startPoint = startPoint - _translation;
800801 glm::vec3 axis = endPoint - startPoint;
801− glTranslatef(-axis.x, -axis.y, -axis.z);
802− geometryCache->renderSphere(_boundingShape.getRadius(), BALL_SUBDIVISIONS, BALL_SUBDIVISIONS, glm::vec4(0.8f, 0.8f, 0.6f, alpha));
802+ Transform axisTransform = Transform();
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));
803807
804808 // draw a green cylinder between the two points
805809 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));
807812 }
808813
809814 bool 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