fix rtt copy/move

This commit is contained in:
2019-10-15 16:59:55 +02:00
parent 9ccd6ed2f4
commit 5f002cca53
6 changed files with 161 additions and 73 deletions

View File

@@ -4,8 +4,31 @@
#include "util.h"
#include "app.h"
RTT& RTT::operator=(RTT&& other)
{
LOG("RTT-move-assignment");
int_fmt = other.int_fmt;
texID = other.texID;
fboID = other.fboID;
rboID = other.rboID;
w = other.w;
h = other.h;
bound = other.bound;
other.int_fmt = 0;
other.texID = 0;
other.fboID = 0;
other.rboID = 0;
other.w = 0;
other.h = 0;
other.bound = false;
return *this;
}
RTT::RTT()
{
int_fmt = 0;
fboID = 0;
rboID = 0;
w = 0;
@@ -15,12 +38,18 @@ RTT::RTT()
RTT::RTT(RTT&& other)
{
LOG("RTT-move-ctor");
int_fmt = other.int_fmt;
texID = other.texID;
fboID = other.fboID;
rboID = other.rboID;
w = other.w;
h = other.h;
bound = other.bound;
other.int_fmt = 0;
other.texID = 0;
other.fboID = 0;
other.rboID = 0;
other.w = 0;
@@ -30,6 +59,7 @@ RTT::RTT(RTT&& other)
RTT::~RTT()
{
LOG("RTT-dtor");
//destroy();
if (texID || rboID || fboID)
LOG("RTT not destroyed");