- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are the rtcNewScene and rtcNewGeometry functions thread safe when called concurrently with a shared RTCDevice? I assume not but I don't want to put in redundant locking if it's handled internally.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
All operations that take the device are thread safe, e.g. you can create scenes for a single device from multiple scenes. Other objects are typically not thread safe, thus you cannot attach geometries from multiple threads to the same scene. However, for different objects that works. thus each thread can work on a different scene. Similar each thread can work on separate geometries, but not on the same.
An exception are functions that only read state and are intended for rendering. E.g. the rtcIntersectXX and rtcInterpolateXX functions can get called from multiple threads (as long as no thread is modifying the underlying objects with some API calls).
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also, if I have multiple RTCScene objects sharing a single RTCDevice, is it safe to modify the scenes (eg rtcAttachGeometry, rtcSetNewGeometryBuffer, rtcCommitGeometry, rtcCommitScene, etc) concurrently from multiple threads? Or should I be using multiple RTCDevice objects? Or a single RTCDevice with mutex locking?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
All operations that take the device are thread safe, e.g. you can create scenes for a single device from multiple scenes. Other objects are typically not thread safe, thus you cannot attach geometries from multiple threads to the same scene. However, for different objects that works. thus each thread can work on a different scene. Similar each thread can work on separate geometries, but not on the same.
An exception are functions that only read state and are intended for rendering. E.g. the rtcIntersectXX and rtcInterpolateXX functions can get called from multiple threads (as long as no thread is modifying the underlying objects with some API calls).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In my case different threads will always be working with different scenes and geometry, the only thing shared between threads is the device. I won't be modifying the same scene or geometry concurrently so it sounds like I will be safe. Thanks!

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page