VenomEngine
Cross-Platform Modern Graphics Engine
Loading...
Searching...
No Matches
Debug.h
Go to the documentation of this file.
1
8#pragma once
9
11#include <venom/common/Timer.h>
13
14//#define VK_ENABLE_BETA_EXTENSIONS
15#if !defined(VENOM_PLATFORM_IOS)
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
35#else
36
37#include <vulkan/vulkan.h>
38
39#endif
40
42#include <venom/common/Log.h>
43
44namespace venom
45{
46namespace vulkan
47{
48class Instance;
50class DebugApplication
51{
52 friend class Instance;
53 friend class VulkanApplication;
54public:
55 DebugApplication();
56 virtual ~DebugApplication();
57
58 vc::Error InitDebug();
59 void DestroyDebug();
60
61protected:
62 void _SetInstanceCreateInfoValidationLayers(VkInstanceCreateInfo * createInfos);
63 template<typename CreateInfo>
64 void _SetCreateInfoValidationLayers(CreateInfo * createInfos);
65 vc::Error _PostInstance_SetDebugParameters();
66 PFN_vkDebugUtilsMessengerCallbackEXT _GetDebugCallback();
67
68 double _GetTheoreticalFPS(double fps);
69 void _UpdateTheoreticalFPS(uint32_t microsecondsWaitedOnVSync);
70
71protected:
72
73private:
74 vc::Error __InitValidationLayers();
75
76#ifdef VENOM_DEBUG
77 vc::Vector<const char *> __validationLayersInUse;
78 vc::Vector<VkLayerProperties> __validationLayersAvailable;
79
80 VkDebugUtilsMessengerEXT __debugMessenger;
81 VkDebugUtilsMessengerCreateInfoEXT __debugMessengerCreateInfo;
82#endif
83private:
84 uint64_t __microsecondsWaitedOnVSync;
85 vc::Timer __fpsTimer;
86};
87
88}
89}
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