38 virtual void RegisterWindow(
Window* window)
override;
41 uint32_t FindMemoryType(uint32_t typeFilter, VkMemoryPropertyFlags properties);
42 virtual VkInstance GetInstance();
43 virtual VkDevice GetDevice();
44 virtual VkPhysicalDevice GetPhysicalDevice();
45 virtual VkCommandBuffer BeginSingleTimeCommands();
46 virtual uint32_t GetGraphicsFamily();
47 virtual void EndSingleTimeCommands(VkCommandBuffer commandBuffer);
48 VkCommandPool GetGraphicsCommandPool()
const;
51 VkInstance instance =
nullptr;
52 VkDevice device =
nullptr;
53 VkPhysicalDevice physicalDevice =
nullptr;
54 VkDebugUtilsMessengerEXT debugMessenger =
nullptr;
55 std::vector<VkSemaphore> imageAvailableSemaphores;
56 std::vector<VkSemaphore> renderFinishedSemaphores;
57 std::vector<VkFence> inFlightFences;
58 std::vector<VkFence> imagesInFlight;
59 size_t currentFrame = 0;
60 PFN_vkSetDebugUtilsObjectNameEXT pfnDebugUtilsSetObjectName =
nullptr;
62 VkQueue graphicsQueue =
nullptr;
63 VkQueue presentQueue =
nullptr;
64 uint32_t graphicsFamily = 0;
65 uint32_t presentFamily = 0;
66 VkCommandPool commandPoolGraphics =
nullptr;
67 VkDescriptorPool descriptorPool =
nullptr;
69 void CreateInstance();
70 void SetupDebugMessenger();
71 void PickPhysicalDevice();
72 void CreateLogicalDevice();
73 void CreateCommandPool();
74 void CreateDescriptorPool();
76 void CreateAllocator();
77 uint16_t ScoreDevice(VkPhysicalDevice device);
78 bool CheckDeviceExtensionSupport(VkPhysicalDevice device);
79 bool CheckValidationLayerSupport();
80 std::vector<const char*> GetRequiredExtensions();
81 void PopulateDebugMessengerCreateInfo(VkDebugUtilsMessengerCreateInfoEXT& createInfo);
83 void NameObject(VkObjectType objectType,
void*
object,
const char* objectName);
85 virtual const char* GetVendorName()
const override;
86 virtual const char* GetAdapterName()
const override;
87 virtual const char* GetAPIName()
const override;
88 virtual const char* GetAPIVersion()
const override;
90 virtual void AdjustPerspective(
float *perspective)
override;
124 virtual inline bool ShouldUseImmediateMode()
const override;
125 virtual inline bool SupportsCommandBuffers()
const override;
126 virtual inline bool SupportsTesselation()
const override;
127 virtual inline bool SupportsGeometryShader()
const override;
128 virtual inline bool SupportsComputeShader()
const override;
129 virtual inline bool SupportsMultiDrawIndirect()
const override;
131 virtual void WaitUntilIdle()
override;
134 virtual void Clear(ClearMode mask,
float clear_color[4],
float clear_depth, uint32_t clear_stencil)
override;
137 virtual void DrawImmediateIndexed(GeometryType geom_type,
bool largeBuffer, int32_t baseVertex, uint32_t indexOffsetPtr, uint32_t indexCount)
override;
138 virtual void DrawImmediateVertices(GeometryType geom_type, uint32_t base, uint32_t count)
override;
139 virtual void SetImmediateBlending(
140 BlendOperation colorOp, BlendFactor colorSrc, BlendFactor colorDst,
141 BlendOperation alphaOp, BlendFactor alphaSrc, BlendFactor alphaDst
143 virtual void EnableDepthWrite(
bool state)
override;
144 virtual void SetColorMask(ColorMask mask)
override;
146 std::string vendorName;
147 std::string adapterName;
148 std::string apiVersion;
149 VmaAllocator allocator;
151 Window* primaryWindow =
nullptr;
154 virtual const char* GetDefaultShaderExtension()
const override;
155 virtual void CopyDepthBufferFromReadToWrite(uint32_t srcWidth, uint32_t srcHeight, uint32_t dstWidth, uint32_t dstHeight)
override;
156 virtual void BindDefaultFramebuffer()
override;
157 virtual void BindDefaultFramebufferWrite()
override;
158 virtual void BindDefaultFramebufferRead()
override;
159 virtual void ResizeViewport(uint32_t w, uint32_t h)
override;
Definition Texture.hpp:40
Definition Texture.hpp:42
Definition Texture.hpp:52