openvr icon indicating copy to clipboard operation
openvr copied to clipboard

fix crash when axes are rendered but m_bShowCubes is toggled off

Open Pyrolistical opened this issue 1 year ago • 1 comments

m_bShowCubes can be toggled off by typing the letter c. axes are rendered when a tracked device controller is connected.

when both m_bShowCubes is false and axes are rendered, the sample crashes.

this is because the g_MVPMatrix constant buffer is not being set for the axes rendering.

what was happening when m_bShowCubes was true, the axes rendering was inheriting the g_MVPMatrix constant buffer for the scene rendering.

this pr fixes the crash by always setting the g_MVPMatrix constant buffer for axes rendering.

Pyrolistical avatar Apr 29 '24 08:04 Pyrolistical

the hellovr_vulkan also seems to have this bug, but I am not setup to test it.

this line should be copied to the axes rendering https://github.com/ValveSoftware/openvr/blob/ae46a8dd0172580648c8922658a100439115d3eb/samples/hellovr_vulkan/hellovr_vulkan_main.cpp#L3021

Pyrolistical avatar Apr 29 '24 08:04 Pyrolistical