I am trying to integrate Optix into the Ogre3D rendering API. Context creation, loading PTX files, creating render buffer using GLBO, validate & compile etc all works, but I get a video driver crash during launch. But that is a topic for another thread on the Ogre3D forums.
My problem is during shutdown. During Optix init, the application performs a test render, catches the exception and starts to shutdown. Of course that includes destroying the Optix context that was created.
However, destroying the context causes an access violation. I am guessing the driver crash is invalidating the Optix context.
Before calling destroy() on the Context, I am calling validate() which does not throw any errors. Yet destroy() causes access violation in optixpp_namespace.h on line 1593.
Is there a way to check that the context is actually still valid? If possible I’d rather not have to use some ugly hack where a render fail skips destroying the Optix context during shutdown.