This commit is contained in:
2025-05-13 02:46:21 +03:00
parent 143e16692e
commit 86914b7fcc
610 changed files with 92343 additions and 2 deletions
+28
View File
@@ -0,0 +1,28 @@
#ifndef CustomSwapChain_h__
#define CustomSwapChain_h__
#include "ISwapChain.h"
#include "render/IRenderer.h"
namespace LifeGraphics
{
class CustomSwapChain : public ISwapChain
{
public:
CustomSwapChain(uint16 width, uint16 height, uint16 buffer_cnt, LifeGraphics::IRenderer* host, IDataFormat format);
LifeGraphics::ITexture2D* GetBackBuffer(uint8 id);
LifeGraphics::ITexture2D* GetDepthBuffer(uint8 id);
void Resize(uint16 width, uint16 height);
void Present();
private:
void RebuildBuffers();
uint16 sc_width;
uint16 sc_height;
uint16 sc_buffers;
IDataFormat sc_format;
LifeGraphics::IRenderer* sc_renderer;
LifeGraphics::ITexture2D* back_buffer;
LifeGraphics::ITexture2D* depth_buffer;
};
}
#endif // CustomSwapChain_h__