VenomEngine
Cross-Platform Modern Graphics Engine
Loading...
Searching...
No Matches
Debug.h
Go to the documentation of this file.
1
8#pragma once
9
10#include <venom/common/Timer.h>
12
13//#define VK_ENABLE_BETA_EXTENSIONS
14#define GLFW_INCLUDE_VULKAN
15#if defined(_WIN32)
16#define VK_USE_PLATFORM_WIN32_KHR
17#elif defined(__APPLE__)
18#define VK_USE_PLATFORM_MACOS_MVK
19#elif defined(__linux__)
20#define VK_USE_PLATFORM_XLIB_KHR
21#endif
22#include <GLFW/glfw3.h>
23
24#if defined(_WIN32)
25#define GLFW_EXPOSE_NATIVE_WIN32
26#elif defined(__APPLE__)
27#define GLFW_EXPOSE_NATIVE_COCOA
28#elif defined(__linux__)
29#define GLFW_EXPOSE_NATIVE_X11
30#endif
31#include <GLFW/glfw3native.h>
32
34#include <venom/common/Log.h>
35
36namespace venom
37{
38namespace vulkan
39{
40class Instance;
42class DebugApplication
43{
44 friend class Instance;
45 friend class VulkanApplication;
46public:
47 DebugApplication();
48 virtual ~DebugApplication();
49
50 vc::Error InitDebug();
51 void DestroyDebug();
52
53protected:
54 void _SetInstanceCreateInfoValidationLayers(VkInstanceCreateInfo * createInfos);
55 template<typename CreateInfo>
56 void _SetCreateInfoValidationLayers(CreateInfo * createInfos);
57 vc::Error _PostInstance_SetDebugParameters();
58 PFN_vkDebugUtilsMessengerCallbackEXT _GetDebugCallback();
59
60 double _GetTheoreticalFPS(double fps);
61 void _UpdateTheoreticalFPS(uint32_t microsecondsWaitedOnVSync);
62
63protected:
64
65private:
66 vc::Error __InitValidationLayers();
67
68#ifdef VENOM_DEBUG
69 vc::Vector<const char *> __validationLayersInUse;
70 vc::Vector<VkLayerProperties> __validationLayersAvailable;
71
72 VkDebugUtilsMessengerEXT __debugMessenger;
73 VkDebugUtilsMessengerCreateInfoEXT __debugMessengerCreateInfo;
74#endif
75private:
76 uint64_t __microsecondsWaitedOnVSync;
77 vc::Timer __fpsTimer;
78};
79
80}
81}
Definition Timer.h:21
Definition Instance.h:17
Definition VulkanApplication.h:51
Encapsulation of Vulkan for the front end of VenomEngine.
Definition Allocator.h:18
Contains the entirety of the code of the VenomEngine project.
Definition Callback.h:13