Files
Seele/src/Engine/Graphics/Vulkan/VulkanGraphics.h
T

62 lines
1.7 KiB
C++
Raw Normal View History

2020-03-24 21:05:32 +01:00
#pragma once
2020-03-02 19:07:49 +01:00
#include "Graphics/Graphics.h"
2020-03-13 12:44:33 +01:00
#include "VulkanGraphicsResources.h"
2020-03-02 19:07:49 +01:00
namespace Seele
{
namespace Vulkan
2020-03-02 19:07:49 +01:00
{
DECLARE_REF(Allocator);
2020-03-24 21:05:32 +01:00
DECLARE_REF(CommandBufferManager);
DECLARE_REF(Queue);
class Graphics : public Gfx::Graphics
{
public:
Graphics();
virtual ~Graphics();
VkDevice getDevice() const;
VkPhysicalDevice getPhysicalDevice() const;
2020-03-09 12:30:07 +01:00
2020-03-24 21:05:32 +01:00
PCommandBufferManager getGraphicsCommands();
PCommandBufferManager getComputeCommands();
PCommandBufferManager getTransferCommands();
PCommandBufferManager getDedicatedTransferCommands();
2020-04-01 02:17:49 +02:00
PAllocator getAllocator();
// Inherited via Graphics
virtual void init(GraphicsInitializer initializer) override;
virtual void beginFrame(void* windowHandle) override;
virtual void endFrame(void* windowHandle) override;
virtual void* createWindow(const WindowCreateInfo& createInfo) override;
protected:
Array<const char*> getRequiredExtensions();
void initInstance(GraphicsInitializer initInfo);
void setupDebugCallback();
void pickPhysicalDevice();
2020-03-24 21:05:32 +01:00
void createDevice(GraphicsInitializer initInfo);
2020-03-13 12:44:33 +01:00
VkDevice handle;
VkPhysicalDevice physicalDevice;
VkInstance instance;
2020-03-24 21:05:32 +01:00
2020-04-01 02:17:49 +02:00
PQueue graphicsQueue;
PQueue computeQueue;
PQueue transferQueue;
PQueue dedicatedTransferQueue;
2020-03-24 21:05:32 +01:00
QueueFamilyMapping queueMapping;
PCommandBufferManager graphicsCommands;
PCommandBufferManager computeCommands;
PCommandBufferManager transferCommands;
PCommandBufferManager dedicatedTransferCommands;
VkPhysicalDeviceProperties props;
VkPhysicalDeviceFeatures features;
VkDebugReportCallbackEXT callback;
Array<PViewport> viewports;
PAllocator allocator;
2020-03-24 21:05:32 +01:00
friend class Window;
};
DEFINE_REF(Graphics);
}
2020-03-02 19:07:49 +01:00
}