2024-03-18 15:41:46 -03:00
|
|
|
#ifndef XNA_GRAPHICS_RENDERTARGET_HPP
|
|
|
|
#define XNA_GRAPHICS_RENDERTARGET_HPP
|
|
|
|
|
2024-05-04 21:07:39 -03:00
|
|
|
#include "../default.hpp"
|
2024-05-23 14:38:16 -03:00
|
|
|
#include "texture.hpp"
|
2024-03-18 15:41:46 -03:00
|
|
|
|
|
|
|
namespace xna {
|
2024-05-23 14:38:16 -03:00
|
|
|
class RenderTarget2D : public Texture2D {
|
2024-03-18 15:41:46 -03:00
|
|
|
public:
|
2024-05-23 14:38:16 -03:00
|
|
|
RenderTarget2D();
|
2024-08-03 22:45:19 -03:00
|
|
|
RenderTarget2D(sptr<GraphicsDevice> const& device);
|
|
|
|
|
|
|
|
//Gets the data format for the depth stencil data.
|
|
|
|
constexpr DepthFormat DepthStencilFormat() const { return depthStencilFormat; }
|
|
|
|
//Gets the number of sample locations during multisampling.
|
|
|
|
constexpr Int MultiSampleCount() const { return multiSampleCount; }
|
|
|
|
//Gets or sets the render target usage.
|
|
|
|
constexpr RenderTargetUsage TargetUsage() const { return targetUsage; }
|
2024-05-23 14:38:16 -03:00
|
|
|
|
2024-08-03 22:45:19 -03:00
|
|
|
void Initialize();
|
|
|
|
void Apply();
|
|
|
|
private:
|
|
|
|
DepthFormat depthStencilFormat{ DepthFormat::None };
|
|
|
|
Int multiSampleCount{ 0 };
|
|
|
|
RenderTargetUsage targetUsage{ RenderTargetUsage::DiscardContents };
|
2024-03-18 15:41:46 -03:00
|
|
|
|
2024-05-23 14:38:16 -03:00
|
|
|
public:
|
|
|
|
struct PlatformImplementation;
|
2024-08-03 22:45:19 -03:00
|
|
|
uptr<PlatformImplementation> impl2 = nullptr;
|
2024-03-21 16:01:47 -03:00
|
|
|
};
|
2024-03-18 15:41:46 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|