reduced codes of rf_test.cpp

This commit is contained in:
2025-01-25 15:25:29 +08:00
parent 82a3ec4922
commit aafdbdd4ea
4 changed files with 36 additions and 48 deletions

View File

@@ -8,6 +8,31 @@
#include<hgl/graph/VKQueue.h>
#include<hgl/graph/VKPipeline.h>
VK_NAMESPACE_BEGIN
/**
* RenderTarget 存在几种情况:
*
* 1.正常单帧渲染目标,即只有一帧的数据,每次渲染都是当前帧
*
* 2.多帧渲染目标即有多帧数据每次渲染都是指定帧典型的是Swapchain
*
* 但不管是单帧还是多帧,又有两种情况:
*
* 1.单个颜色缓冲区
*
* 2.多个颜色缓冲区典型如PBR GBuffer
*
* 所以RenderTarget的其实是一个多态类根据不同的情况有不同的实现
*/
class IRenderTarget
{
public:
IRenderTarget(DeviceQueue *,Semaphore *);
};//class IRenderTarget
/**
* 渲染目标
*/
@@ -27,6 +52,7 @@ protected:
protected:
uint32_t color_count;
Texture2D **color_textures;
Texture2D *depth_texture;

View File

@@ -13,9 +13,8 @@ struct SwapchainImage
Texture2D * depth =nullptr;
Framebuffer * fbo =nullptr;
RenderCmdBuffer * cmd_buf =nullptr;
RenderCmdBuffer * cmd_buf =nullptr;
public: