Quick question - OptiX initialization

Good Morning,

I have a quick question regarding the optixInit() function for OptiX 7.x. Does this function only exist for OptiX7.0 ? Does OptiX 6.x and less have a call similar to optixInit()?

Thank you.

The OptiX 7 helper function optixInit() in optix_stubs.h loads the OptiX 7 API entry point function table dynamically into a global variable of type OptixFunctionTable.

That is specific to the OptiX 7 API and doesn’t exist in the previous OptiX API where you simply link against the optix.65.lib, for example

It’s also not mandatory to use any of the optix_stubs.h functions in your OptiX 7 application.
For example, in my OptiX 7 examples I’m loading the OptiX function table per device.
Finding the OptiX driver DLL module handle under Windows is the crucial part in that.
https://github.com/NVIDIA/OptiX_Apps/blob/master/apps/nvlink_shared/src/Device.cpp

You can see the OptiX initialization differences when comparing my initOptiX() functions in these examples:
Old OptiX API: optixIntro_07
OptiX 7 API and CUDA Runtime API: intro_runtime
OptiX 7 API and CUDA Driver API: intro_driver

Cool, that’s exactly what I wanted to know. Thank you @droettger