Etterna 0.75.1
Loading...
Searching...
No Matches
RenderTargetVK.h
1#ifndef RENDERER_VK_RENDER_TARGET_VK_H
2#define RENDERER_VK_RENDER_TARGET_VK_H
3
4#include "RageUtil/Graphics/RageDisplay.h"
5
6// TODO: extract to a separate header? OGL/D3D/VK use the same class...
7class RenderTarget
8{
9 public:
10 virtual ~RenderTarget() = default;
11
12 virtual void Create(const RenderTargetParam& param,
13 int& iTextureWidthOut,
14 int& iTextureHeightOut) = 0;
15
16 [[nodiscard]] virtual auto GetTexture() const -> intptr_t = 0;
17
18 /* Render to this RenderTarget. */
19 virtual void StartRenderingTo() = 0;
20
21 /* Stop rendering to this RenderTarget. Update the texture, if necessary,
22 * and make it available. */
23 virtual void FinishRenderingTo() = 0;
24
25 [[nodiscard]] virtual auto InvertY() const -> bool { return false; }
26
27 [[nodiscard]] auto GetParam() const -> const RenderTargetParam&
28 {
29 return m_Param;
30 }
31
32 protected:
33 RenderTargetParam m_Param;
34};
35
37{
38 public:
39 void Create(const RenderTargetParam& param,
40 int& iTextureWidthOut,
41 int& iTextureHeightOut) override;
42 auto GetTexture() const -> intptr_t override;
43 void StartRenderingTo() override;
44 void FinishRenderingTo() override;
45
46 intptr_t m_Texture;
47};
48
49#endif
Definition RenderTargetVK.h:37
Definition RageDisplay_D3D.h:113
Definition RageDisplay.h:245