builds now with VCPKG and MSAA works

This commit is contained in:
Dynamitos
2023-12-10 22:27:59 +01:00
parent ff8200ab35
commit a49bab9028
39 changed files with 490 additions and 422 deletions
+7 -46
View File
@@ -15,24 +15,24 @@ public:
SeAttachmentStoreOp storeOp = SE_ATTACHMENT_STORE_OP_STORE,
SeAttachmentLoadOp stencilLoadOp = SE_ATTACHMENT_LOAD_OP_DONT_CARE,
SeAttachmentStoreOp stencilStoreOp = SE_ATTACHMENT_STORE_OP_DONT_CARE);
virtual ~RenderTargetAttachment();
virtual PTexture2D getTexture()
~RenderTargetAttachment();
PTexture2D getTexture()
{
return texture;
}
virtual SeFormat getFormat() const
SeFormat getFormat() const
{
return texture->getFormat();
}
virtual SeSampleCountFlags getNumSamples() const
SeSampleCountFlags getNumSamples() const
{
return texture->getNumSamples();
}
virtual uint32 getWidth() const
uint32 getWidth() const
{
return texture->getWidth();
}
virtual uint32 getHeight() const
uint32 getHeight() const
{
return texture->getHeight();
}
@@ -51,53 +51,14 @@ protected:
};
DEFINE_REF(RenderTargetAttachment)
class SwapchainAttachment : public RenderTargetAttachment
{
public:
SwapchainAttachment(PWindow owner,
SeAttachmentLoadOp loadOp = SE_ATTACHMENT_LOAD_OP_LOAD,
SeAttachmentStoreOp storeOp = SE_ATTACHMENT_STORE_OP_STORE,
SeAttachmentLoadOp stencilLoadOp = SE_ATTACHMENT_LOAD_OP_DONT_CARE,
SeAttachmentStoreOp stencilStoreOp = SE_ATTACHMENT_STORE_OP_DONT_CARE);
virtual ~SwapchainAttachment();
virtual PTexture2D getTexture() override
{
return owner->getBackBuffer();
}
virtual SeFormat getFormat() const override
{
return owner->getSwapchainFormat();
}
virtual SeSampleCountFlags getNumSamples() const override
{
return Gfx::SE_SAMPLE_COUNT_1_BIT;
}
virtual uint32 getWidth() const
{
return owner->getFramebufferWidth();
}
virtual uint32 getHeight() const
{
return owner->getFramebufferHeight();
}
private:
PWindow owner;
};
DEFINE_REF(SwapchainAttachment)
class RenderTargetLayout
{
public:
RenderTargetLayout();
RenderTargetLayout(PRenderTargetAttachment depthAttachment);
RenderTargetLayout(PRenderTargetAttachment colorAttachment, PRenderTargetAttachment depthAttachment);
RenderTargetLayout(Array<PRenderTargetAttachment> colorAttachments, PRenderTargetAttachment depthAttachmet);
RenderTargetLayout(Array<PRenderTargetAttachment> inputAttachments, Array<PRenderTargetAttachment> colorAttachments, PRenderTargetAttachment depthAttachment);
RenderTargetLayout(PRenderTargetAttachment colorAttachment, PRenderTargetAttachment depthAttachment, PRenderTargetAttachment resolveAttachment);
Array<PRenderTargetAttachment> inputAttachments;
Array<PRenderTargetAttachment> colorAttachments;
Array<PRenderTargetAttachment> resolveAttachments;
PRenderTargetAttachment depthAttachment;
PRenderTargetAttachment depthResolveAttachment;
uint32 width;
uint32 height;
};