- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All
1) I'm passing my data to rays as following (pseudocode)
struct MyRay : public RTCRay {
MyData * data;
};
It works fine but how to do same with ispc where ray is "varying"?
2) For ispc I've built object files for rtcore_ispc.ispc and myfile.ispc that contains only one export function with rtcInit(). For all others (creating scene, set callbacks, cast rays) I use same C++ code as without ispc. Is it correct?
Thanks
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1) ISPC does not support classes, thus you cannot derive from the Embree ray this way. However, what you can do is just create a new ISPC struct that contains the Embree ray as first argument (e.g. struct ExtendedRay { RTCRay ray; MyData* data; }) and do proper casting.
2) If I understand correct your questions targets on using the C++ and ISPC version of Embree in the same program? This is supported, the only thing to be carefull is to set RTC_INTERSECT1/4/8/16 flags in case one creates the scene on the C++ side and wants to call the rtcIntersect function in ISPC later on that scene.

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