I’m currently developing a simulation that imports Triangle Meshes from STL files.
My approach is straight-forward using the OSC-example code. In detail, I use the SampleRenderer (from example 4 I think) and added some relevant features for my use case.
Everything works fine so far using one STL file in a single context.
I built a C++/CLI Wrapper and call the functions in a simple C# form.
Now I want to import multiple STL files for independent simulations. I created a vector/pool of SampleRenderer-objects, so I can easily build one renderer for each STL living in it’s own environment with it’s own LaunchParams and so on.
Launching the first renderer in this pool works great, even if I already added 5 STLs to the pool.
Launching every other renderer crashes with an error thrown at optixLaunch(…) with code 7050.
The building process of all renderers is successful, according to the console output.
I found some discussions about multiple contexts in this forum, but I’m not sure if something has changed in the newer Versions. I’m using OptiX 7.
Are there any recommendations? Do I have to ‘dispose’ all contexts that are irrelevant for the launch to avoid memory/data/whatever type of conflict?
Thank you very much, I really enjoy this forum, it already helped me a lot during the last weeks!