Broken default light for multi-window setup #1535
-
Hey. So I got the following issue: In my application, it must be possible to independently create and add windows to the VSG. Then, durign runtime, it must also be possible to add/remove models from the per-window scene. Separately, these features already work for me. But: Whereas, when I first open window 1, then add geometry, lighting works as expected. I then add another window and geometry to that, which also works. Question: Do I need to take extra care of states when multiple windows are active, or have I found a bug? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The light(s) need to be each vsg::View, if each vsg::View shares the same subgraph that contains the light(s) then both View's should be lit. Extra windows shouldn't in principle change things, but if the window is on a different graphics device then you may need multiple Vulkan logical vkDevices. There are multiple examples that illustrate multiple views, windows, creating views and windows dynamically: vsgwindows.cpp If you can't spot the error yourself then you might be best to just modify one of these examples to illustrate the problem you are seeing and then share those modifications. I suggest this as trying to debug program and data that only user has in front of them is very hard, often impossible as there are simple way too many unknowns. |
Beta Was this translation helpful? Give feedback.
The light(s) need to be each vsg::View, if each vsg::View shares the same subgraph that contains the light(s) then both View's should be lit.
Extra windows shouldn't in principle change things, but if the window is on a different graphics device then you may need multiple Vulkan logical vkDevices.
There are multiple examples that illustrate multiple views, windows, creating views and windows dynamically:
vsgwindows.cpp
vsgoverlay.cpp
vsgmultiviews.cpp
vsgcameras.cpp
vsgstateswitch.cpp
vsganaglyphicstereo.cpp
If you can't spot the error yourself then you might be best to just modify one of these examples to illustrate the problem you are seeing and then share those modifications. I suggest…