1
0
mirror of https://github.com/borgesdan/xn65 synced 2024-12-29 21:54:47 +01:00
xn65/framework/platform/rendertarget-dx.hpp

30 lines
723 B
C++
Raw Normal View History

2024-03-18 15:41:46 -03:00
#ifndef XNA_PLATFORM_RENDERTARGET_DX_HPP
#define XNA_PLATFORM_RENDERTARGET_DX_HPP
#include "../graphics/rendertarget.hpp"
#include "texture-dx.hpp"
#include "dxgi.h"
#include "d3d11.h"
namespace xna {
2024-03-21 16:01:47 -03:00
class RenderTarget2D : public IRenderTarget2D, public Texture2D {
2024-03-18 15:41:46 -03:00
public:
2024-05-04 21:07:39 -03:00
RenderTarget2D(GraphicsDevice* device) : Texture2D(device){}
2024-03-21 16:01:47 -03:00
virtual ~RenderTarget2D() override {
if (_renderTargetView) {
_renderTargetView->Release();
_renderTargetView = nullptr;
}
}
2024-05-04 21:07:39 -03:00
virtual bool Initialize(xna_error_nullarg) override;
virtual bool Apply(xna_error_nullarg) override;
2024-03-21 16:01:47 -03:00
public:
ID3D11RenderTargetView* _renderTargetView = nullptr;
2024-04-07 14:06:12 -03:00
D3D11_RENDER_TARGET_VIEW_DESC _renderTargetDesc{};
2024-03-18 15:41:46 -03:00
};
}
#endif