2
3
4
5
16
17
21
22
26
27
31
32
36
37
41
42
48
49
50 graphicqueuefamily.has_value() &&
53
54
55 presentqueuefamily.has_value() &&
58
59
60 transferqueuefamily.has_value() &&
63
64
65 computequeuefamily.has_value() ;
70
71
72
76
77
81
82
86
87
91
92
96
97
101
102
106
107
108
113
114
115
116
122
123
124
125
129
130
134
135
136
140
141
142
146
147
148
152
153
154
158
159
160
164
165
166
170
171
172
176
177
178
184
185
186
187
188
189
190
192 const VkInstance& instance ,
193 const VkSurfaceKHR& surface ,
198
199
200
201
205
206
207
208
212
213
214
215
219
220
221
222
226
227
228
229
230
231 bool IsQueueMeetDemand(
const VkPhysicalDevice& device,
const VkSurfaceKHR& surface);
234
235
236
237
238
239
241 const VkPhysicalDevice& device ,
242 const VkSurfaceKHR& surface ,
249
250
254
255
259
260
264
265
269
270
274
275
279
280
#define EVENT_CLASS_TYPE(type)
Defines Event type.
#define EVENT_CLASS_CATEGORY(category)
Defines Event category.
#define SPICES_PROFILE_ZONEN(...)
#define SPICES_PROFILE_ZONE
#define SPICES_PROFILE_FRAME
virtual ~Application()
Destructor Function.
Application()
Constructor Function.
static void Run()
Run Our World.
Application Class. Our Engine Start here.
This Class is the basic Event Class. Inherit from it and create specific event class.
uint32_t m_PickMaterial
Identify of selected material.
FrameInfo(const FrameInfo &)=delete
Copy Constructor Function.
uint32_t m_FrameIndex
FrameIndex, varying during 0 - (MaxFrameInFlight - 1). Used almost anywhere.
FrameInfo & operator=(const FrameInfo &)=delete
Copy Assignment Operation.
virtual ~FrameInfo()=default
Destructor Function.
static FrameInfo & Get()
Get FrameInfo.
std::shared_ptr< World > m_World
The shared pointer of specific world.
scl::linked_unordered_map< int, std::string > m_PickEntityID
RendererType m_RendererType
The renderer type of current world.
FrameInfo()=default
Constructor Function.
uint32_t m_ImageIndex
ImageIndex, varying during 0 - (MaxFrameInFlight - 1). Used in swapchain index and framebuffer index.
FrameInfo Class. This class defines the FrameInfo data.
static void Init()
Init Log.
static void ShutDown()
Shutdown Log.
virtual std::string ToString() const override
Serialize this Event Class to string.
MeshAddedWorldEvent()=default
Constructor Function.
virtual ~MeshAddedWorldEvent() override=default
Destructor Function.
This Class is inherited from Event Class.
NativeScriptSystem Class. This class defines the specific behaves of NativeScriptSystem.
ResourceSystem Class. This class defines the specific behaves of RenderSystem.
RendererResourcePool Class. This class is a pool of all framebuffer's attachment.
ResourceSystem Class. Handles resource load/unload event.
This Class is inherited from Event Class. Called by Viewport Resize.
SlateSystem Class. This class defines the specific behaves of SlateSystem.
SystemManager()
Constructor Function.
static SystemManager & Get()
Get Static SystemManager.
SystemManager & PopSystem(const std::string &systemName)
Push a system to this manager.
SystemManager Class. This class defines the behave of SystemManager.
void Flush()
Refresh time in each engine loop.
const uint64_t & fs() const
Get frames count.
This Class handles our engine time step during frames. Global Unique.
VulkanDescriptorPool Class. This class is the wrapper of VkDescriptorPool.
VkSampleCountFlagBits GetMaxUsableSampleCount() const
Get device's max usable sample count.
bool IsQueueMeetDemand(const VkPhysicalDevice &device, const VkSurfaceKHR &surface)
Check all Queue we need meet;.
static SwapChainSupportDetails QuerySwapChainSupport(const VkPhysicalDevice &device, const VkSurfaceKHR &surface, GLFWwindow *window)
Query physical device's SwapChainSupport.
const SwapChainSupportDetails & GetSwapChainSupport()
Get SwapChain Utils.
static VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV & GetDGCProperties()
Get DeviceGeneratedCommandsPropertiesNV.
QueueHelper m_QueueHelper
QueueHelper.
static VkPhysicalDeviceFeatures m_DeviceFeatures
Selected Physical Device Features.
static VkPhysicalDeviceProperties & GetDeviceProperties()
Get VkPhysicalDeviceProperties.
virtual ~VulkanDevice() override
Destructor Function.
static VkPhysicalDeviceRayTracingPipelinePropertiesKHR m_RayTracingProperties
Device RayTracing Properties.
static VkPhysicalDeviceFeatures & GetDeviceFeatures()
Get VkPhysicalDeviceFeatures.
bool IsPropertyMeetDemand(const VkPhysicalDevice &device)
Check all Property we need meet.
static VkPhysicalDeviceRayTracingPipelinePropertiesKHR & GetRTPipelineProperties()
Get RayTracingPipelineProperties.
bool IsFeatureMeetDemand(const VkPhysicalDevice &device)
Check all Feature we need meet.
void GetExtensionRequirements()
Get all physical device extension requirements our engine needed. Source 1 : user Setting.
static VkPhysicalDeviceProperties m_DeviceProperties
Selected Physical Device Properties.
static VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV m_DGCProperties
Device DGC Properties.
VulkanDevice(VulkanState &vulkanState)
Constructor Function. Create vkDevice.
bool SelectPhysicalDevice(const VkInstance &instance, const VkSurfaceKHR &surface, GLFWwindow *window)
select a suitable physical device.
SwapChainSupportDetails m_SwapChainSupportDetails
SwapChainSupportDetails.
bool IsExtensionMeetDemand(const VkPhysicalDevice &device)
Check all Extension we need meet;.
std::vector< const char * > m_ExtensionProperties
Device Extension Properties.
void RequerySwapChainSupport()
Requery device's SwapChainSupportDetails. Mainly VkExtent2D.
const QueueHelper & GetQueueHelper() const
Get QueueHelper variable.
VulkanInstance Class. This class defines the VulkanDevice behave. This class is just a wrapper of vkd...
void SetVulkanDebugCallbackFuncPointer()
Set Vulkan's debug message callback function pointer. Working with DEBUG mode.
virtual ~VulkanInstance() override
Destructor Function.
VkDebugUtilsMessengerCreateInfoEXT m_DebugMessengerCreateInfo
Debug Utils Messages used to execute message callback function. Also debug vkInstance create.
void CreateVulkanSurface() const
Create a Surface Object.
std::vector< const char * > m_LayerProperties
Instance Layer Properties.
VulkanInstance(VulkanState &vulkanState, const std::string &name, const std::string &engineName)
Constructor Function. Create vkInstance and vkSurface.
std::vector< const char * > m_ExtensionProperties
Instance Extension Properties.
bool CheckExtensionRequirementsSatisfied()
Iter all our extensions, check whether all satisfied or not.
VkDebugUtilsMessengerEXT m_DebugMessenger
Parameter for Create/Destroy DebugUtilsMessengerEXT.
void FillDebugMessengerCreateInfo()
Set m_DebugMessengerCreateInfo variable.
void GetExtensionRequirements()
Get all instance extension requirements our engine needed. Source 1 : glfw requirements....
bool ChecklayerRequirementsSatisfied()
Iter all our layers, check whether all satisfied or not.
void GetLayerRequirements()
Get all instance layer requirements our engine needed. Source 1 : user Setting.
VulkanInstance Class. This class defines the VulkanInstance behaves. This class is just a wrapper of ...
VulkanObject Class. This class defines the basic behaves of VulkanObject. When we create an new Vulka...
void EndFrame(FrameInfo &frameInfo)
End record the frame with vulkan render backend.
void RecreateSwapChain()
Called OnSlateResize.
std::shared_ptr< VulkanMemoryAllocator > m_VmaAllocator
VulkanMemoryAllocator.
std::unique_ptr< VulkanSwapChain > m_VulkanSwapChain
VulkanSwapChain.
virtual ~VulkanRenderBackend()
Destructor Function.
std::unique_ptr< VulkanCommandPool > m_VulkanCommandPool
VulkanCommandPool.
VulkanRenderBackend()
Constructor Function.
static std::shared_ptr< VulkanDescriptorPool > GetDescriptorPool()
Get DescriptorPool in use.
static VulkanState m_VulkanState
The VulkanState in use.
std::unique_ptr< VulkanCommandBuffer > m_VulkanCommandBuffer
VulkanCommandBuffer.
bool isWindowClosed()
Determine whether window is closed.
static std::shared_ptr< VulkanDescriptorPool > m_VulkanDescriptorPool
The VulkanDescriptorPool in use.
static std::shared_ptr< RendererResourcePool > m_RendererResourcePool
The RendererResourcePool in use.
static VulkanState & GetState()
Get VulkanState in use.
std::unique_ptr< VulkanWindows > m_VulkanWindows
VulkanWindows.
bool OnMeshAddedWorldEvent(WorldEvent &event)
This function is called on world mark query tick.
void RenderFrame(TimeStep &ts, FrameInfo &frameInfo)
Draw World.
void OnEvent(Event &event)
This function is called on global event function is called.
static std::shared_ptr< RendererResourcePool > GetRendererResourcePool()
Get RendererResourcePool in use.
void BeginFrame(FrameInfo &frameInfo)
Start record a new frame with vulkan render backend.
VulkanRenderBackend & operator=(const VulkanRenderBackend &)=delete
Copy Assignment Operation.
bool OnWindowResizeOver(WindowResizeOverEvent &event)
This function is called on window is resized over.
std::shared_ptr< VulkanDevice > m_VulkanDevice
VulkanDevice.
std::unique_ptr< VulkanInstance > m_VulkanInstance
VulkanInstance.
bool OnSlateResize(SlateResizeEvent &event)
This function is called on viewport is resized.
VulkanRenderBackend(const VulkanRenderBackend &)=delete
Copy Constructor Function.
This class defines the render backend behaves of Vulkan.
VulkanWindows(VulkanState &vulkanState, const WindowInfo &initInfo)
Constructor Function. Create Windows.
bool m_WindowsResized
True if viewPort is resized.
virtual ~VulkanWindows() override
Destructor Function.
void SetInternalCallBack() const
Set all needed GLFW events call back.
void SetResized(bool isResized)
Set m_WindowsResized variable.
WindowInfo m_WindowInfo
Window's info. not viewport's info.
bool IsResized() const
Get m_WindowsResized variable.
VulkanWindows Class. This class defines the windows behaves.
virtual ~WorldEvent() override=default
Destructor Function.
WorldEvent()=default
Constructor Function.
This Class is inherited from Event Class. Inherit from it and create specific KeyEvent class....
World Class. This class defines the basic behaves of World. When we create an new world,...
The container combines hashmap and list together. Used in the case that we want iter a hashmap in ord...
std::optional< uint32_t > graphicqueuefamily
The graphic queue's in used identify.
std::optional< uint32_t > presentqueuefamily
The present queue's in used identify.
std::optional< uint32_t > transferqueuefamily
The transfer queue's in used identify.
std::optional< uint32_t > computequeuefamily
The compute queue's in used identify.
bool isComplete() const
Whether all queues that we need is valid.
This struct contains all queues's identify we need.
VkExtent2D surfaceSize
The VkSurface Size.
std::vector< VkSurfaceFormatKHR > formats
All supported VkSurfaceFormatKHR.
VkSurfaceFormatKHR format
The selected VkSurfaceFormatKHR.
VkSurfaceCapabilitiesKHR capabilities
VkSurfaceCapabilitiesKHR.
VkPresentModeKHR presentMode
The selected VkPresentModeKHR.
VkExtent2D viewPortSize
The ViewPort Size. Init value. Reset by resize event.
std::vector< VkPresentModeKHR > presentModes
All supported VkPresentModeKHR.
SwapChain Utils. Queried from device.
This struct contains all Vulkan object in used global.
GLFWimage image
GLFWimage.
WindowIcon(const std::string &iconPath)
Constructor Function. Load the icon file immediately.
virtual ~WindowIcon()
Destructor Function.
This struct helps load the icon of window.
std::shared_ptr< WindowIcon > icon
Window's icon.
std::string name
Window's name.
int height
Window's height.
This struct defines the basic information of window.