aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordan sinclair <dj2@everburning.com>2019-03-28 13:45:01 -0400
committerGitHub <noreply@github.com>2019-03-28 13:45:01 -0400
commitd70c0e42f5723834ab03977c4e3c92185ecaf900 (patch)
tree247db266904ec1db51bd1b2de24b540f1ec37621 /include
parent6fa4f59b6fa6f6abe5aca5447f853c582e9b4750 (diff)
downloadamber-d70c0e42f5723834ab03977c4e3c92185ecaf900.tar.gz
Add destructors for the config objects. (#422)
This CL adds default destructors for the Vulkan and Dawn config objects. the EngineConfig object destructor is set to virtual. Issue #277.
Diffstat (limited to 'include')
-rw-r--r--include/amber/amber.h4
-rw-r--r--include/amber/amber_dawn.h2
-rw-r--r--include/amber/amber_vulkan.h2
3 files changed, 7 insertions, 1 deletions
diff --git a/include/amber/amber.h b/include/amber/amber.h
index e0bc794..694b40b 100644
--- a/include/amber/amber.h
+++ b/include/amber/amber.h
@@ -39,7 +39,9 @@ enum EngineType {
};
/// Override point of engines to add their own configuration.
-struct EngineConfig {};
+struct EngineConfig {
+ virtual ~EngineConfig();
+};
struct BufferInfo {
BufferInfo();
diff --git a/include/amber/amber_dawn.h b/include/amber/amber_dawn.h
index 32bb556..9a949b2 100644
--- a/include/amber/amber_dawn.h
+++ b/include/amber/amber_dawn.h
@@ -22,6 +22,8 @@ namespace amber {
/// Configuration for the Dawn engine.
struct DawnEngineConfig : public EngineConfig {
+ ~DawnEngineConfig() override;
+
/// The Dawn Device to use for running tests.
::dawn::Device* device;
};
diff --git a/include/amber/amber_vulkan.h b/include/amber/amber_vulkan.h
index 2a8d559..d031579 100644
--- a/include/amber/amber_vulkan.h
+++ b/include/amber/amber_vulkan.h
@@ -27,6 +27,8 @@ namespace amber {
/// Configuration for the Vulkan Engine. The following are all required when
/// when using the vulkan backend.
struct VulkanEngineConfig : public EngineConfig {
+ ~VulkanEngineConfig() override;
+
/// The Vulkan instance procedure loader.
PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr;