You won't like the answer, because the sad reality is that it has no open sources available to us.
OpenVR is a purely virtual interface library, yes interfaces are open source, but the actual implementations of those interface are not. In case of libopenvr_api
(it looks like) those are appended as a binary blob to the interface build.
The way that works is through factory functions that are declared in the interface library, but defined somewhere else, those externally defined parts are like a black box to us, and unless Valve suddenly change their minds it'll remain that way.
Those factory functions are declared and used in the OPENVR_INTERFACE_INTERNAL
sections of openvr.h
and openvr_driver.h
(also in case of openvr.h
those factory functions are defined in openvr_capi.h
, but they use factory functions that are defined in a shared library which is just loaded at runtime and the entire pattern is very similar to the one in openvr.h
).
EDIT:
(also in case of openvr.h
those factory functions are defined in openvr_capi.h
, but they use factory functions that are defined in a shared library which is just loaded at runtime and the entire pattern is very similar to the one in openvr.h
)
My memory is clearly failing me, the internal factory functions are defined in openvr_api_public.cpp
which is one of the source files libopenvr_api
is build from, not in openvr_capi.h
(in my defense i didn't look at libopenvr_api
sources in a while).