---
title: triangleCount
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlaccelerationstructuretrianglegeometrydescriptor/trianglecount
---

# triangleCount

The number of triangles in the buffers.

## Declaration

```swift
var triangleCount: Int { get set }
```

## Discussion

Discussion If the triangle descriptor contains an index buffer, then the index buffer needs to provide indices for this many triangles. If the triangle descriptor doesn’t provide an index buffer, then the vertex buffer provides 3 vertices for each triangle.
