glw: added framebuffer status check, fixed renderbuffer creation.

This commit is contained in:
Marco Di Benedetto 2012-05-01 00:28:50 +00:00
parent c70bd419a7
commit 8712813a97
2 changed files with 2 additions and 1 deletions

View File

@ -11,6 +11,7 @@
#define GLW_CHECK_GL_ERROR GLW_ASSERT(glGetError() == GL_NO_ERROR)
#define GLW_CHECK_GL_READ_FRAMEBUFFER_STATUS GLW_ASSERT(glCheckFramebufferStatus(GL_READ_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE)
#define GLW_CHECK_GL_DRAW_FRAMEBUFFER_STATUS GLW_ASSERT(glCheckFramebufferStatus(GL_DRAW_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE)
#define GLW_CHECK_GL_FRAMEBUFFER_STATUS GLW_ASSERT(glCheckFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE)
namespace glw
{

View File

@ -111,7 +111,7 @@ class Renderbuffer : public Renderable, public SafeRenderbuffer
glGetIntegerv(GL_RENDERBUFFER_BINDING, &boundName);
glGenRenderbuffers(1, &(this->m_name));
this->setBinding(GL_RENDERBUFFER_BINDING, 0);
this->setBinding(GL_RENDERBUFFER, 0);
this->bind();
this->allocate(args.format, args.width, args.height);