summaryrefslogtreecommitdiff
path: root/src/wx/gl_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/wx/gl_util.cc')
-rw-r--r--src/wx/gl_util.cc28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/wx/gl_util.cc b/src/wx/gl_util.cc
index 87a75f749..8b66e4c05 100644
--- a/src/wx/gl_util.cc
+++ b/src/wx/gl_util.cc
@@ -81,6 +81,34 @@ Texture::Texture(GLint unpack_alignment, int unit)
}
+Texture::Texture(Texture&& other)
+ : _name(other._name)
+ , _unpack_alignment(other._unpack_alignment)
+ , _unit(other._unit)
+ , _size(std::move(other._size))
+{
+ other._name = 0;
+}
+
+
+Texture&
+Texture::operator=(Texture&& other)
+{
+ if (this == &other) {
+ return *this;
+ }
+
+ _name = other._name;
+ _unpack_alignment = other._unpack_alignment;
+ _unit = other._unit;
+ _size = std::move(other._size);
+
+ other._name = 0;
+
+ return *this;
+}
+
+
Texture::~Texture()
{
glDeleteTextures(1, &_name);