Change Background Color of vsgQt::Window in QT Example #85
-
How do I change the background color from the default color in the rocky qt example. rocky_window->windowAdapter->clearColor() = VkClearColorValue{ 0.0f, 0.0f, 0.0f, 1.0f }; but the color never changes. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It's a bit overly complicated :) You have to find a vsg::View and set the clear values on its RenderGraph. auto view = app.displayManager->windowsAndViews[rocky_window->windowAdapter].front();
app.displayManager->getRenderGraph(view)->setClearValues({ VkClearColorValue{ 0.0f, 0.0f, 0.0f, 1.0f } }); |
Beta Was this translation helpful? Give feedback.
It's a bit overly complicated :) You have to find a vsg::View and set the clear values on its RenderGraph.
In the demo, after the call to
app.displayManager->addWindow
, do this: