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

29 lines
615 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-03-21 16:01:47 -03:00
RenderTarget2D(GraphicsDevice* device);
2024-03-18 15:41:46 -03:00
2024-03-21 16:01:47 -03:00
virtual ~RenderTarget2D() override {
if (_renderTargetView) {
_renderTargetView->Release();
_renderTargetView = nullptr;
}
}
virtual bool Apply() override;
public:
ID3D11RenderTargetView* _renderTargetView = nullptr;
2024-04-02 09:32:06 -03:00
GraphicsDevice* _device{ nullptr };
2024-03-18 15:41:46 -03:00
};
}
#endif