diff --git a/src/AbstractImage.h b/src/AbstractImage.h index 2d9c966ae..aad37c9c0 100644 --- a/src/AbstractImage.h +++ b/src/AbstractImage.h @@ -216,7 +216,7 @@ class MAGNUM_EXPORT AbstractImage { inline AbstractImage(Components components, ComponentType type): _components(components), _type(type) {} /** @brief Destructor */ - inline virtual ~AbstractImage() {} + virtual ~AbstractImage() = 0; /** @brief Color components */ inline Components components() const { return _components; } @@ -229,6 +229,8 @@ class MAGNUM_EXPORT AbstractImage { ComponentType _type; /**< @brief Data type */ }; +inline AbstractImage::~AbstractImage() {} + } #endif diff --git a/src/AbstractShaderProgram.h b/src/AbstractShaderProgram.h index 3be60d690..9512cca73 100644 --- a/src/AbstractShaderProgram.h +++ b/src/AbstractShaderProgram.h @@ -121,7 +121,7 @@ class MAGNUM_EXPORT AbstractShaderProgram { * * Deletes associated OpenGL shader program. */ - inline ~AbstractShaderProgram() { glDeleteProgram(program); } + virtual ~AbstractShaderProgram() = 0; /** * @brief Use shader @@ -300,6 +300,8 @@ class MAGNUM_EXPORT AbstractShaderProgram { State state; }; +inline AbstractShaderProgram::~AbstractShaderProgram() { glDeleteProgram(program); } + } #endif diff --git a/src/AbstractTexture.h b/src/AbstractTexture.h index df2e025d2..319d84adf 100644 --- a/src/AbstractTexture.h +++ b/src/AbstractTexture.h @@ -472,9 +472,7 @@ class MAGNUM_EXPORT AbstractTexture { * * Deletes assigned OpenGL texture. */ - inline virtual ~AbstractTexture() { - glDeleteTextures(1, &texture); - } + virtual ~AbstractTexture() = 0; /** @brief %Texture layer */ inline GLint layer() const { return _layer; } @@ -568,6 +566,8 @@ class MAGNUM_EXPORT AbstractTexture { GLuint texture; }; +inline AbstractTexture::~AbstractTexture() { glDeleteTextures(1, &texture); } + /** @relates AbstractTexture @brief Convertor of component count and data type to InternalFormat */