Files
LifeProject/LifeGraphics/CustomSwapChain.h
T

29 lines
851 B
C++
Raw Normal View History

2025-05-13 02:46:21 +03:00
#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__