0
\$\begingroup\$

I have the situation in which I require different VkPrimitiveTopology's for different models, which requires me to have a unique pipeline's that render the different models, but now I require multiple windows open at the same time. Is there any way to use the pipelines for multiple windows or will I require a different set for the new window?

The secondary windows could be a different size to the main window, that's why I ask because I know when a window resizes you require to rebuild the pipeline.

\$\endgroup\$
3
\$\begingroup\$

As for multiple pipelines for multiple windows - that depends if rendering to those windows is performed using separate logical devices or not. If You have only one logical device, You can also share pipeline objects and use them to render to multiple windows (swapchains). If each window has it's own logical device, You need separate pipelines.

And for the windows' sizes - when You resize a window, You need to recreate a swapchain. This causes swapchain images to be also recreated thus You also need new framebuffers. But You don't have to recreate pipelines.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ So in the case of having two windows with different pipelines (as they would be rendering the same scene but from different angles) I would need separate pipelines for each? \$\endgroup\$ – 0xen Jul 25 '17 at 14:26
  • 2
    \$\begingroup\$ To render a scene from different perspective You don't need separate pipelines, only different transformation matrices (possibly different descriptor sets, each with the same layout). And I don't understand the part about two windows with different pipelines. Each window has it's own swapchain. If You have only one device to render into multiple windows, You can share pipelines across them (common pipeline objects may be used to render into multiple windows). \$\endgroup\$ – Ekzuzy Jul 25 '17 at 17:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.