add frame duplicate

This commit is contained in:
2019-10-20 17:09:44 +02:00
parent 0d575be198
commit ad03c601ad
7 changed files with 63 additions and 0 deletions

View File

@@ -174,6 +174,14 @@ void RTT::copy(const RTT& source, const glm::vec4& rect)
});
}
RTT RTT::clone() const noexcept
{
RTT dup;
dup.create(w, h);
dup.copy(*this);
return dup;
}
bool RTT::create(int width, int height, int tex/* = -1*/, GLint internal_format, bool depth_buffer /*= false*/)
{
GLenum status = 0;