2021-09-29 20:52:14 +08:00
|
|
|
|
#ifndef HGL_VULKAN_RENDER_CONTEXT_INCLUDE
|
|
|
|
|
#define HGL_VULKAN_RENDER_CONTEXT_INCLUDE
|
|
|
|
|
|
|
|
|
|
#include<hgl/graph/VK.h>
|
|
|
|
|
#include<hgl/graph/VKSwapchain.h>
|
|
|
|
|
VK_NAMESPACE_BEGIN
|
|
|
|
|
/**
|
|
|
|
|
* <EFBFBD><EFBFBD>Ⱦ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
*/
|
|
|
|
|
class RenderContext
|
|
|
|
|
{
|
|
|
|
|
protected:
|
|
|
|
|
|
2025-05-17 20:26:36 +08:00
|
|
|
|
VulkanDevice *device;
|
2021-09-29 20:52:14 +08:00
|
|
|
|
|
|
|
|
|
VkExtent2D extent;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
2025-05-17 20:26:36 +08:00
|
|
|
|
RenderContext(VulkanDevice *,const VkExtent2D &);
|
2021-09-29 20:52:14 +08:00
|
|
|
|
virtual ~RenderContext();
|
|
|
|
|
|
|
|
|
|
void Prepare(
|
|
|
|
|
};//class RenderContext
|
|
|
|
|
|
|
|
|
|
class RenderContextSwapchain:public RenderContext
|
|
|
|
|
{
|
|
|
|
|
Swapchain *swapchain;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
void RequestPresentMode(const VkPresentModeKHR present_mode);
|
|
|
|
|
void RequestImageFormat(const VkFormat format);
|
|
|
|
|
};//class RenderContextSwapchain:public RenderContext
|
|
|
|
|
VK_NAMESPACE_END
|
|
|
|
|
#endif//HGL_VULKAN_RENDER_CONTEXT_INCLUDE
|