glw: added framebuffer status check, fixed renderbuffer creation.
This commit is contained in:
parent
c70bd419a7
commit
8712813a97
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue