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

Adiciona override em destrutores

This commit is contained in:
Danilo 2024-05-23 09:46:11 -03:00
parent 4b3a55f760
commit 7b8a37ab6d
8 changed files with 19 additions and 11 deletions

View File

@ -54,6 +54,14 @@ namespace xna {
return SUCCEEDED(hr);
}
VertexShader::~VertexShader() {
impl = nullptr;
}
PixelShader::~PixelShader() {
impl = nullptr;
}
bool VertexShader::Initialize(DataBuffer& buffer, xna_error_ptr_arg)
{
if (!impl || !m_device || !m_device->_device || !buffer.impl->_blob) {

View File

@ -11,7 +11,7 @@ namespace xna {
public:
BlendState();
BlendState(sptr<GraphicsDevice> const& device);
~BlendState();
~BlendState() override;
bool Initialize(xna_error_nullarg) ;
void AlphaToCoverageEnable(bool value) ;
void IndependentBlendEnable(bool value) ;

View File

@ -9,7 +9,7 @@ namespace xna {
public:
ConstantBuffer();
ConstantBuffer(sptr<GraphicsDevice> const&);
~ConstantBuffer();
~ConstantBuffer() override;
bool Initialize(xna_error_nullarg);
public:
@ -21,7 +21,7 @@ namespace xna {
public:
DataBuffer();
DataBuffer(sptr<GraphicsDevice> const&);
~DataBuffer();
~DataBuffer() override;
bool Initialize(xna_error_nullarg);
public:
@ -33,7 +33,7 @@ namespace xna {
public:
IndexBuffer();
IndexBuffer(sptr<GraphicsDevice> const&);
~IndexBuffer();
~IndexBuffer() override;
template <typename T>
bool Initialize(std::vector<T> const& data, xna_error_nullarg);

View File

@ -11,7 +11,7 @@ namespace xna {
DepthStencilState();
DepthStencilState(sptr<GraphicsDevice> const& device);
~DepthStencilState();
~DepthStencilState() override;
bool Initialize(xna_error_nullarg);
bool Apply(xna_error_ptr_arg);

View File

@ -9,7 +9,7 @@ namespace xna {
public:
RasterizerState();
RasterizerState(sptr<GraphicsDevice> const& device);
~RasterizerState();
~RasterizerState() override;
bool Initialize(xna_error_nullarg);
bool Apply(xna_error_nullarg);
xna::CullMode CullMode() const;

View File

@ -9,7 +9,7 @@ namespace xna {
public:
SamplerState();
SamplerState(sptr<GraphicsDevice> const& device);
~SamplerState();
~SamplerState() override;
bool Initialize(xna_error_nullarg);
bool Apply(xna_error_nullarg);
void Filter(TextureFilter value);

View File

@ -9,7 +9,7 @@ namespace xna {
public:
Shader();
Shader(sptr<GraphicsDevice> const& device);
~Shader();
~Shader() override {}
bool Initialize(DataBuffer& buffer, xna_error_nullarg);
static bool CompileFromFile(WString srcFile, String entryPoint, String profile, DataBuffer& blob);
};
@ -18,7 +18,7 @@ namespace xna {
public:
VertexShader();
VertexShader(sptr<GraphicsDevice> const& device);
~VertexShader();
~VertexShader() override;
bool Initialize(DataBuffer& buffer, xna_error_nullarg);
public:
@ -30,7 +30,7 @@ namespace xna {
public:
PixelShader();
PixelShader(sptr<GraphicsDevice> const& device);
~PixelShader();
~PixelShader() override;
bool Initialize(DataBuffer& buffer, xna_error_nullarg);
public:

View File

@ -9,7 +9,7 @@ namespace xna {
public:
SwapChain();
SwapChain(sptr<GraphicsDevice> const& device);
~SwapChain();
~SwapChain() override;
bool Initialize(xna_error_nullarg);
bool Present(bool vsync);
bool GetBackBuffer(Texture2D& texture2D);