VEX Engine
Retro looking game engine made in vulkan mostly because i wanted to understand it better.
Loading...
Searching...
No Matches
vex::VulkanImGUIWrapper Class Reference

Class with Imgui for vulkan backend definition, inheriting from ImGUIWrapper. More...

#include <VulkanImGUIWrapper.hpp>

Inheritance diagram for vex::VulkanImGUIWrapper:
vex::ImGUIWrapper EditorImGUIWrapper

Public Member Functions

 VulkanImGUIWrapper (SDL_Window *window, VulkanContext &vulkanContext)
 Constructor for VulkanImGUIWrapper.
virtual ~VulkanImGUIWrapper ()
 Destructor for VulkanImGUIWrapper.
VkDescriptorSet addTexture (VkSampler sampler, VkImageView imageView, VkImageLayout layout)
 Adds a texture to the ImGUI wrapper.
void removeTexture (VkDescriptorSet descriptorSet)
 Removes a texture from the ImGUI wrapper.
void init () override
 Initialization called inside Engine class.
void beginFrame () override
 Begining of UI rendering called in vex::Renderer::renderFrame.
void endFrame () override
 Ends UI rendering for frame.
void processEvent (const SDL_Event *event) override
 Its used to process input needed by interaction with ImGui.
void draw (VkCommandBuffer commandBuffer)
Public Member Functions inherited from vex::ImGUIWrapper
void addUIFunction (const std::function< void()> &func)
 Adds a function to be executed during UI rendering.
void executeUIFunctions ()
 Called between beginFrame and endFrame, executes all imgui functions added by addUIFunction.

Private Attributes

SDL_Window * m_p_window
VulkanContextm_r_context

Additional Inherited Members

Protected Attributes inherited from vex::ImGUIWrapper
std::vector< std::function< void()> > m_uiFunctions

Detailed Description

Class with Imgui for vulkan backend definition, inheriting from ImGUIWrapper.

Definition at line 24 of file VulkanImGUIWrapper.hpp.

Constructor & Destructor Documentation

◆ VulkanImGUIWrapper()

vex::VulkanImGUIWrapper::VulkanImGUIWrapper ( SDL_Window * window,
VulkanContext & vulkanContext )

Constructor for VulkanImGUIWrapper.

Parameters
SDL_Window*window - The SDL window to use for ImGUI.
VulkanContext&vulkanContext - The Vulkan context containing vulkan resources..

Definition at line 12 of file VulkanImGUIWrapper.cpp.

◆ ~VulkanImGUIWrapper()

vex::VulkanImGUIWrapper::~VulkanImGUIWrapper ( )
virtual

Destructor for VulkanImGUIWrapper.

Definition at line 15 of file VulkanImGUIWrapper.cpp.

Member Function Documentation

◆ addTexture()

VkDescriptorSet vex::VulkanImGUIWrapper::addTexture ( VkSampler sampler,
VkImageView imageView,
VkImageLayout layout )

Adds a texture to the ImGUI wrapper.

Parameters
VkSamplersampler - The sampler for the texture.
VkImageViewimageView - The image view for the texture.
VkImageLayoutlayout - The layout for the texture.
Returns
VkDescriptorSet - The descriptor set for the texture.

Definition at line 33 of file VulkanImGUIWrapper.cpp.

◆ beginFrame()

void vex::VulkanImGUIWrapper::beginFrame ( )
inlineoverridevirtual

Begining of UI rendering called in vex::Renderer::renderFrame.

Implements vex::ImGUIWrapper.

Definition at line 60 of file VulkanImGUIWrapper.hpp.

◆ draw()

void vex::VulkanImGUIWrapper::draw ( VkCommandBuffer commandBuffer)
inline

Definition at line 63 of file VulkanImGUIWrapper.hpp.

◆ endFrame()

void vex::VulkanImGUIWrapper::endFrame ( )
inlineoverridevirtual

Ends UI rendering for frame.

Implements vex::ImGUIWrapper.

Definition at line 61 of file VulkanImGUIWrapper.hpp.

◆ init()

void vex::VulkanImGUIWrapper::init ( )
inlineoverridevirtual

Initialization called inside Engine class.

Implements vex::ImGUIWrapper.

Definition at line 59 of file VulkanImGUIWrapper.hpp.

◆ processEvent()

void vex::VulkanImGUIWrapper::processEvent ( const SDL_Event * event)
inlineoverridevirtual

Its used to process input needed by interaction with ImGui.

Implements vex::ImGUIWrapper.

Definition at line 62 of file VulkanImGUIWrapper.hpp.

◆ removeTexture()

void vex::VulkanImGUIWrapper::removeTexture ( VkDescriptorSet descriptorSet)

Removes a texture from the ImGUI wrapper.

Parameters
VkDescriptorSetdescriptorSet - The descriptor set for the texture.

Definition at line 41 of file VulkanImGUIWrapper.cpp.

Member Data Documentation

◆ m_p_window

SDL_Window* vex::VulkanImGUIWrapper::m_p_window
private

Definition at line 77 of file VulkanImGUIWrapper.hpp.

◆ m_r_context

VulkanContext& vex::VulkanImGUIWrapper::m_r_context
private

Definition at line 78 of file VulkanImGUIWrapper.hpp.


The documentation for this class was generated from the following files: