28 #include <vsg/app/Window.h>
29 #include <vsg/commands/ClearAttachments.h>
30 #include <vsg/nodes/Group.h>
31 #include <vsg/vk/DescriptorPool.h>
33 #include <vsgImGui/Export.h>
34 #include <vsgImGui/imgui.h>
39 class VSGIMGUI_DECLSPEC
RenderImGui :
public vsg::Inherit<vsg::Group, RenderImGui>
42 RenderImGui(
const vsg::ref_ptr<vsg::Window>& window,
bool useClearAttachments =
false);
44 RenderImGui(vsg::ref_ptr<vsg::Device> device, uint32_t queueFamily,
45 vsg::ref_ptr<vsg::RenderPass> renderPass,
46 uint32_t minImageCount, uint32_t imageCount,
47 VkExtent2D imageSize,
bool useClearAttachments =
false);
49 template<
typename... Args>
50 RenderImGui(
const vsg::ref_ptr<vsg::Window>& window, Args&... args) :
56 template<
typename... Args>
57 RenderImGui(
const vsg::ref_ptr<vsg::Window>& window, Args&... args,
bool useClearAttachments) :
63 using Component = std::function<bool()>;
64 using Components = std::list<Component>;
68 void add(
const Component& component);
70 Components& getComponents() {
return _components; }
71 const Components& getComponents()
const {
return _components; }
73 void accept(vsg::RecordTraversal& rt)
const override;
76 virtual ~RenderImGui();
78 vsg::ref_ptr<vsg::Device> _device;
79 uint32_t _queueFamily;
80 vsg::ref_ptr<vsg::Queue> _queue;
81 vsg::ref_ptr<vsg::DescriptorPool> _descriptorPool;
82 Components _components;
84 vsg::ref_ptr<vsg::ClearAttachments> _clearAttachments;
86 void _init(
const vsg::ref_ptr<vsg::Window>& window,
bool useClearAttachments);
87 void _init(vsg::ref_ptr<vsg::Device> device, uint32_t queueFamily,
88 vsg::ref_ptr<vsg::RenderPass> renderPass,
89 uint32_t minImageCount, uint32_t imageCount,
90 VkExtent2D imageSize,
bool useClearAttachments);
Definition: RenderImGui.h:40
void add(const Component &component)