31 lines
873 B
C++
31 lines
873 B
C++
#pragma once
|
|
#include <vulkan/vulkan.h>
|
|
|
|
#include "glfw/glfw_window.h"
|
|
|
|
namespace veng {
|
|
class Graphics final {
|
|
public:
|
|
Graphics(gsl::not_null<Window *> window);
|
|
~Graphics();
|
|
|
|
void InitializeVulkan();
|
|
void CreateInstance();
|
|
void SetupDebugMessenger();
|
|
|
|
std::vector<gsl::czstring> GetRequiredInstanceExtentions();
|
|
|
|
static gsl::span<gsl::czstring> GetSuggestedInstanceExtentions();
|
|
static std::vector<VkExtensionProperties> GetSupprotedInstanceExtensions();
|
|
static bool AreAllExtensionsSupported(gsl::span<gsl::czstring> extensions);
|
|
|
|
static std::vector<VkLayerProperties> GetSupprotedValidationLayers();
|
|
static bool AreAllLayersSupported(gsl::span<gsl::czstring> extensions);
|
|
|
|
VkInstance instance_ = nullptr;
|
|
VkDebugUtilsMessengerEXT debug_messenger_;
|
|
gsl::not_null<Window *> window_;
|
|
bool validation_enabled_ = false;
|
|
};
|
|
} // namespace veng
|