Use correct parameter for glDrawBuffer
{
if(current()==this)
{
- bool has_color = false;
+ GLenum color_buf = GL_NONE;
bool has_depth = false;
for(unsigned i=0; i<attachments.size(); ++i)
{
}
if(attch.attachment>=COLOR_ATTACHMENT0 && attch.attachment<=COLOR_ATTACHMENT3)
- has_color = true;
+ color_buf = attch.attachment;
if(attch.attachment==DEPTH_ATTACHMENT)
has_depth = true;
}
- glDrawBuffer(has_color ? GL_FRONT : GL_NONE);
+ glDrawBuffer(color_buf);
glDepthMask(has_depth);
}
else
static RequireExtension _ext("GL_EXT_framebuffer_object");
glGenRenderbuffersEXT(1, &id);
- bind();
}
Renderbuffer::~Renderbuffer()