I extended the optixMeshViewer to include a graph, in the image I show you the minimum graph that generates a crash at the time the context gets destroyed (context->destroy()) when trying to close the application.
context->validate does not generate any error and the actual result on the screen is as expected and correct.
Here the coe
Group root = c->createGroup(); root->setAcceleration(c->createAcceleration("Trbvh")); root->setChildCount(1); Geometry geo = c->createGeometry(); geo->setPrimitiveCount(1); geo->setIntersectionProgram(p["GeoIntersection"]); geo->setBoundingBoxProgram(p["GeoBound"]); GeometryGroup GG = c->createGeometryGroup(); GG->setAcceleration(c->createAcceleration("Trbvh")); GG->setChildCount(1); GeometryInstance GI = c->createGeometryInstance(); GI->setGeometry(Geo); GI->setMaterialCount(1); GI->setMaterial(0, material); GG->setChild(0, GI); root->setChild(0, GG);
By not including the GI in the group the application closes without a crash.
Using the complete graph (to the right) with no acceleration also results with the same crash.
Is there something invalid or wrong with the graph? Would it be possible to destroy the root independently before the context as a workaround?
Appreciate your help