nuclear@25: Initialization nuclear@25: -------------- nuclear@25: nuclear@25: Before calling any other function you need to initialize the VR library by nuclear@25: calling ``vr_init``. Similarly, ``vr_shutdown`` frees up all resources held by nuclear@25: the library. nuclear@25: nuclear@25: Libgoatvr has a number of backend modules for interfacing with VR headsets, and nuclear@25: there might be multiple modules compiled with your version of libgoatvr. If you nuclear@25: don't want to rely on the built-in defaults, you might want to enumerate and nuclear@25: select which module to use. nuclear@25: nuclear@25: The following example initializes the library, and prints the list of available nuclear@25: VR modules: nuclear@25: nuclear@25: .. code:: c nuclear@25: nuclear@25: #include nuclear@25: #include nuclear@25: nuclear@25: int main(void) nuclear@25: { nuclear@25: int i, nmod; nuclear@25: nuclear@25: if(vr_init() == -1) { nuclear@25: fprintf(stderr, "failed to initialize goatvr\n"); nuclear@25: return 1; nuclear@25: } nuclear@25: nuclear@25: nmod = vr_module_count(); nuclear@25: printf("There are %d modules:\n", nmod); nuclear@25: for(i=0; i