ValveSoftware / openvr

OpenVR SDK
http://steamvr.com
BSD 3-Clause "New" or "Revised" License
6.06k stars 1.27k forks source link

Simple HMD sample driver seems to be broken without any editing #1861

Open BackTheBack opened 1 month ago

BackTheBack commented 1 month ago

Unzipping it and trying to build the driver in openvr-master\samples\drivers\drivers\simplehmd results in the error 'MyHMDDisplayComponent': cannot instantiate abstract class

this is without me making any edits to the code of the driver and this also happens on the version before the current release, I tested it and it was also broken on a virtual machine and I have not been able to fix it, likely due to my lack of skills using c++

all the other drivers compile without issue without editing any code in them

Rectus commented 1 month ago

Looks like the API was updated fairly recently, and the sample hasn't been updated to work with the new version. You likely need to implement MyHMDDisplayComponent::ComputeInverseDistortion() as it's specified in the header: https://github.com/ValveSoftware/openvr/blob/master/headers/openvr_driver.h#L2912

danwillm commented 4 weeks ago

Thanks - this should be fixed in the next SDK update. As mentioned, the only change needed to get the sample building again is to implement MyHMDDisplayComponent::ComputeInverseDistortion.