]> git.tdb.fi Git - libs/gl.git/blobdiff - source/render/rendertarget.h
Add correct copy and move semantics to most classes
[libs/gl.git] / source / render / rendertarget.h
index 98189e78d17731215b096be9513846e1caa9a733..b7d4af03840f4e81196fad3222255b74be345732 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef RENDERTARGET_H_
 #define RENDERTARGET_H_
 
+#include <msp/core/noncopyable.h>
 #include "framebuffer.h"
 
 namespace Msp {
@@ -15,7 +16,7 @@ Wraps a Framebuffer and its attachments for easier management.
 All attachments will be created as 2D or 2D multisample textures, depending on
 the sample count of the format.
 */
-class RenderTarget
+class RenderTarget: public NonCopyable
 {
 private:
        unsigned width;
@@ -25,10 +26,7 @@ private:
 
 public:
        RenderTarget(unsigned, unsigned, const FrameFormat & = (COLOR_ATTACHMENT, DEPTH_ATTACHMENT));
-private:
-       RenderTarget(const RenderTarget &);
-       RenderTarget &operator=(const RenderTarget &);
-public:
+       RenderTarget(RenderTarget &&) = default;
        ~RenderTarget();
 
        unsigned get_width() const { return width; }