reworked begin and end

This commit is contained in:
2026-08-27 20:00:21 +03:00
parent a6818a6cf4
commit aaf298d8cc
10 changed files with 181 additions and 283 deletions
+31 -9
View File
@@ -81,7 +81,7 @@ enum EImageType
enum EMultisampleType
{
MULTISAMPLE_TYPE_NONE = 0,
MULTISAMPLE_TYPE_NONE = 1,
MULTISAMPLE_TYPE_1_SAMPLES = 1,
MULTISAMPLE_TYPE_2_SAMPLES = 2,
MULTISAMPLE_TYPE_4_SAMPLES = 4,
@@ -343,19 +343,41 @@ enum EImageLayoutHazard
IMAGE_LAYOUT_TRANSFER_DST,
};
struct RenderImage
{
IImage *pImage;
ELoadMode eLoadMode;
EStoreMode eStoreMode;
union
{
struct
{
float r;
float g;
float b;
float a;
};
struct {
float depth;
};
} clear_color;
};
struct BeginInfo
{
uint32_t uWidth;
uint32_t uHeight;
uint32_t uRenderImageCount;
RenderImage *pRenderImages;
RenderImage *pDepth;
};
abstract_class IRenderCommandList
{
public:
virtual void ResetRendering() = 0;
virtual void SetRenderTarget( uint32_t uIndex, IImage *pImage ) = 0;
virtual void SetClearColor( uint32_t uIndex, float r, float g, float b, float a ) = 0;
virtual void SetLoadStoreModes( uint32_t uIndex, ELoadMode eLoadMode, EStoreMode eStoreMode ) = 0;
virtual void SetDepthTarget( IImage *pDepth ) = 0;
virtual void SetClearDepth( float fVal ) = 0;
virtual void SetRenderResolution( uint32_t iWidth, uint32_t iHeight ) = 0;
virtual void Begin( BeginInfo *pBegin ) = 0;
virtual void End() = 0;
virtual void SetScissors( uint32_t uX, uint32_t uY, uint32_t uWidth, uint32_t uHeight ) = 0;
virtual void SetViewport( uint32_t uX, uint32_t uY, uint32_t uWidth, uint32_t uHeight, float fMinDepth, float fMaxDepth ) = 0;