I couldn't find the implementation (aka. source) of the pure virtual functions from the openvr header.
I am mainly interested in the GetProjectionMatrix()
function.
Where I searched (with no results):
- Simple goole search
- Searched the repo for the function name
- In the extracted symbols, import and export tables of most of the included libraries (.dll and .lib)
What I found so far: https://github.com/ValveSoftware/openvr/issues/103 , but this seems to deal with problems generated by different compilers. The error of this issue is generated in vrclient.dll provided by SteamVR. There seems to be no public source for both of them.
Any idea, how (/where) these virtual functions are implemented?
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 ofopenvr.h
andopenvr_driver.h
(also in case ofopenvr.h
those factory functions are defined inopenvr_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 inopenvr.h
).EDIT:
My memory is clearly failing me, the internal factory functions are defined in
openvr_api_public.cpp
which is one of the source fileslibopenvr_api
is build from, not inopenvr_capi.h
(in my defense i didn't look atlibopenvr_api
sources in a while).