VulkanSceneGraph icon indicating copy to clipboard operation
VulkanSceneGraph copied to clipboard

creating of builder object fail when shadows are enabled

Open rainergericke opened this issue 8 months ago • 2 comments

Describe the bug Creation of vsg::Builder objects should be possible in the render loop (see example) but crashes

To Reproduce Just build the example whithout args, start it, wait for frame 500, see what happens.

Expected behavior We should see an additional green box whithout errors.

Screenshots n. a.

Desktop (please complete the following information):

  • OS: MacOS 15.4.1, Windows 11

Additional context First found on Windows 11.

shadow_err.txt

shadow_problem.zip

rainergericke avatar May 05 '25 07:05 rainergericke

Thank's for creating the example. What it looks like to me is you've created the subgraph prior to main compile traversal with the subgraph still detatched, and prior to assigning the compile traversal to the Builder, so there is no way for the subgraph to have it's Vulkan objects initialized.

Try creating the the object in the main loop, also I'd recommend putting such additions to the scene graph before/after the update() rather after present, it's it's cleaner to batch updates the scene graph together.

robertosfield avatar May 05 '25 08:05 robertosfield

Thanks for the hints. I tried to make the changes you proposed, but it didn't help.

shadowTest_cpp.txt

rainergericke avatar May 05 '25 09:05 rainergericke