diff --git a/framework/platform/shader-dx.cpp b/framework/platform/shader-dx.cpp index 88e0653..49bf967 100644 --- a/framework/platform/shader-dx.cpp +++ b/framework/platform/shader-dx.cpp @@ -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) { diff --git a/inc/graphics/blendstate.hpp b/inc/graphics/blendstate.hpp index 0a37ddb..ce9e4de 100644 --- a/inc/graphics/blendstate.hpp +++ b/inc/graphics/blendstate.hpp @@ -11,7 +11,7 @@ namespace xna { public: BlendState(); BlendState(sptr const& device); - ~BlendState(); + ~BlendState() override; bool Initialize(xna_error_nullarg) ; void AlphaToCoverageEnable(bool value) ; void IndependentBlendEnable(bool value) ; diff --git a/inc/graphics/buffer.hpp b/inc/graphics/buffer.hpp index 2a36ecf..cc0e132 100644 --- a/inc/graphics/buffer.hpp +++ b/inc/graphics/buffer.hpp @@ -9,7 +9,7 @@ namespace xna { public: ConstantBuffer(); ConstantBuffer(sptr const&); - ~ConstantBuffer(); + ~ConstantBuffer() override; bool Initialize(xna_error_nullarg); public: @@ -21,7 +21,7 @@ namespace xna { public: DataBuffer(); DataBuffer(sptr const&); - ~DataBuffer(); + ~DataBuffer() override; bool Initialize(xna_error_nullarg); public: @@ -33,7 +33,7 @@ namespace xna { public: IndexBuffer(); IndexBuffer(sptr const&); - ~IndexBuffer(); + ~IndexBuffer() override; template bool Initialize(std::vector const& data, xna_error_nullarg); diff --git a/inc/graphics/depthstencilstate.hpp b/inc/graphics/depthstencilstate.hpp index 240ca0d..1decdbc 100644 --- a/inc/graphics/depthstencilstate.hpp +++ b/inc/graphics/depthstencilstate.hpp @@ -11,7 +11,7 @@ namespace xna { DepthStencilState(); DepthStencilState(sptr const& device); - ~DepthStencilState(); + ~DepthStencilState() override; bool Initialize(xna_error_nullarg); bool Apply(xna_error_ptr_arg); diff --git a/inc/graphics/rasterizerstate.hpp b/inc/graphics/rasterizerstate.hpp index 6763dfe..da861b9 100644 --- a/inc/graphics/rasterizerstate.hpp +++ b/inc/graphics/rasterizerstate.hpp @@ -9,7 +9,7 @@ namespace xna { public: RasterizerState(); RasterizerState(sptr const& device); - ~RasterizerState(); + ~RasterizerState() override; bool Initialize(xna_error_nullarg); bool Apply(xna_error_nullarg); xna::CullMode CullMode() const; diff --git a/inc/graphics/samplerstate.hpp b/inc/graphics/samplerstate.hpp index bc5ce77..a959bdd 100644 --- a/inc/graphics/samplerstate.hpp +++ b/inc/graphics/samplerstate.hpp @@ -9,7 +9,7 @@ namespace xna { public: SamplerState(); SamplerState(sptr const& device); - ~SamplerState(); + ~SamplerState() override; bool Initialize(xna_error_nullarg); bool Apply(xna_error_nullarg); void Filter(TextureFilter value); diff --git a/inc/graphics/shader.hpp b/inc/graphics/shader.hpp index f497b21..3ec1733 100644 --- a/inc/graphics/shader.hpp +++ b/inc/graphics/shader.hpp @@ -9,7 +9,7 @@ namespace xna { public: Shader(); Shader(sptr 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 const& device); - ~VertexShader(); + ~VertexShader() override; bool Initialize(DataBuffer& buffer, xna_error_nullarg); public: @@ -30,7 +30,7 @@ namespace xna { public: PixelShader(); PixelShader(sptr const& device); - ~PixelShader(); + ~PixelShader() override; bool Initialize(DataBuffer& buffer, xna_error_nullarg); public: diff --git a/inc/graphics/swapchain.hpp b/inc/graphics/swapchain.hpp index 1ab5f14..bb4d5f1 100644 --- a/inc/graphics/swapchain.hpp +++ b/inc/graphics/swapchain.hpp @@ -9,7 +9,7 @@ namespace xna { public: SwapChain(); SwapChain(sptr const& device); - ~SwapChain(); + ~SwapChain() override; bool Initialize(xna_error_nullarg); bool Present(bool vsync); bool GetBackBuffer(Texture2D& texture2D);