The ImguiStage renders the imgui menu on top of an existing image or the swapchain. This image is passed via the backgroundImage.
More...
#include <foray_imguistage.hpp>
The ImguiStage renders the imgui menu on top of an existing image or the swapchain. This image is passed via the backgroundImage.
◆ ImguiStage()
foray::stages::ImguiStage::ImguiStage |
( |
| ) |
|
|
default |
◆ ~ImguiStage()
virtual foray::stages::ImguiStage::~ImguiStage |
( |
| ) |
|
|
inlinevirtual |
◆ AddWindowDraw()
void foray::stages::ImguiStage::AddWindowDraw |
( |
std::function< void()> |
windowDraw | ) |
|
|
inline |
Add a function that renders an imgui window. Example:
◆ Destroy()
virtual void foray::stages::ImguiStage::Destroy |
( |
| ) |
|
|
overridevirtual |
◆ DestroyFrameBufferAndRenderPass()
virtual void foray::stages::ImguiStage::DestroyFrameBufferAndRenderPass |
( |
| ) |
|
|
protectedvirtual |
◆ Init()
Initializes and selects background image mode if set, swapchain mode otherwise.
- Parameters
-
context | Requires Device (Swapchain & SwapchainImages if no background image is set) |
backgroundImage | Managed Image Background Image to render over. If set to nullptr, will use swapchain mode. |
◆ InitForImage()
Init the imgui stage for rendering over a generic background image.
- Parameters
-
context | Requires Device |
backgroundImage | Managed Image Background Image to render over |
◆ InitForSwapchain()
virtual void foray::stages::ImguiStage::InitForSwapchain |
( |
core::Context * |
context | ) |
|
|
virtual |
Init the imgui stage for rendering to the swapchain.
- Parameters
-
context | Requires Device, Swapchain & SwapchainImages |
◆ InitImgui()
virtual void foray::stages::ImguiStage::InitImgui |
( |
| ) |
|
|
protectedvirtual |
◆ PrepareRenderpass()
virtual void foray::stages::ImguiStage::PrepareRenderpass |
( |
| ) |
|
|
protectedvirtual |
◆ ProcessSdlEvent()
void foray::stages::ImguiStage::ProcessSdlEvent |
( |
const SDL_Event * |
sdlEvent | ) |
|
Allows imgui to handle input events.
◆ RecordFrame()
virtual void foray::stages::ImguiStage::RecordFrame |
( |
VkCommandBuffer |
cmdBuffer, |
|
|
base::FrameRenderInfo & |
renderInfo |
|
) |
| |
|
overridevirtual |
Records a frame to cmdBuffer.
- Parameters
-
cmdBuffer | Command buffer to record to |
renderInfo | Additional information about the current frame being rendered |
Inheriting
- Any resources accessed (images, buffers) must be protected by pipeline barriers, unless the providing entity defines them as constants
- All commands must be submitted to cmdBuffer
Reimplemented from foray::stages::RenderStage.
◆ Resize()
virtual void foray::stages::ImguiStage::Resize |
( |
const VkExtent2D & |
extent | ) |
|
|
overridevirtual |
◆ SetBackgroundImage()
virtual void foray::stages::ImguiStage::SetBackgroundImage |
( |
core::ManagedImage * |
backgroundImage | ) |
|
|
virtual |
Switch background image and between modes at runtime.
- Parameters
-
backgroundImage | Managed Image Background Image to render over. If set to nullptr, will use swapchain mode. |
◆ mClearValue
VkClearValue foray::stages::ImguiStage::mClearValue |
|
protected |
◆ mFrameBuffers
std::vector<VkFramebuffer> foray::stages::ImguiStage::mFrameBuffers |
|
protected |
◆ mImguiPool
VkDescriptorPool foray::stages::ImguiStage::mImguiPool {} |
|
protected |
◆ mRenderPass
VkRenderPass foray::stages::ImguiStage::mRenderPass = nullptr |
|
protected |
◆ mTargetImage
◆ mWindowDraws
std::vector<std::function<void()> > foray::stages::ImguiStage::mWindowDraws |
|
protected |
The documentation for this class was generated from the following file: