summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f9bc891)
Use correct parameter for glDrawBuffer
- bool has_color = false;
+ GLenum color_buf = GL_NONE;
bool has_depth = false;
for(unsigned i=0; i<attachments.size(); ++i)
{
bool has_depth = false;
for(unsigned i=0; i<attachments.size(); ++i)
{
}
if(attch.attachment>=COLOR_ATTACHMENT0 && attch.attachment<=COLOR_ATTACHMENT3)
}
if(attch.attachment>=COLOR_ATTACHMENT0 && attch.attachment<=COLOR_ATTACHMENT3)
+ color_buf = attch.attachment;
if(attch.attachment==DEPTH_ATTACHMENT)
has_depth = true;
}
if(attch.attachment==DEPTH_ATTACHMENT)
has_depth = true;
}
- glDrawBuffer(has_color ? GL_FRONT : GL_NONE);
+ glDrawBuffer(color_buf);
glDepthMask(has_depth);
}
else
glDepthMask(has_depth);
}
else
static RequireExtension _ext("GL_EXT_framebuffer_object");
glGenRenderbuffersEXT(1, &id);
static RequireExtension _ext("GL_EXT_framebuffer_object");
glGenRenderbuffersEXT(1, &id);
}
Renderbuffer::~Renderbuffer()
}
Renderbuffer::~Renderbuffer()