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>
11
12#include <vector>
13#include <set>
14
15//#define VK_ENABLE_BETA_EXTENSIONS
16#define GLFW_INCLUDE_VULKAN
17#if defined(_WIN32)
18#define VK_USE_PLATFORM_WIN32_KHR
19#elif defined(__APPLE__)
20#define VK_USE_PLATFORM_MACOS_MVK
21#elif defined(__linux__)
22#define VK_USE_PLATFORM_XLIB_KHR
23#endif
24#include <GLFW/glfw3.h>
25
26#if defined(_WIN32)
27#define GLFW_EXPOSE_NATIVE_WIN32
28#elif defined(__APPLE__)
29#define GLFW_EXPOSE_NATIVE_COCOA
30#elif defined(__linux__)
31#define GLFW_EXPOSE_NATIVE_X11
32#endif
33#include <GLFW/glfw3native.h>
34
36#include <venom/common/Log.h>
37
38namespace venom
39{
40namespace vulkan
41{
42class Instance;
43class VulkanApplication;
45{
46 friend class Instance;
47 friend class VulkanApplication;
48public:
50 virtual ~DebugApplication();
51
52 vc::Error InitDebug();
53 void DestroyDebug();
54
55protected:
56 void _SetInstanceCreateInfoValidationLayers(VkInstanceCreateInfo * createInfos);
57 template<typename CreateInfo>
58 void _SetCreateInfoValidationLayers(CreateInfo * createInfos);
59 vc::Error _PostInstance_SetDebugParameters();
60 PFN_vkDebugUtilsMessengerCallbackEXT _GetDebugCallback();
61
62 double _GetTheoreticalFPS(double fps);
63 void _UpdateTheoreticalFPS(uint32_t microsecondsWaitedOnVSync);
64
65protected:
66
67private:
68 vc::Error __InitValidationLayers();
69
70#ifdef VENOM_DEBUG
71 std::vector<const char *> __validationLayersInUse;
72 std::vector<VkLayerProperties> __validationLayersAvailable;
73
74 VkDebugUtilsMessengerEXT __debugMessenger;
75 VkDebugUtilsMessengerCreateInfoEXT __debugMessengerCreateInfo;
76#endif
77private:
78 uint64_t __microsecondsWaitedOnVSync;
79 vc::Timer __fpsTimer;
80};
81
82}
83}
Definition Timer.h:21
Definition Debug.h:45
Definition Instance.h:17
Definition VulkanApplication.h:46
Contains the entirety of the code of the VenomEngine project.
Definition Config.h:13