History

fix rendering of Circles and Quads

Andrew Meadows committed 9 years ago

Commit 2710dca1 parent 474609d1 file · +6 −6Browse files

Showing the changes to libraries/render-utils/src/GeometryCache.cpp (1 of 1 file). Show all

Unified · Split

libraries/render-utils/src/GeometryCache.cpp+6−6
@@ -482,8 +482,10 @@ void GeometryCache::buildShapes() { · 481 unmodified lines
482482 using namespace geometry;
483483 auto vertexBuffer = std::make_shared<gpu::Buffer>();
484484 auto indexBuffer = std::make_shared<gpu::Buffer>();
485− // Cube
485+ // Cube
486486 setupFlatShape(_shapes[Cube], geometry::cube(), _shapeVertices, _shapeIndices);
487+ //Quad renders as flat Cube
488+ setupFlatShape(_shapes[Quad], geometry::cube(), _shapeVertices, _shapeIndices);
487489 // Tetrahedron
488490 setupFlatShape(_shapes[Tetrahedron], geometry::tetrahedron(), _shapeVertices, _shapeIndices);
489491 // Icosahedron
@@ -524,12 +526,10 @@ void GeometryCache::buildShapes() { · 34 unmodified lines
524526 extrudePolygon<64>(_shapes[Cylinder], _shapeVertices, _shapeIndices);
525527 //Cone,
526528 extrudePolygon<64>(_shapes[Cone], _shapeVertices, _shapeIndices, true);
527− //Circle
528− drawCircle(_shapes[Circle], _shapeVertices, _shapeIndices);
529+ // Circle renders as flat Cylinder
530+ extrudePolygon<64>(_shapes[Circle], _shapeVertices, _shapeIndices);
529531 // Not implemented yet:
530− //Quad,
531− //Torus,
532−
532+ //Torus,
533533 }
534534
535535 const GeometryCache::ShapeData * GeometryCache::getShapeData(const Shape shape) const {