Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix crash when axes are rendered but m_bShowCubes is toggled off #1829

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Pyrolistical
Copy link

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
Copy link
Author

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

memcpy( m_pSceneConstantBufferData[ nEye ], GetCurrentViewProjectionMatrix( nEye ).get(), sizeof( Matrix4 ) );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant