vsg 1.1.3
VulkanSceneGraph library
Loading...
Searching...
No Matches
SecondaryCommandGraph.h
1#pragma once
2
3/* <editor-fold desc="MIT License">
4
5Copyright(c) 2018 Robert Osfield
6
7Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8
9The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10
11THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12
13</editor-fold> */
14
15#include <vsg/app/CommandGraph.h>
16
17namespace vsg
18{
19
20 // forward declare
21 class ExecuteCommands;
22
24 class VSG_DECLSPEC SecondaryCommandGraph : public Inherit<CommandGraph, SecondaryCommandGraph>
25 {
26 public:
27 SecondaryCommandGraph(ref_ptr<Device> in_device, int family);
28 explicit SecondaryCommandGraph(ref_ptr<Window> in_window, ref_ptr<Node> child = {}, uint32_t in_subpass = 0);
29
30 uint32_t subpass = 0;
31 VkBool32 occlusionQueryEnable = VK_FALSE;
32 VkQueryControlFlags queryFlags = 0;
33 VkQueryPipelineStatisticFlags pipelineStatistics = 0;
34
37
40
41 VkCommandBufferLevel level() const override;
42 void reset() override;
43 void record(ref_ptr<RecordedCommandBuffers> recordedCommandBuffers, ref_ptr<FrameStamp> frameStamp = {}, ref_ptr<DatabasePager> databasePager = {}) override;
44
45 protected:
46 virtual ~SecondaryCommandGraph();
47
48 friend ExecuteCommands;
49
50 void _connect(ExecuteCommands* executeCommand);
51 void _disconnect(ExecuteCommands* executeCommand);
52
53 std::vector<ExecuteCommands*> _executeCommands;
54 };
55 VSG_type_name(vsg::SecondaryCommandGraph);
56
57 using SecondaryCommandGraphs = std::vector<ref_ptr<SecondaryCommandGraph>>;
58
60 extern VSG_DECLSPEC ref_ptr<SecondaryCommandGraph> createSecondaryCommandGraphForView(ref_ptr<Window> window, ref_ptr<Camera> camera, ref_ptr<Node> scenegraph, uint32_t subpass, bool assignHeadlight = true);
61
62} // namespace vsg
Definition Inherit.h:28
RenderPass encapsulation of VkRenderPass.
Definition RenderPass.h:86
SecondaryCommandGraph is a specialization of CommandGraph that provides Vulkan secondary command buff...
Definition SecondaryCommandGraph.h:25
RenderPass * getRenderPass()
RenderPass to use passed to the VkCommandBufferInheritanceInfo, if renderPass is set it takes precede...
ref_ptr< RenderPass > renderPass
RenderPass to use passed to the VkCommandBufferInheritanceInfo in place of the framebuffer's or windo...
Definition SecondaryCommandGraph.h:36
Definition ref_ptr.h:22