Skip to content

when the window size has been changed, how can i do to remain one of view size in vsg mulitviews sample? #725

Answered by robertosfield
redflare2023 asked this question in Q&A
Discussion options

You must be logged in to vote

The resizing the vsg::View's viewport and adjustment of the Camera projection matrices in response to a window resize is handled by the vsg::WindowResizeHandler class:

https://github.com/vsg-dev/VulkanSceneGraph/blob/master/include/vsg/app/WindowResizeHandler.h

The vsg::RenderGraph that handles the rendering for a window "has a" WindowSizeHandler that is automatically assigned in the RenderGraph constructor:

https://github.com/vsg-dev/VulkanSceneGraph/blob/master/src/vsg/app/RenderGraph.cpp#L29

The WindowResizeHandler is invoked automatically by the RenderGraph::resized() method, you don't need to call this as it's handled for you:

https://github.com/vsg-dev/VulkanSceneGraph/blob/master/s…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@redflare2023
Comment options

Answer selected by redflare2023
Comment options

You must be logged in to vote
1 reply
@robertosfield
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants