Skip to content

Commit

Permalink
Fixed some destructor issues in GLFramebuffer and GLRendertarget.
Browse files Browse the repository at this point in the history
  • Loading branch information
bwrrp committed Jul 7, 2008
1 parent 6493963 commit 499ec35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions GLFramebuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ GLFramebuffer::~GLFramebuffer()
// Delete the rendertarget if it's no longer attached anywhere
if (rt->GetTimesAttached() == 0) delete rt;
}
// Make sure we're not bound
if (bound) Unbind();
// Delete the framebuffer
glDeleteFramebuffersEXT(1, &id);
#ifndef NDEBUG
Expand Down
2 changes: 1 addition & 1 deletion GLRendertarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// ----------------------------------------------------------------------------
GLRendertarget::GLRendertarget(int width, int height)
: width(width), height(height)
: width(width), height(height), timesAttached(0)
{
}

Expand Down

0 comments on commit 499ec35

Please sign in to comment.