---
name: "rtcDetachGeometry"
section: "3embree4"
platform: "linux"
package: "embree"
version: "4.4.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/rtcDetachGeometry/3embree4"
---

# rtcDetachGeometry(3embree4)

### NAME

-

  ```
  rtcDetachGeometry - detaches a geometry from the scene
  ```

### SYNOPSIS

-

  ```
  #include <embree4/rtcore.h>
  void rtcDetachGeometry(RTCScene scene, unsigned int geomID);
  ```

### DESCRIPTION

This function detaches a geometry identified by its geometry ID (`geomID` argument) from a scene (`scene` argument). When detached, the geometry is no longer contained in the scene.

This function is thread-safe, thus multiple threads can detach geometries from a scene at the same time.

### EXIT STATUS

On failure an error code is set that can be queried using `rtcGetDeviceError`.

### SEE ALSO

\[rtcAttachGeometry\], \[rtcAttachGeometryByID\]
