fixed various caching issues

This commit is contained in:
itsmattkc
2019-09-02 22:58:44 +10:00
parent 3a9af58344
commit 12bc5839a6
19 changed files with 196 additions and 61 deletions
+4
View File
@@ -48,6 +48,8 @@ void RenderFramebuffer::Create(QOpenGLContext *ctx)
context_ = ctx;
connect(context_, SIGNAL(aboutToBeDestroyed()), this, SLOT(Destroy()));
// Create framebuffer object
context_->functions()->glGenFramebuffers(1, &buffer_);
}
@@ -55,6 +57,8 @@ void RenderFramebuffer::Create(QOpenGLContext *ctx)
void RenderFramebuffer::Destroy()
{
if (context_ != nullptr) {
disconnect(context_, SIGNAL(aboutToBeDestroyed()), this, SLOT(Destroy()));
context_->functions()->glDeleteFramebuffers(1, &buffer_);
buffer_ = 0;